[Zope] Re: mysql error...

Sam Peterson skpeterson at ucdavis.edu
Fri Aug 8 12:39:57 EDT 2003


---Kevin Carlson said on Sunday, Jul 27 2003:
> Chris,
> 
> I have seen this happen before and it's not always a MySQL error.  My 
> guess is that you are using MySQL with MyISAM tables that do not support 
> transactions.  This error can be caused by a bug in a dtml 
> method/document or a python script that occurs after the call to a ZSql 
> method.  When the zope transaction fails, it tries to rollback the MySQL 
> transaction which is not supported and throws yet another exception.
> 
> I'd look at the rest of the script that contains the call to the ZSql 
> method and see if there's not a bug in there somewhere.
> 
> Kevin
> 
> Chris Bowlby wrote:
> 
> >Hi All,
> >
> > Got an issue with a search feature that was configured by a client of 
> >mine, when they choose to search using a keyword, they get this error:
> >
> >
> >Site Error
> >
> >An error was encountered while publishing this resource.
> >
> >_mysql_exceptions.NotSupportedError
> >Sorry, a site error occurred.
> >
> >
> >Traceback (innermost last):
> >  File /usr/local/www/Zope/lib/python/ZPublisher/Publish.py, line 150, 
> >in publish_module
> >  File /usr/local/www/Zope/lib/python/ZPublisher/Publish.py, line 106, 
> >in publish
> >  File /usr/local/www/Zope/lib/python/Zope/__init__.py, line 182, in 
> >abort
> >  File /usr/local/www/Zope/lib/python/ZODB/Transaction.py, line 107, 
> >in abort
> >  File /usr/local/www/Zope/lib/python/Shared/DC/ZRDB/TM.py, line 60, 
> >in abort
> >  File /usr/local/www/Zope/lib/python/Products/ZMySQLDA/db.py, line 
> >328, in _abort
> >NotSupportedError: (1196, "Warning:  Some non-transactional changed 
> >tables couldn't be rolled back")
> >
> >I'm not much of a Zope user/admin, so someone might need to be really 
> >specific about what this error actually means, it seems to be that a 
> >table might be missing from the mysql datatbase, but I need some 
> >confirmation on that, also if that is the case, where would I get the 
> >schema for this table..
> >
> >
> >

I've had this error before when trying to use two ZSQL methods in one
script with the MySQL DA.  To get around the problem, turn the two
ZSQL methods into one ZSQL method.  You can do this by seperating two
SQL scripts in one ZSQL method by <dtml-var sql_delimiter>.  This
prevents the DA from trying to use transactions.

It kinda sucks, but it's due to MySQL ISAM tables having no support
for transactions.  You might try another table type that supports
transactions and see if that helps.

-- 
Sam Peterson
skpeterson at ucdavis.edu
530-752-9332
Hart Interdisciplinary Programs, University of California, Davis



More information about the Zope mailing list