aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-11-28 05:09:00 +0900
committerGitHub <noreply@github.com>2017-11-28 05:09:00 +0900
commit924a368f5c654f5304e575c767eb0fc64adc8659 (patch)
treed123f77f3043d7a2e5cb74721861fe970349de7f /activerecord
parentc22ec9710c2aaca75e977db033a613a79b2a5027 (diff)
downloadrails-924a368f5c654f5304e575c767eb0fc64adc8659.tar.gz
rails-924a368f5c654f5304e575c767eb0fc64adc8659.tar.bz2
rails-924a368f5c654f5304e575c767eb0fc64adc8659.zip
Drop mysql2 version less than 0.4.3 to guarantee fork safety (#31244)
Since #31173, mysql2 adapter depends on `automatic_close` which is introduced since mysql2 0.4.3. So the adapter with the mysql2 version before doesn't work with fork now. ``` % ARCONN=mysql2 be ruby -w -Itest test/cases/connection_adapters/connection_handler_test.rb -n test_forked_child_doesnt_mangle_parent_connection Using mysql2 Run options: -n test_forked_child_doesnt_mangle_parent_connection --seed 19988 /Users/kamipo/src/github.com/rails/rails/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb:108:in `discard!': undefined method `automatic_close=' for #<Mysql2::Client:0x00007fedaa91dfd0> (NoMethodError) ``` This drops mysql2 version less than 0.4.3 to guarantee fork safety.
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb2
1 files changed, 1 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 957e8acc90..bfdc7995f0 100644
--- a/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb
@@ -3,7 +3,7 @@
require "active_record/connection_adapters/abstract_mysql_adapter"
require "active_record/connection_adapters/mysql/database_statements"
-gem "mysql2", ">= 0.3.18", "< 0.5", "!= 0.4.3"
+gem "mysql2", "~> 0.4.4"
require "mysql2"
module ActiveRecord