#392 ✓resolved
Carl

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

    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

    Bernerd Schaefer July 14th, 2008 @ 09:07 AM

    • State changed from “new” to “resolved”
    • Tag set 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.

  • Carl

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Attachments

Pages