[Zope-DB] MySQL ZSQL Transactions or Commit in Zope?
jibalari at si.ehu.es
Tue May 17 04:33:44 EDT 2005
we have a similar problem. We want to access two databases each of them
with its corresponding
Z MySql Database connection. We want to:
1- Insert record A into ERREUS database
2- Get auto_increment id for record A
3- Insert record B into IRAKAZI database with auto_increment id.
when we execute steps 1 and 2 within a python script, it's correct.
when we execute steps 2 and 3 within a python script, it's correct.
but, if we want to execute all the steps together we receive this message:
*Error Type: OperationalError*
*Error Value: (1205, 'Lock wait timeout exceeded; Try restarting
Can someone help us, please?
>Date: Sun, 15 May 2005 16:30:38 -0400
>From: "Michael Schwartz" <mike at ziacom.us>
>Subject: [Zope-DB] MySQL ZSQL Transactions or Commit in Zope?
>To: <zope-db at zope.org>
>Message-ID: <001901c5598c$f4a82180$bea50a0a at AJI>
>Content-Type: text/plain; charset="us-ascii"
>I am trying to find sample code for performing transactions in ZSQL with
>mysql 4.1. I'd like to do something like this:
>1 - Insert record A into USER table
>2 - Get auto_increment id for record A
>3 - Insert record B into WIDGET table with auto_increment id from
>But if step 3 fails, I want to undo step 1.
>Do I need to back out manually?
>Thanks in advance!
More information about the Zope-DB