Bug #55104 [Opn]: Calling mysqli::get_attr() leads php to crash.
| From: | 1000235409 at smail dot shnu dot edu dot cn | Date: | Sun, 03 Jul 2011 15:21:35 +0000 |
| Subject: | Bug #55104 [Opn]: Calling mysqli::get_attr() leads php to crash. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-161535@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
User updated by: 1000235409 at smail dot shnu dot edu dot cn
Reported by: 1000235409 at smail dot shnu dot edu dot cn
Summary: Calling mysqli::get_attr() leads php to crash.
Status: Open
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:
try it on 5.3.3, or is it meaningless?
Previous Comments:
------------------------------------------------------------------------
[2011-07-03 10:29:59] felipe@php.net
I can't reproduce it on 5.4.
------------------------------------------------------------------------
[2011-07-03 00:06:14] 1000235409 at smail dot shnu dot edu dot cn
I cannot generate a backtrace since I am not willing to mess up machine, and there
is no possibility to install a virtual machine because I haven't a OS X Server
installation DVD,
So, is it possible to solve this bug without providing a backtrace?
------------------------------------------------------------------------
[2011-07-01 11:48:16] aharvey@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.
------------------------------------------------------------------------
[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