Transaction names can't be > 64 chars on MySQL
Reported by Carl | June 16th, 2008 @ 10:40 AM
When executing XA START 'domU-12-31-38-00-A0-A5.compute-1.internal:26478:1213630348.41891:8';, I got this error:
~ 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 '' at line 1 - (MysqlError)
However, if I reduce the length of the txn name to 64 chars or less, it works. Since there transaction names are generated automatically, the code should take care of this.
Comments and changes to this ticket
-
-
Carl June 16th, 2008 @ 01:15 PM
I'm sending the patch we developed here. We made it for MySQL only but it could probably be useful for all DBs as well.
Basically, we just hash the ID using SHA2. It gives 64 bytes as required. Personally, I couldn't care less about having a "readable" transaction ID.
-
Bernerd Schaefer July 14th, 2008 @ 09:07 AM
- → State changed from new to resolved
- → Tag changed from to bug mysql transactions
Thanks for the fix, Carl. I went ahead and applied it (in c255f42) to data_objects/transaction.rb when @id is set, so that all the adapters get this.
-
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
