Bug #55104 [Opn->Fbk]: Calling mysqli::get_attr() leads php to crash.
| From: | aharvey@php.net | Date: | Fri, 01 Jul 2011 15:48:16 +0000 |
| Subject: | Bug #55104 [Opn->Fbk]: Calling mysqli::get_attr() leads php to crash. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-161468@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55104&edit=1
ID: 55104
Updated by: aharvey@php.net
Reported by: 1000235409 at smail dot shnu dot edu dot cn
Summary: Calling mysqli::get_attr() leads php to crash.
-Status: Open
+Status: Feedback
Type: Bug
Package: MySQLi related
Operating System: Mac OS X 10.6.7
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2011-07-01 11:25:54] 1000235409 at smail dot shnu dot edu dot cn
Description:
------------
Calling mysqli::get_attr() under Mac OS X always leads php to crash with exit code
139, even after receiving true with calling mysqli::set_attr() before.
Proved under PHP-CGI 5.3.3 with MySQL 5.1.44.
This situation will not happen under Windows and Linux (at least Ubuntu 10.10).
Test script:
---------------
$conn=new mysqli('localhost', 'root', '', 'test', 3306,
'/Applications/XAMPP/xamppfiles/var/mysql/mysql.sock');
$stmt=$conn->stmt_init();
$stmt->prepare('select 1+1');
$a=$stmt->attr_set(MYSQLI_STMT_ATTR_CURSOR_TYPE,MYSQLI_CURSOR_TYPE_READ_ONLY);
var_dump($a); //true
$stmt->attr_get(MYSQLI_STMT_ATTR_CURSOR_TYPE); //php crashed with exit value 139.
$stmt->execute();
echo $stmt->attr_get(MYSQLI_STMT_ATTR_CURSOR_TYPE);// ...or, put that code here, and the same
problem happens.
echo 'SUCC';
Expected result:
----------------
SUCC
Actual result:
--------------
*SIMPLY CRASHED*
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55104&edit=1