This project is archived and is in readonly mode.
MySQL reconnect value doesn't stick
Reported by Dov Murik | January 26th, 2009 @ 03:07 PM | in 2.x
The MySQL reconnect value which was added in commit 9051da90e4da2ab0db16530a7f7568e24a0ccaed doesn't stick, because the mysql gem sets it to false inside real_connect().
The attached patch fixes this problem, and also allows the user to set the value of the reconnect attribute by adding
reconnect: true
to database.yml
(again, this is relevant to mysql
only).
The default of this attribute is false in order not to change the behaviour of existing applications.
See discussion in http://groups.google.com/group/r...
Related to #1293
Note that I ran the tests of this patch on Mac OS X 10.5.6 and MySQL 5.0.67 .
Comments and changes to this ticket
-
Repository January 26th, 2009 @ 08:57 PM
- State changed from new to committed
(from [e5c211c5eb6e8f1651130b7aa0a5291e5d184ab4]) Mysql#reconnect is set according to the 'reconnect' key in the connection spec.
The 'reconenct' boolean option is read from the connection specification and is used to set the reconnect attribute of Mysql. The default is false in order not to change existing application behaviour.
Also, reconnect is set AFTER real_connect is called, so its value sticks (the mysql gem sets reconnect to false inside real_connect).
Signed-off-by: Michael Koziarski michael@koziarski.com [#1797 state:committed] http://github.com/rails/rails/co...
-
Repository January 26th, 2009 @ 08:57 PM
(from [5fe6635e05a18b312c47fe6bbbaf88fd62e7703d]) Mysql#reconnect is set according to the 'reconnect' key in the connection spec.
The 'reconenct' boolean option is read from the connection specification and is used to set the reconnect attribute of Mysql. The default is false in order not to change existing application behaviour.
Also, reconnect is set AFTER real_connect is called, so its value sticks (the mysql gem sets reconnect to false inside real_connect).
Signed-off-by: Michael Koziarski michael@koziarski.com [#1797 state:committed] http://github.com/rails/rails/co...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Tags
Referenced by
- 1797 MySQL reconnect value doesn't stick Signed-off-by: Michael Koziarski michael@koziarski.com [#...
- 1797 MySQL reconnect value doesn't stick Signed-off-by: Michael Koziarski michael@koziarski.com [#...
- 6266 Cannot execute mysql "LOAD DATA LOCAL INFILE" query after using verify_active_connections! Note also #1797 which fixes the :reconnect option if you ...