mirror of https://github.com/rails/rails
eliminating some calls to execute()
This commit is contained in:
parent
050d7d3e49
commit
efc10a8a64
|
@ -307,10 +307,7 @@ module ActiveRecord
|
||||||
|
|
||||||
def select_rows(sql, name = nil)
|
def select_rows(sql, name = nil)
|
||||||
@connection.query_with_result = true
|
@connection.query_with_result = true
|
||||||
result = execute(sql, name)
|
rows = exec_without_stmt(sql, name).rows
|
||||||
rows = []
|
|
||||||
result.each { |row| rows << row }
|
|
||||||
result.free
|
|
||||||
@connection.more_results && @connection.next_result # invoking stored procedures with CLIENT_MULTI_RESULTS requires this to tidy up else connection will be dropped
|
@connection.more_results && @connection.next_result # invoking stored procedures with CLIENT_MULTI_RESULTS requires this to tidy up else connection will be dropped
|
||||||
rows
|
rows
|
||||||
end
|
end
|
||||||
|
@ -389,7 +386,7 @@ module ActiveRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
def begin_db_transaction #:nodoc:
|
def begin_db_transaction #:nodoc:
|
||||||
execute "BEGIN"
|
exec_without_stmt "BEGIN"
|
||||||
rescue Exception
|
rescue Exception
|
||||||
# Transactions aren't supported
|
# Transactions aren't supported
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue