Skip to content

Commit

Permalink
Skip binary data with binds test for mysql2, fix build
Browse files Browse the repository at this point in the history
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 99d142a.
  • Loading branch information
carlosantoniodasilva committed Dec 14, 2012
1 parent df9f9b7 commit f447240
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion 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
Expand Down
2 changes: 2 additions & 0 deletions activerecord/test/cases/log_subscriber_test.rb
Expand Up @@ -103,6 +103,8 @@ def test_initializes_runtime
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
Expand Down

0 comments on commit f447240

Please sign in to comment.