From:  pear-qa@lists.php.net ("trparky@toms-world.org")
Date:  29 Oct 2015 06:35:10 Hong Kong Time
Newsgroup:  news.php.net/php.pear.bugs
Subject:  

[PEAR-BUG] Bug #20975 [Com]: Unable to execute another query after calling a MySQL Stored Procedure

NNTP-Posting-Host:  null

Edit report at https://pear.php.net/bugs/bug.php?id=20975&edit=1

 ID:               20975
 Comment by:       trparky@toms-world.org
 Reported By:      trparky at toms-world dot org
 Summary:          Unable to execute another query after calling a MySQL
                    Stored Procedure
 Status:           Open
 Type:             Bug
 Package:          DB
 Operating System: Linux
 Package Version:  1.8.2
 PHP Version:      5.4.45
 Roadmap Versions: 
 New Comment:

I have provided a patch file to fix this issue.


Previous Comments:
------------------------------------------------------------------------

[2015-10-28 22:33:02] trparky

Added #patch bug:20975;patch:mysqli.patch;revision:1446071582;.

------------------------------------------------------------------------

[2015-10-28 22:15:05] trparky

Description:
------------
After calling a MySQL Stored Procedure in MySQLi mode, you are unable to
execute another query after it. When you try to it tells you that you
have no database selected.

In order to fix this issue, you must patch mysqli.php file and add this
line...
if (preg_match('/\ACALL.*/im', $query))
$this->connection->next_result();
After this line (line 400)...
$result = @mysqli_query($this->connection, $query);

------------------------------------------------------------------------


-- 
Edit this bug report at https://pear.php.net/bugs/bug.php?id=20975&edit=1