aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-08-05 09:43:38 -0700
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-08-05 09:43:38 -0700
commit03eae19e4d2f1ea1975af79668859c3a9533fa6d (patch)
tree3d24bff35d178235cea5754cc8546a925784c39a /activerecord
parentb2d70782cff6e44943fcfca92c1f3f342e7ce785 (diff)
parent76a58e1e7e10d71ac47aa2a17e6436aca1b506fb (diff)
downloadrails-03eae19e4d2f1ea1975af79668859c3a9533fa6d.tar.gz
rails-03eae19e4d2f1ea1975af79668859c3a9533fa6d.tar.bz2
rails-03eae19e4d2f1ea1975af79668859c3a9533fa6d.zip
Merge pull request #11762 from peterkovacs/patch-2
Free result_metadata directly instead of freeing 2nd, redundant call.
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/connection_adapters/mysql_adapter.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
index 1826d88500..fbe6ecf5f1 100644
--- a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
@@ -507,12 +507,12 @@ module ActiveRecord
cols = cache[:cols] ||= metadata.fetch_fields.map { |field|
field.name
}
+ metadata.free
end
result_set = ActiveRecord::Result.new(cols, stmt.to_a) if cols
affected_rows = stmt.affected_rows
- stmt.result_metadata.free if cols
stmt.free_result
stmt.close if binds.empty?