Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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 99d142a.
  • Loading branch information...
commit f447240b0565fa48f0dbe9341a7bb0feff938dab 1 parent df9f9b7
@carlosantoniodasilva carlosantoniodasilva authored
View
2  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
View
2  activerecord/test/cases/log_subscriber_test.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.