From:
Operating system: CentOS 5.5 x86_64
PHP version: 5.3.6
Package: PDO related
Bug Type: Bug
Bug description:Segfault when trying to reexecute statement after exception
with libmysql
Description:
------------
PHP segfaults when prepared statement that threw an exception is
reexecuted. pdo_mysql, libmysql. Haven't tested with mysqlnd yet.
Test script:
---------------
<?php
$DB = new PDO("mysql:dbname=test;host=localhost", "root", "",
array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_EMULATE_PREPARES => false));
$DB->exec("CREATE TEMPORARY TABLE t(f VARCHAR(1))");
$stmt = $DB->prepare("INSERT INTO t VALUES(:value)");
$value = "aa";
$stmt->bindParam(":value", $value);
try {
$stmt->execute();
} catch (PDOException $e) {}
$stmt->execute();
Expected result:
----------------
Script successfully executed
Actual result:
--------------
Segmentation fault
--
Edit bug report at http://bugs.php.net/bug.php?id=54583&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=54583&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=54583&r=trysnapshot53
Try a snapshot (trunk):
http://bugs.php.net/fix.php?id=54583&r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=54583&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=54583&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=54583&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=54583&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=54583&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=54583&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=54583&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=54583&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=54583&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=54583&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=54583&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54583&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=54583&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=54583&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=54583&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=54583&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=54583&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=54583&r=mysqlcfg