Skip Menu |

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

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

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

Bug Information
Severity: Normal
Broken in: 4.004
Fixed in: 4.006



Subject: Using mysql_server_prepare causes segmentation fault
Originally reported by Jeff Rife at http://bugs.mysql.com/bug.php?id=27421 Description: Repeatedly executing any prepared statement with a placeholder parameter causes a segmentation fault if "mysql_server_prepare" has been set. The value of the parameter passed doesn't seem to matter, nor does calling "finish" (although I thought that was the issue, so that's why I did it). This happens for all users and regardless of whether the connection is local or via TCP/IP. How to repeat: use DBI; my $dbh = DBI->connect('DBI:mysql:mysql_server_prepare=1'); # any prepare with a placeholder parameter will exhibit the symptoms my $sth = $dbh->prepare("SELECT * FROM mytable WHERE a = ?"); print "About to execute #1"; $sth->execute(1); print "Finished #1"; $sth->finish(); print "About to execute #2"; $sth->execute(1); # Segmentation fault here print "Finished #2"; $sth->finish(); See original report for more details.
On Str Feb 20 17:50:32 2013, svetasmirnova wrote: Show quoted text
> Originally reported by Jeff Rife at http://bugs.mysql.com/bug.php?id=27421 > > Description: > Repeatedly executing any prepared statement with a placeholder parameter > causes a segmentation fault if "mysql_server_prepare" has been set. > > The value of the parameter passed doesn't seem to matter, nor does > calling "finish" (although I thought that was the issue, so that's why I > did it). > > This happens for all users and regardless of whether the connection is > local or via TCP/IP. > > How to repeat: > use DBI; > my $dbh = DBI->connect('DBI:mysql:mysql_server_prepare=1'); > > # any prepare with a placeholder parameter will exhibit the symptoms > my $sth = $dbh->prepare("SELECT * FROM mytable WHERE a = ?"); > > print "About to execute #1"; > $sth->execute(1); > print "Finished #1"; > $sth->finish(); > > print "About to execute #2"; > $sth->execute(1); # Segmentation fault here > print "Finished #2"; > $sth->finish(); > > See original report for more details.
Already fixed by commit https://github.com/perl5-dbi/DBD-mysql/commit/548170978dbd687bd993174025272558198752d4 in version 4.006 (in year 2007).