4 messages in com.mysql.lists.perlRE: Suddenly $dbh->{AutoCommit}=0 => ...
FromSent OnAttachments
Christian Hammers23 Aug 2006 17:02 
Benton, Kevin24 Aug 2006 09:00 
Christian Hammers24 Aug 2006 09:29 
Christian Hammers25 Aug 2006 02:27 
Subject:RE: Suddenly $dbh->{AutoCommit}=0 => 'Transactions not supported by database'
From:Benton, Kevin (kevi@amd.com)
Date:08/24/2006 09:00:54 AM
List:com.mysql.lists.perl

Some users of the Debian packages I create recently reported that after the upgrade from MySQL 5.0.22 to 5.0.24 Perl scripts that try to explicitly set $dbh->{AutoCommit} = 0; die with the error message: "Transactions not supported by database"

I could verify this but failed to trace down the exact reason due to the confusing perl-xs code :) At least I figured out that * ethereal tells me that the greeting and login request both set the "client knows transactions" flag to 1 * the default for imp_dbh->has_transactions is TRUE in dbdimp.c of DBD::mysql and * that set variable setting triggers dbd_db_STORE_attrib() from dbdimp.c which for some reason thinks that imp_dbh->has_transactions is FALSE.

Has anybody a clue if this really is a recent change or if it should

work?

From the docs... (http://dev.mysql.com/doc/refman/5.1/en/commit.html)

To disable autocommit mode for a single series of statements, use the START TRANSACTION statement:

START TRANSACTION; SELECT @A:=SUM(salary) FROM table1 WHERE type=1; UPDATE table2 SET summary=@A WHERE type=1; COMMIT;

With START TRANSACTION, autocommit remains disabled until you end the transaction with COMMIT or ROLLBACK. The autocommit mode then reverts to its previous state.