From: dg at artegic dot de
Operating system:
PHP version: 5.2.10
PHP Bug Type: MySQL related
Bug description: Missing constants MYSQL_CLIENT_MULTI_RESULTS
Description:
------------
When dealing with MySQL STORED PROCEDURES it's often necessary to set
flags as a parameter for mysql_connect which are not (yet?) defined in
the current versions:
CLIENT_MULTI_STATEMENT (65536) and
CLIENT_MULTI_RESULTS (131072)
Otherwise the application will return a "PROCEDURE xxx can't return a
result set in the given context" error, even if a CALL from phpMyAdmin
or any other client is working without problems.
Reproduce code:
---------------
mysql_connect ($host, $user, $pw, $newlink);
mysql_unbuffered_query ('CALL myproc()');
won't work, but
mysql_connect ($host, $user, $pw, $newlink, 131072)
mysql_unbuffered_query ('CALL myproc()');
will work just as expected.
--
Edit bug report at http://bugs.php.net/?id=49370&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=49370&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=49370&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=49370&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=49370&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=49370&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=49370&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=49370&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=49370&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=49370&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=49370&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=49370&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=49370&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=49370&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=49370&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49370&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=49370&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=49370&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=49370&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=49370&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=49370&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=49370&r=mysqlcfg