multiple variable assignments can done in a single query

This commit is contained in:
Brian Lopez 2010-08-17 22:55:31 -07:00
parent d962ef2583
commit 60c33be87c
1 changed files with 2 additions and 3 deletions

View File

@ -606,12 +606,11 @@ module ActiveRecord
def configure_connection
@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.
# 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
# Returns an array of record hashes with the column names as keys and