Skip Menu |

This queue is for tickets about the DBD-mysql CPAN distribution.

Report information
The Basics
Id: 15803
Status: resolved
Priority: 0/
Queue: DBD-mysql

People
Owner: Nobody in particular
Requestors: tyler [...] yi.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 3.0002
Fixed in: (no value)



Subject: DBD::mysql doesn't follow DBI's documented begin_work / AutoCommit behaviour
DBD::mysql does not follow the DBI specification for AutoCommit behaviour. According to the documentation for the "begin_work" method: --snip-- $rc = $dbh->begin_work or die $dbh->errstr; Enable transactions (by turning "AutoCommit" off) until the next call to "commit" or "rollback". After the next "commit" or "roll- back", "AutoCommit" will automatically be turned on again. If "AutoCommit" is already off when "begin_work" is called then it does nothing except return an error. If the driver does not support transactions then when "begin_work" attempts to set "AutoCommit" off the driver will trigger a fatal error. --snip-- I have a database handle with AutoCommit turned on. However, even after issuing a "begin_work" statement, I get these warnings: commit ineffective with AutoCommit enabled at migrate-database-schema line 96. Commmit ineffective while AutoCommit is on at migrate-database-schema line 96. It is also odd that I received two warnings for this same error.
From: tyler [...] yi.org
I should also note that other transactions are started and finished on the same database handle inside of the "begin_work ... commit" block. Could this be causing it? Using DBD::Pg, everything seems to work fine with sub-transactions.
MySQL doesn't support sub-transactions.
Subject: Re: [rt.cpan.org #15803] DBD::mysql doesn't follow DBI's documented begin_work / AutoCommit behaviour
Date: Thu, 28 Dec 2006 19:19:42 -0800
To: Jim Winstead via RT <bug-DBD-mysql [...] rt.cpan.org>
From: Tyler MacDonald <tyler [...] yi.org>
Jim, Subtransactions aren't the only oddity in this bug. The issue is that I can not have "AutoCommit" turned on, switch it off temporarily, and do my own begin_work/commit's. Pg's subtransaction support is lacking too, that's why I wrote this: http://search.cpan.org/~crakrjack/DBIx-Transaction-0.008/ Please reopen this bug and have a look at at fixing it :) Thanks!!! - Tyler Jim Winstead via RT <bug-DBD-mysql@rt.cpan.org> wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=15803 > > > MySQL doesn't support sub-transactions. >
--