[Zope-DB] RE: NotSupportedError - ZMySQLDA -- actually a DTML error, change the connection string...

Chris Keyes chrisk@nipltd.com
Tue, 4 Sep 2001 15:14:40 +0100


Hi All

To confirm to anyone following this:-

Yes I had made a DTML error, so Zope tried to roll back the transaction.
my MySQL tables are not set up to support transactions, so, zope raises an
error.
This error is then reported, hiding the underlying error in the DTML.

So, to find out what the error was I needed to disable the transactions

To disable Transactions start the conection string with a '-'

so:
database@server username password
becomes
-database@server username password

So the error over the transaction is no longer raised, and zope can display
the error message telling me I've been stupid ;-)

Of course this does mean that the database may not be correct, as the
rollback does not occur, but in my case, its not a problem...

Hope thats a useful summary of what everyone has said to me :-)

Cheer to everyone for their help

ChrisK

----- Original Message -----
From: "Matthew T. Kromer" <matt@zope.com>
To: "Chris Keyes" <chrisk@nipltd.com>
Cc: <zope-db@zope.org>
Sent: Tuesday, September 04, 2001 2:48 PM
Subject: Re: [Zope-DB] NotSupportedError - ZMySQLDA -- Help! ;-)


> OK, here's a good non-authoritative answer: contact the maintainer, Andy
> Dustman.  Its a judgement call as to whether or not the DA is correct
> raising a NotSupportedError -- in this case, it feels like the
> transaction is being rolled back by Zope, which might happen if you have
> a DTML error on a page which is unrelated to the database function.  The
> way I read the message, the database is warning you that some data you
> changed cannot be undone.
> The DA shouldn't necessarily eat this, because it means the whole
> transaction couldn't be rolled back.
>
> I'm not enough of a MySQL guy to know more about when it raises that
> particular error.
>
> Chris Keyes wrote:
>
> >When using ZMySQLDA to update a row in a table, we get the following
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/zope/2.4.0_base/lib/python/ZPublisher/Publish.py, line
> >223, in publish_module
> >  File /usr/local/zope/2.4.0_base/lib/python/ZPublisher/Publish.py, line
> >179, in publish
> >  File /usr/local/zope/2.4.0_base/lib/python/Zope/__init__.py, line 245,
in
> >abort
> >  File /usr/local/zope/2.4.0_base/lib/python/ZODB/Transaction.py, line
179,
> >in abort
> >  File /usr/local/zope/2.4.0_base/lib/python/Shared/DC/ZRDB/TM.py, line
126,
> >in abort
> >  File /usr/local/hosting/accounts/hosting/Products/ZMySQLDA/db.py, line
> >297, in _abort
> >NotSupportedError: (1196, "Warning:  Some non-transactional changed
tables
> >couldn't be rolled back")
> >
> >The changes are correctly reflected in the database, however Zope raises
> >this error. When tested using the ZSQL methods test function it completes
> >correctly. Ideas??
> >
> >On the last line of the traceback, the line number 297 should be 296 but
our
> >print statement has raised the number.
> >Zope is 2.4.0 and Python is 2.1. ZMySQLDA is 2.0.7.
> >
> >Thanks for your help
> >Cheers
> >
> >ChrisK and HarryW
> >
>
>
>