If I create a MySQL prepared stament, use it and latter restart MySQL then 
Sequel receives this error for the next query using the prepared stament:

  !! Unexpected error while processing request: Mysql::Error: Unknown prepared
  statement handler (get_document) given to EXECUTE

I do understand what happens: prepared staments are stored in the server and 
lost on restart.

However, I expect that Sequel could have an automatic way to re-generate the 
prepared staments if it's not recognized by the DB server.

Also, I would like to do it manually by catching the exception, but 
unfortunatelly the raised exception is generic:

  Sequel::DatabaseError: Mysql::Error: Unknown prepared statement
  handler (get_document) given to EXECUTE

This is, by inspecting the exception (Sequel::DatabaseError), I cannot know 
the reason of the failure (parsing the exception reason is not very reliable).



I've also realized that when using MySQL, if the database is stopped (or there 
is a network/socket error) then when performing a query I get the folowing 
exception:

  Mysql::Error - Can't connect to local MySQL server through socket
  '/var/run/mysqld/mysqld.sock'

This is, the raised exception is totally dependant on the adapter. Shouldn't 
Sequel capture these exception and convert them to a generic Sequel exception? 
If not, I should add:
  rescue Mysql::Error, Postgress::ConnectionError ...
and so, which is not very cool.


Best regards.



-- 
Iñaki Baz Castillo <[email protected]>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to