multiple variable assignments can done in a single query
This commit is contained in:
parent
d962ef2583
commit
60c33be87c
|
@ -606,12 +606,11 @@ module ActiveRecord
|
||||||
|
|
||||||
def configure_connection
|
def configure_connection
|
||||||
@connection.query_options.merge!(:as => :array)
|
@connection.query_options.merge!(:as => :array)
|
||||||
encoding = @config[:encoding]
|
|
||||||
execute("SET NAMES '#{encoding}'", :skip_logging) if encoding
|
|
||||||
|
|
||||||
# By default, MySQL 'where id is null' selects the last inserted id.
|
# By default, MySQL 'where id is null' selects the last inserted id.
|
||||||
# Turn this off. http://dev.rubyonrails.org/ticket/6778
|
# Turn this off. http://dev.rubyonrails.org/ticket/6778
|
||||||
execute("SET SQL_AUTO_IS_NULL=0", :skip_logging)
|
encoding = @config[:encoding]
|
||||||
|
execute("SET NAMES '#{encoding}', SQL_AUTO_IS_NULL=0", :skip_logging) if encoding
|
||||||
end
|
end
|
||||||
|
|
||||||
# Returns an array of record hashes with the column names as keys and
|
# Returns an array of record hashes with the column names as keys and
|
||||||
|
|
Loading…
Reference in New Issue