On Sep 4, 3:37 pm, Iñaki Baz Castillo <[email protected]> wrote: > El Sábado, 5 de Septiembre de 2009, Iñaki Baz Castillo escribió: > > > > > Then I restart MySQL. I've configured a "begin - raise" so if a Sequel DB > > error occurs, I call again DB.set. However I reply "500 Internal Error" to > > the current request, but it should work for the next request. > > > But when this rescue calls "DB.set" I just see the following queries: > > > ---------------------- > > 124 Connect my...@localhost on myapp > > 124 Query SET NAMES latin1 > > 124 Query SET @sequel_arg_1 = '[email protected]/2' > > 124 Query EXECUTE get_document USING @sequel_arg_1 > > ---------------------- > > > Note that the PREPARE query has not taken place, and I get: > > > Sequel::DatabaseError: Mysql::Error: Unknown prepared statement handler > > (get_document) given to EXECUTE > > Ok, in order it to work I must add Sequel.connect into DB.set. This is, if a B > error is raised due to conenction error, then I must invoke *again* > Sequel.connect followed by the prepared stament creation. Then it works. > > Is it the expected behaviour? > > PS: The Mysql::Error exception is still present when the database is stopped.
Try the patch at http://pastie.org/606419.txt, which should fix this error. It should make Sequel detect the disconnection, and remove the connection from the pool. Then, when the database server comes back up, a new connection will be established, and the prepared statement should still work fine. 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 -~----------~----~----~----~------~----~------~--~---
