> [...] and if you really need it, apply the patch.
Hmm, by applying the patch to my local copy of MySQLdb does not solve the issue for other projects which would benefit from the MYSQL_OPT_RECONNECT flag, like SQLObject. A recent discussion there showed that it would really be a good thing if this option would be available, because SQLObject does not use views, temporary tables and session variables, so all the reasons against reconnecting do not apply in this case.
And as the patch implements the reconnect feature as an optionally settable value, no ill effects would occurre in the default case.
I think the patch would really help some people and has no negative effects for the rest who do not care. Please consider applying it.
Kind regards,
Markus
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok. And can you give me a hint on the second question, please? I still wonder how to set the MYSQL_OPT_RECONNECT flag to true using the set_server_option() method which only takes an integer as its single argument.
Kind regards,
Markus
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Andy,
is the patch "Interface to set MYSQL_OPT_RECONNECT"
http://sourceforge.net/tracker/index.php?func=detail&aid=1483074&group_id=22307&atid=374934
going to be included in the version 1.2.2? A recent comment there says that it still correctly applies to 1.2.2.
The related feature request "MYSQL_OPT_RECONNECT support"
http://sourceforge.net/tracker/index.php?func=detail&aid=1479018&group_id=22307&atid=374935
has a comment that says that set_server_option() could be used as a workaround. How exactly has one to use set_server_option() to set MYSQL_OPT_RECONNECT to true?
Kind regards,
Markus
> [...] and if you really need it, apply the patch.
Hmm, by applying the patch to my local copy of MySQLdb does not solve the issue for other projects which would benefit from the MYSQL_OPT_RECONNECT flag, like SQLObject. A recent discussion there showed that it would really be a good thing if this option would be available, because SQLObject does not use views, temporary tables and session variables, so all the reasons against reconnecting do not apply in this case.
And as the patch implements the reconnect feature as an optionally settable value, no ill effects would occurre in the default case.
I think the patch would really help some people and has no negative effects for the rest who do not care. Please consider applying it.
Kind regards,
Markus
I'm not really in a big hurry to apply that one. The feature was turned off by default for a reason, and if you really need it, apply the patch.
Ok. And can you give me a hint on the second question, please? I still wonder how to set the MYSQL_OPT_RECONNECT flag to true using the set_server_option() method which only takes an integer as its single argument.
Kind regards,
Markus