Skip Menu |

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

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

Owner: Nobody in particular
Requestors: sveta.smirnova [...]

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

Subject: Must explicitly finish() prepared procedure CALLs when autocommit is off
Download (untitled) / with headers
text/plain 892b
Description: With AutoCommit disabled, calling $dbh->commit() on a transaction with an un-finish()ed prepared statement handle which CALLs a procedure will generate "Commands out of sync; you can't run this command now" The problem disappears if the end-user manually calls finish(), or if AutoCommit is enabled (even if within a user transaction). However, per the DBI docs, explicitly calling finish() shouldn't ever really be necessary. See and How to repeat: #!/usr/bin/env perl use strict; use warnings; use DBI; my $d = DBI->connect(@ARGV, { AutoCommit => 0, RaiseError => 1 }); $d->do("CREATE PROCEDURE p() SELECT 1"); my $p1 = $d->prepare('CALL p()'); $p1->execute; $p1->fetch; $d->commit;
From: sveta.smirnova [...]
This bug was originally reported by Mike Pomraning at

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to