1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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 99d142a937.
This commit is contained in:
Carlos Antonio da Silva 2012-12-14 21:21:37 -02:00
parent df9f9b7f3e
commit f447240b05
2 changed files with 3 additions and 1 deletions

View file

@ -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

View file

@ -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