#44289 [NoF->Bgs]: Output parameter not set if stored procedure returns rows
ID: 44289
Updated by: uw@php.net
Reported By: d at tpyo dot net
-Status: No Feedback
+Status: Bogus
Bug Type: PDO related
Operating System: Linux 2.6.22
PHP Version: 5.2.5
New Comment:
There is no bug here.
You are not fetching the results from the SP and thus you get a
2014/Commands ouf of sync
(http://dev.mysql.com/doc/refman/5.1/en/error-messages-client.html). The
error gets reported through stmt->errorInfo(), as it should, when
running SELECT @test2.
You must fetch the results from the SP and close the statement before
you can run a new query on the line.
Previous Comments:
------------------------------------------------------------------------
[2009-05-03 01:00:11] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2009-04-25 14:55:14] jani@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
------------------------------------------------------------------------
[2008-02-29 10:40:07] d at tpyo dot net
Description:
------------
It seems that if a stored procedure returns rows from a SELECT the
output parameters are lost.
Not sure if this is the intended behaviour, but since this works fine
from the MySQL CLI I'm inclined to believe it's not.
Reproduce code:
---------------
Stored procedures and PDO code for reproducing the problem:
http://undesigned.org.za/files/pdo-issue.phps
Expected result:
----------------
PDO_FOUND_ROWS_TEST_1(@test1): string(4) "Set!"
PDO_FOUND_ROWS_TEST_2(@test2): string(4) "Set!"
Actual result:
--------------
PDO_FOUND_ROWS_TEST_1(@test1): string(4) "Set!"
PDO_FOUND_ROWS_TEST_2(@test2): FAILED
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44289&edit=1
Thread (3 messages)