> 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 [EMAIL PROTECTED] 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.

---
Kevin Benton
Perl/Bugzilla Developer/Administrator, Perforce SCM Administrator
AMD - ECSD Software Validation and Tools
 
The opinions stated in this communication do not necessarily reflect the
view of Advanced Micro Devices and have not been reviewed by management.
This communication may contain sensitive and/or confidential and/or
proprietary information.  Distribution of such information is strictly
prohibited without prior consent of Advanced Micro Devices.  This
communication is for the intended recipient(s) only.  If you have
received this communication in error, please notify the sender, then
destroy any remaining copies of this communication.




Reply via email to