You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pry(main)> ActiveRecord::Base.connection.execute("SHOW VARIABLES LIKE \"wait_timeout\"").to_a
=> [["wait_timeout", "2147483"]]
I believe the culprit is the Integer/Fixnum check here, which was introduced as some sort of backwards compatibility, because wait_timeout was also used by the connection pool configuration.
There is no way to get the parameter typed as Integer when using a DATABASE_URL, which seems like undesirable behaviour from my point of view.
Expected behavior
The configured wait_timeout should be 60 all connections.
Actual behavior
The configured wait_timeout is the default of 2147483 on all connections.
System configuration
Rails version:
Tested with ActiveRecord 4.2.7.1, possibly more versions affected.
Ruby version:
Tested with ruby 2.3.1
The text was updated successfully, but these errors were encountered:
Steps to reproduce
Using the mysql2 gem, open a console with DATABASE_URL using
wait_timeout
configuration, e.g.:DATABASE_URL="mysql2://localhost:3306/test-db?wait_timeout=60&checkout_timeout=42" bundle exec rails console
I believe the culprit is the Integer/Fixnum check here, which was introduced as some sort of backwards compatibility, because
wait_timeout
was also used by the connection pool configuration.There is no way to get the parameter typed as
Integer
when using a DATABASE_URL, which seems like undesirable behaviour from my point of view.Expected behavior
The configured
wait_timeout
should be 60 all connections.Actual behavior
The configured
wait_timeout
is the default of 2147483 on all connections.System configuration
Rails version:
Tested with ActiveRecord 4.2.7.1, possibly more versions affected.
Ruby version:
Tested with ruby 2.3.1
The text was updated successfully, but these errors were encountered: