Menu

MYSQL_OPT_RECONNECT issue

Help
2006-12-29
2012-09-19
  • Markus Gritsch

    Markus Gritsch - 2006-12-29

    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

     
    • Markus Gritsch

      Markus Gritsch - 2006-12-30

      > [...] 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

       
    • Andy Dustman

      Andy Dustman - 2006-12-30

      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.

       
    • Markus Gritsch

      Markus Gritsch - 2006-12-30

      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

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.