ID: 41158
User updated by: zizka at seznam dot cz
Reported By: zizka at seznam dot cz
-Status: Feedback
+Status: Open
Bug Type: Feature/Change Request
Operating System: All
PHP Version: 5.2.1
New Comment:
For instance, in case of use of Stored Procedure which uses PREPARED
statement which surely can not return a result (not SELECT or SHOW), but
MySQL does not know it and marks the Stored Procedure as returning a
record set, and then throws an exception "can t return a result set in
the given context". With the flag MYSQL_CLIENT_MULTI_RESULTS, PHP is
able to handle a "CALL ..." query without harming anything (tested).
I've seen some other cases when people on the forums use this flag to
allow PHP's MySQL extension use Stored Procedures which for some similar
reason marked as returning a result set but they do not.
This would be needed to document, that the constant is just for such
purposes and the extension is not able to handle multiple results. That
would also bring the information about such MySQL's behavior right into
the PHP manual, what could, in my oppinion, help some programmers
finding their 'bug' causing "can t return a result set in the given
context".
Previous Comments:
------------------------------------------------------------------------
[2007-04-23 09:08:26] [EMAIL PROTECTED]
>Sometimes a situation arises that this constant is needed even
>though multiple results support is not needed.
For instance?
------------------------------------------------------------------------
[2007-04-22 02:28:31] zizka at seznam dot cz
Description:
------------
Please add MYSQL_CLIENT_MULTI_RESULTS to MySQL extension.
Sometimes a situation arises that this constant is needed even though
multiple results support is not needed. Currently everyone has to add
define('MYSQL_CLIENT_MULTI_RESULTS', 131072);
to his code.
Reproduce code:
---------------
<?php
$conn = mysql_connect("localhost", "root", "", 1,
MYSQL_CLIENT_MULTI_RESULTS);
?>
Expected result:
----------------
...
Actual result:
--------------
...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41158&edit=1