In a python script I got a structure like this:
# Many request checks
# A zSQl method deleting some old data
errors = [ ]
for data in list:
# Other checks
# Inserts in mysql database
raise "An Error with list of error: %s" % ', '.join(errors)
# --- cut ---
The problem is that the raise is not rolling back the delete, looking in
mysql log the following sequence was found:
[the insert statements]
--Begin transaction !!
[delete statement again] !!
We tried it many times and revised our code. The only solution was to
put the delete statement in weird block like this:
As if the rollback was only effective against a "2nd level" instruction.
This is a really odd behavior but with this trick the rollback was done
Has anyone ever seen this?
Luiz Fernando B. Ribeiro
Zope maillist - Zope@zope.org
** No cross posts or HTML encoding! **
(Related lists -