diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2015-10-11 16:44:49 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2015-10-15 13:18:21 +0900 |
commit | d39b6f77fc75790b1b2b3c5201bb037645d01483 (patch) | |
tree | 07175c2ed7f653672f7d6215a9297d68625fbc49 /activerecord/lib | |
parent | d9e74ace9f0d0bba39c3b836b3d79b059d516eb0 (diff) | |
download | rails-d39b6f77fc75790b1b2b3c5201bb037645d01483.tar.gz rails-d39b6f77fc75790b1b2b3c5201bb037645d01483.tar.bz2 rails-d39b6f77fc75790b1b2b3c5201bb037645d01483.zip |
Add stored procedure test in mysql2
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb index 4461722bb4..6d5f31c6ca 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb @@ -126,7 +126,9 @@ module ActiveRecord # Returns an array of arrays containing the field values. # Order is the same as that returned by +columns+. def select_rows(sql, name = nil, binds = []) - execute(sql, name).to_a + result = execute(sql, name) + @connection.next_result while @connection.more_results? + result.to_a end # Executes the SQL statement in the context of this connection. @@ -142,6 +144,7 @@ module ActiveRecord def exec_query(sql, name = 'SQL', binds = []) result = execute(sql, name) + @connection.next_result while @connection.more_results? ActiveRecord::Result.new(result.fields, result.to_a) end |