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

People
Owner: Nobody in particular
Requestors: sveta.smirnova [...] oracle.com
Cc:
AdminCc:

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



Subject: Must explicitly finish() prepared procedure CALLs when autocommit is off
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 892
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 http://stackoverflow.com/questions/9990464/perl-mysql-procedure-with-insert-and-select-fai... and http://stackoverflow.com/questions/6454840/dbi-begin-work-doesnt-work-with-stored-procedur... 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;
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-17745-1360946489-266.83349-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
From: sveta.smirnova [...] oracle.com
X-RT-Original-Encoding: utf-8
Content-Length: 92
This bug was originally reported by Mike Pomraning at http://bugs.mysql.com/bug.php?id=64857
X-RT-Interface: REST
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
RT-Message-ID: <rt-4.0.18-25844-1510688659-1374.83349-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 78


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.