Open mbeijen opened 7 years ago
@CaptTofu
Such a big issue as this one not addressed yet? How can it be possible? Does doing something like:
eval {
local $dbh->{'AutoCommit'} = 0;
};
...
could workaround the issue?
@CaptTofu
My previous workaround doesn't work. The following monkey patch work, even through that not the best to do...
{
no warnings qw/ once redefine /;
*DBD::_::db::begin_work = sub {
my $dbh = shift;
return $dbh->set_err($DBI::stderr, "Already in a transaction")
unless $dbh->FETCH('AutoCommit');
$dbh->ping(); # Make sure that connection is alive (mysql_auto_reconnect)
$dbh->STORE('AutoCommit', 0); # will croak if driver doesn't support it
$dbh->STORE('BegunWork', 1); # trigger post commit/rollback action
return 1;
};
}
Can you check if this problem is still present in DBD::MariaDB? https://metacpan.org/release/PALI/DBD-MariaDB-0.90_01
@pali
Of course, I'll install it and let you know.
Migrated from rt.cpan.org#105382 (status was 'open')
Requestors:
From jraspass@gmail.com on 2015-06-19 16:02:42:
From jraspass@gmail.com on 2015-06-19 17:21:20:
From pjcj@cpan.org on 2017-08-03 14:43:24:
From capttofu@cpan.org on 2017-08-14 18:08:40: