_mysql_exceptions.NotSupportedError
I get a "_mysql_exceptions.NotSupportedError: (1196 "Warning: Some non-transactional changed tables couldn't be rolled back.")" error at seemingly random intervals. It happens when inserting a record into a table through a ZSQL method, but not every time. The site user can go back to the form from the error page (with the browser's back button) and resubmit the form and it will work fine the second time. If I check the database after receiving the error and before retrying, the record is there. Retrying produces a duplicate record. Since it succeeded, nothing should need to be rolled back, which makes the error message hard to understand. In any case, my tables are in MyISAM format and don't support rollbacks. My current theory is that this happens when one transaction follows too quickly after another in the same table. It never happens when I test the ZSQL method and it seems to happen a lot less often if I call the offending ZSQL method from a script that has a time-wasting for loop between it and the prior ZSQL method. Has anyone else experienced this? Found a solution? And what's the best way, within a Python script, to pause a half-second or so without slowing other processes? Thanks. Versions: Zope version 2.4.1 Python 2.1.1 ZMySQLDA version 2.0.8 MySQL-Python version 0.9.1 mysqld version 3.23.36 Red Hat Linux version 7.1 Zope and mysqld are on the same machine. -- Carl Batten
On Thu, 2002-02-21 at 20:29, Carl Batten wrote:
I get a "_mysql_exceptions.NotSupportedError: (1196 "Warning: Some non-transactional changed tables couldn't be rolled back.")" error at seemingly random intervals. It happens when inserting a record into a table through a ZSQL method, but not every time. The site user can go back to the form from the error page (with the browser's back button) and resubmit the form and it will work fine the second time.
If I check the database after receiving the error and before retrying, the record is there. Retrying produces a duplicate record. Since it succeeded, nothing should need to be rolled back, which makes the error message hard to understand. In any case, my tables are in MyISAM format and don't support rollbacks.
Apparently your MySQL server does support transactions, even though you are not using transaction-safe tables. Add a dash (-) to the beginning of your connection string and that will solve one problem (rollback is triggered by a ConflictError) and create another (you'll still be getting the ConflictErrors, you just won't see them). Real solution is to use a transactional database (MySQL-Max with InnoDB tables, Postgresql, etc.).
ZMySQLDA version 2.0.8 MySQL-Python version 0.9.1 mysqld version 3.23.36
You might also try ZMySQLDA 2.0.9 (current test release, will become the real release soon, no problems found, and some fixed). -- Andy Dustman PGP: 0x930B8AB6 @ .net http://dustman.net/andy You can have my keys when you pry them from my dead, cold neurons.
participants (2)
-
Andy Dustman -
Carl Batten