As Will writes, I use transactions within DBD::mysql with MySQL 5 but
ONLY if using innodb tables. i.e. you need to add the innodb to the
create table defn.

Typically, I ignore Autocommit and do a $dbh->begin_work then
a $dbh->commit - works fine so long as you remember transaction
timeout which can be adjusted in the innodb section of mysql.conf
(I think the default is something like 30s).

Martin

Rutherdale, Will wrote:
Others on this list may know more about the MySQL specifics, but in
general DBI has transaction support for all databases.

You turn it on in DBI with this:

$dbh->{AutoCommit} = 0;

Or by setting AutoCommit to 0 in the connect() parameters.

Consult the man pages for more information.

-Will


-----Original Message-----
From: Mary Anderson [mailto:[EMAIL PROTECTED] Sent: Friday 03 March 2006 15:00
To: dbi-users@perl.org
Subject: DBI support transactions on MySQL 5.0?



Hi,

    MySQL supports transactions on INNOB tables.  Does this mean that
DBI
on MySQL has transaction support?  Do I have to set any variables on
MySQL
to support the transactions does support.

mary anderson



- - - - - Appended by Scientific Atlanta a cisco company - - - - - This e-mail and any attachments may contain information which is confidential, proprietary, privileged or otherwise protected by law. The information is solely intended for the named addressee (or a person responsible for delivering it to the addressee). If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete it from your computer.




Reply via email to