Forum: Ruby on Rails Resend: find problems => patch

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
hgs (Guest)
on 2005-11-12 12:49
(Received via mailing list)
I'm fairly sure I sent a message like this last night but it has not
appeared on the list.  I didn't CC myself because I usually see
messages that I post.  Anyway, pardon any resulting duplication.

I have just had this, and not that MySQL doesn't actually display
where the errror is, only the code after it:

You have an error in your SQL syntax; check the manual that corresponds
to your MySQL server version for the right syntax to use near
'?"00149246       "  LIMIT 1' at line 1

So I'd like to propose a patch of the following form:

--- ./mysql_adapter.rb.orig     2005-11-09 19:15:20.575395000 -0800
+++ ./mysql_adapter.rb  2005-11-09 19:26:23.411710000 -0800
@@ -132,7 +132,7 @@
         elsif exception.message.split(":").first =~ /Packets out of
           raise ActiveRecord::StatementInvalid, "'Packets out of order'
error was received from the database. Please update your mysql bindings
(gem update mysql) and read for more
-          raise
+          raise + ": SQL was: " +

so we can see what the MySQL is when this fails.  Is this a good idea,
right way to do this, etc?

        Thank you,
This topic is locked and can not be replied to.