mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
exec_prepared is GVL friendly, so lets use it.
also increase the version of pg required so that people will get the GVL friendly version
This commit is contained in:
parent
25e1e8cd75
commit
aeb917d475
2 changed files with 3 additions and 5 deletions
2
Gemfile
2
Gemfile
|
@ -81,7 +81,7 @@ platforms :ruby do
|
|||
gem 'sqlite3', '~> 1.3.6'
|
||||
|
||||
group :db do
|
||||
gem 'pg', '>= 0.11.0'
|
||||
gem 'pg', '>= 0.15.0'
|
||||
gem 'mysql', '>= 2.9.0'
|
||||
gem 'mysql2', '>= 0.3.13'
|
||||
end
|
||||
|
|
|
@ -13,7 +13,7 @@ require 'active_record/connection_adapters/postgresql/database_statements'
|
|||
require 'arel/visitors/bind_visitor'
|
||||
|
||||
# Make sure we're using pg high enough for PGResult#values
|
||||
gem 'pg', '~> 0.11'
|
||||
gem 'pg', '~> 0.15'
|
||||
require 'pg'
|
||||
|
||||
require 'ipaddr'
|
||||
|
@ -596,9 +596,7 @@ module ActiveRecord
|
|||
}
|
||||
|
||||
log(sql, name, type_casted_binds, stmt_key) do
|
||||
@connection.send_query_prepared(stmt_key, type_casted_binds.map { |_, val| val })
|
||||
@connection.block
|
||||
@connection.get_last_result
|
||||
@connection.exec_prepared(stmt_key, type_casted_binds.map { |_, val| val })
|
||||
end
|
||||
rescue ActiveRecord::StatementInvalid => e
|
||||
pgerror = e.original_exception
|
||||
|
|
Loading…
Reference in a new issue