aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-02-04 14:19:36 +0900
committerRyuta Kamizono <kamipo@gmail.com>2018-02-04 14:19:36 +0900
commitfe595ecf2f76f3d6f27945babd048c3e94af143a (patch)
tree5587b59cf109570ac52e7d9fa08a8f7b253069e2
parent73d1f5f310e4dc3acb1ea502143d679f99931840 (diff)
downloadrails-fe595ecf2f76f3d6f27945babd048c3e94af143a.tar.gz
rails-fe595ecf2f76f3d6f27945babd048c3e94af143a.tar.bz2
rails-fe595ecf2f76f3d6f27945babd048c3e94af143a.zip
Prefer `@connection.abandon_results!` than `@connection.next_result while @connection.more_results?`
-rw-r--r--activerecord/lib/active_record/connection_adapters/mysql/database_statements.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/mysql/database_statements.rb b/activerecord/lib/active_record/connection_adapters/mysql/database_statements.rb
index 5beaeec9c4..458c9bfd70 100644
--- a/activerecord/lib/active_record/connection_adapters/mysql/database_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/mysql/database_statements.rb
@@ -59,7 +59,7 @@ module ActiveRecord
end
def discard_remaining_results
- @connection.next_result while @connection.more_results?
+ @connection.abandon_results!
end
def exec_stmt_and_free(sql, name, binds, cache_stmt: false)