Skip Menu |

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

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

People
Owner: CAPTTOFU [...] cpan.org
Requestors: j.raspass [...] cv-library.co.uk
Cc: k.spice [...] cv-library.co.uk
t.retout [...] cv-library.co.uk
AdminCc:

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



CC: k.spice [...] cv-library.co.uk, t.retout [...] cv-library.co.uk
Subject: AutoCommit isn't restored after reconnect when starting a transaction
If the first command on a disconnected handle with auto_reconnect set is a begin_work it will be die like so: perl -MDBI -e 'my$d=DBI->connect("DBI:mysql:host=xxx","xxx","xxx",{mysql_auto_reconnect=>1});$d->disconnect;$d->begin_work;$d->commit' DBD::mysql::db begin_work failed: Turning off AutoCommit failed at -e line 1. However if you do anything else before starting the transaction then all is well: perl -MDBI -e 'my$d=DBI->connect("DBI:mysql:host=master.db.cv-library.co.uk","root","defiant1764",{mysql_auto_reconnect=>1});$d->disconnect;$d->do("SELECT 1");$d->begin_work;$d->commit' Tested on perl 5.14.2 with DBD::mysql 4.031
Ah yes, accidental leakage of the test DB's credentials in that bug report, those credentials have now been retired. Whoops :-P
Do we have any progress on this? The problem still exists in 4.041. It doesn't look like there was in fix in 4.042, but can anyone confirm that? I appreciate that this may not be the most important development problem right now but I can confirm, fortunately, that the simple workaround seems to work well. Thanks, James, for including it.
Yes, thank you for reminding me. I'll be looking at this.