Edit report at http://bugs.php.net/bug.php?id=54583&edit=1

 ID:                 54583
 Updated by:         u...@php.net
 Reported by:        an0nym at narod dot ru
 Summary:            Segfault when trying to reexecute statement after
                     exception with libmysql
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            PDO related
 Operating System:   CentOS 5.5 x86_64
 PHP Version:        5.3.6
 Block user comment: N
 Private report:     N

 New Comment:

Which version of libmysql is used, what's the server version?


Previous Comments:
------------------------------------------------------------------------
[2011-04-22 17:23:13] an0nym at narod dot ru

Everything works fine with php5.3.5 + mysqlnd @ winsrv2008r2x64. So it
seems that 

the error is with libmysql only.

------------------------------------------------------------------------
[2011-04-21 11:56:55] an0nym at narod dot ru

Try new test code, please. I will submit backtrace when I manage to
generate it.

------------------------------------------------------------------------
[2011-04-21 11:54:42] an0nym at narod dot ru

It seems you don't have strict mode enabled. 

Try this.



<?php

$DB = new PDO("mysql:dbname=test;host=localhost", "root", "",

    array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,

          PDO::ATTR_EMULATE_PREPARES => false,

          PDO::MYSQL_ATTR_INIT_COMMAND => "SET SQL_MODE =
'STRICT_ALL_TABLES'"));

$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();

------------------------------------------------------------------------
[2011-04-21 11:28:22] johan...@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

Works for me with libmysql and mysqlnd. Please provide a stacktrace and
the version of libmysql you are using.

------------------------------------------------------------------------
[2011-04-21 08:29:44] an0nym at narod dot ru

There was a similar problem that was patched in PHP 5.3.6.
http://bugs.php.net/53551

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    http://bugs.php.net/bug.php?id=54583


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=54583&edit=1

Reply via email to