提交 efc10a8a 编写于 作者: A Aaron Patterson

eliminating some calls to execute()

上级 050d7d3e
......@@ -307,10 +307,7 @@ def reset!
def select_rows(sql, name = nil)
@connection.query_with_result = true
result = execute(sql, name)
rows = []
result.each { |row| rows << row }
result.free
rows = exec_without_stmt(sql, name).rows
@connection.more_results && @connection.next_result # invoking stored procedures with CLIENT_MULTI_RESULTS requires this to tidy up else connection will be dropped
rows
end
......@@ -389,7 +386,7 @@ def update_sql(sql, name = nil) #:nodoc:
end
def begin_db_transaction #:nodoc:
execute "BEGIN"
exec_without_stmt "BEGIN"
rescue Exception
# Transactions aren't supported
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册