On May 4, 11:17 am, cult hero <[email protected]> wrote: > Okay. I'd like to patch this, but I'm gonna need a little bit of help. > Here's what looks relevant: > > MYSQL_DATABASE_DISCONNECT_ERRORS = /\A(Commands out of sync; you can't > run this command now|Can't connect to local MySQL server through > socket|MySQL server has gone away)/ > > raise_error(e, :disconnect=>true) if > MYSQL_DATABASE_DISCONNECT_ERRORS.match(e.message) > > I presume that that passing :disconnect=>true will execute > disconnect_connection. > > **************************************** > > So I'd need to create something like this: > > ODBC_DATABASE_DISCONNECT_ERRORS = /\A(08S01)/ > > raise_error(e, :disconnect=>true) if > ODBC_DATABASE_DISCONNECT_ERRORS.match(e.message)
That looks pretty good, but since the raise_error method calls are already there, maybe just changing: raise_error(e) to: raise_error(e, :disconnect=>ODBC_DATABASE_DISCONNECT_ERRORS.match(e.message)) Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en.
