diff options
author | Michael Koziarski <michael@koziarski.com> | 2008-11-07 07:31:01 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-11-07 07:31:59 +0000 |
commit | 9d4337ea13be371fd3fbf3ca8ba467e810888c37 (patch) | |
tree | d1a84a716741003d5e992682995426c0a8790fb8 /activerecord/lib | |
parent | 77697e03353ec06a4b12f42a32d7569797d1eb8f (diff) | |
download | rails-9d4337ea13be371fd3fbf3ca8ba467e810888c37.tar.gz rails-9d4337ea13be371fd3fbf3ca8ba467e810888c37.tar.bz2 rails-9d4337ea13be371fd3fbf3ca8ba467e810888c37.zip |
Revert commit which breaks all the tests.
This reverts commit 8adb79b9b5983cda8dbdd4ef401661fbd51d8844.
Conflicts:
activerecord/CHANGELOG
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/mysql_adapter.rb | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb index edf54026ff..1e452ae88a 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb @@ -305,12 +305,8 @@ module ActiveRecord rows end - def execute(sql, name = nil, skip_logging = false) #:nodoc: - if skip_logging - @connection.query(sql) - else - log(sql, name) { @connection.query(sql) } - end + def execute(sql, name = nil) #:nodoc: + log(sql, name) { @connection.query(sql) } rescue ActiveRecord::StatementInvalid => exception if exception.message.split(":").first =~ /Packets out of order/ raise ActiveRecord::StatementInvalid, "'Packets out of order' error was received from the database. Please update your mysql bindings (gem install mysql) and read http://dev.mysql.com/doc/mysql/en/password-hashing.html for more information. If you're on Windows, use the Instant Rails installer to get the updated mysql bindings." @@ -441,7 +437,7 @@ module ActiveRecord def columns(table_name, name = nil)#:nodoc: sql = "SHOW FIELDS FROM #{quote_table_name(table_name)}" columns = [] - execute(sql, name, true).each { |field| columns << MysqlColumn.new(field[0], field[4], field[1], field[2] == "YES") } + execute(sql, name).each { |field| columns << MysqlColumn.new(field[0], field[4], field[1], field[2] == "YES") } columns end @@ -559,7 +555,7 @@ module ActiveRecord # 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", "ID NULL OFF", true) + execute("SET SQL_AUTO_IS_NULL=0") end def select(sql, name = nil) |