Skip to content

Commit e56567c

Browse files
committed
Turn off eager casting for mysql2, so ActiveRecord can lazily cast values later. This should help performance for tables with complex types like DATETIME, TIMESTAMP
1 parent 78587a5 commit e56567c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ def connect
629629
end
630630

631631
def configure_connection
632-
@connection.query_options.merge!(:as => :array)
632+
@connection.query_options.merge!(:as => :array, :cast => false)
633633

634634
# By default, MySQL 'where id is null' selects the last inserted id.
635635
# Turn this off. http://dev.rubyonrails.org/ticket/6778

0 commit comments

Comments
 (0)