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:
parent
df9f9b7f3e
commit
f447240b05
2 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue