diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-12-14 21:21:37 -0200 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-12-14 21:21:37 -0200 |
commit | f447240b0565fa48f0dbe9341a7bb0feff938dab (patch) | |
tree | 5f6b7082a521837c7761e9cce933b5ebda2fe334 /activerecord | |
parent | df9f9b7f3e87b8e83f9cc14cc36e0800c88c3c56 (diff) | |
download | rails-f447240b0565fa48f0dbe9341a7bb0feff938dab.tar.gz rails-f447240b0565fa48f0dbe9341a7bb0feff938dab.tar.bz2 rails-f447240b0565fa48f0dbe9341a7bb0feff938dab.zip |
Skip binary data with binds test for mysql2, fix build
Mysql2 doesn't support binds, which means no binds payload is set when
logging, so the logic to render binary data differently here doesn't work.
Introduced in 99d142a9375f9ba1960863b3cc745265aa9a14df.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/log_subscriber.rb | 2 | ||||
-rw-r--r-- | activerecord/test/cases/log_subscriber_test.rb | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/log_subscriber.rb b/activerecord/lib/active_record/log_subscriber.rb index 11ec2eaf79..2366a91bb5 100644 --- a/activerecord/lib/active_record/log_subscriber.rb +++ b/activerecord/lib/active_record/log_subscriber.rb @@ -1,7 +1,7 @@ module ActiveRecord class LogSubscriber < ActiveSupport::LogSubscriber IGNORE_PAYLOAD_NAMES = ["SCHEMA", "EXPLAIN"] - + def self.runtime=(value) Thread.current[:active_record_sql_runtime] = value end diff --git a/activerecord/test/cases/log_subscriber_test.rb b/activerecord/test/cases/log_subscriber_test.rb index 8f42c8ef7b..9fee219753 100644 --- a/activerecord/test/cases/log_subscriber_test.rb +++ b/activerecord/test/cases/log_subscriber_test.rb @@ -103,6 +103,8 @@ class LogSubscriberTest < ActiveRecord::TestCase end def test_binary_data_is_not_logged + skip if current_adapter?(:Mysql2Adapter) + Binary.create(:data => 'some binary data') wait assert_equal 3, @logger.logged(:debug).size |