#32928 [Opn->Asn]: php dies trying to ->bind_result(...)
| From: | georg@php.net | Date: | Wed, 04 May 2005 07:58:01 +0000 |
| Subject: | #32928 [Opn->Asn]: php dies trying to ->bind_result(...) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-78568@lists.php.net to get a copy of this message | ||
ID: 32928
Updated by: georg@php.net
Reported By: dan at yes dot lt
-Status: Open
+Status: Assigned
Bug Type: MySQLi related
Operating System: winxp
PHP Version: 5.0.4
-Assigned To:
+Assigned To: georg
New Comment:
Looks like repreparing a statement without closing it
makes some problems -> assigned (tested against
5.0.5-beta)
The script itself works as expected - fetching a row
without executing statement before returns an error.
Previous Comments:
------------------------------------------------------------------------
[2005-05-03 16:19:30] dan at yes dot lt
Description:
------------
php dies trying to mysqli_stmt->bind_result(...) with listed queries:
SELECT 1.23 AS test
SELECT NULL AS test
php version 5.0.4, mysql version 5.0.4 beta
Reproduce code:
---------------
$st = $db->prepare("SELECT 1 AS test");
$st->bind_result($x);
$st->fetch();
var_dump($x);
$st = $db->prepare("SELECT 1.23 AS test");
$st->bind_result($x);
$st->fetch();
var_dump($x);
$st = $db->prepare("SELECT NULL AS test");
$st->bind_result($x);
$st->fetch();
echo $st;
var_dump($x);
Expected result:
----------------
int(1)
float(1.23)
NULL
Actual result:
--------------
int(1)
...FATAL ERROR WITH NO OUTPUT...
...FATAL ERROR WITH NO OUTPUT...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32928&edit=1