List:MySQL and Perl« Previous MessageNext Message »
From:Christian Jaeger Date:December 26 2001 2:29pm
Subject:Another DBD::mysql bug
View as plain text  
Hello

There is also another bug:

connect with autocommit 0ff.
restart mysql
$DB->commit;  # This time it will *NOT* give an error. It seems
           # that this commit is silently optimized away by DBD::mysql?
insert something;
$DB->rollback; # and the above stuff is still inserted into the DB!

So upon reconnect the driver looses it's track of the autocommit 
state. Autocommit is switched on after that.

The above are really two issues, the first being the different 
behaviour of commit in case nothing has been sent to the db so far 
(not a big problem, I'm working around that by first issuing a dummy 
statement after connecting to the db), and the second that of the 
loosing autocommit=off mode.

I'm using DBI::VERSION==1.20 and DBD::mysql::VERSION==2.0902

For those wondering how I get reliable transaction behaviour now, see
http://warehouse.ch/ethlife/www/download/perllib/EL/
(esp. DBI_XML/db.pm and DB.pm)

Christian.
-- 
Christian Jaeger  Programmer & System Engineer  +41 1 430 45 26
ETHLife CMS Project - warehouse.ch/ethlife/www - www.ethlife.ethz.ch
Thread
Another DBD::mysql bugChristian Jaeger26 Dec
  • Re: Another DBD::mysql bugJochen Wiedmann27 Dec