#34624 [Fbk->Opn]: mysqli_rpl_query_type always returns MYSQLI_RPL_MASTER for CALL statements
| From: | jasper at bryant-greene dot name | Date: | Tue, 27 Sep 2005 05:32:53 +0000 |
| Subject: | #34624 [Fbk->Opn]: mysqli_rpl_query_type always returns MYSQLI_RPL_MASTER for CALL statements | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-85626@lists.php.net to get a copy of this message | ||
ID: 34624
User updated by: jasper at bryant-greene dot name
Reported By: jasper at bryant-greene dot name
-Status: Feedback
+Status: Open
Bug Type: MySQLi related
Operating System: Gentoo Linux x86
PHP Version: 5.0.5
New Comment:
Same behaviour
Previous Comments:
------------------------------------------------------------------------
[2005-09-24 13:37:07] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
[2005-09-24 06:32:43] jasper at bryant-greene dot name
Description:
------------
Calling mysqli_rpl_query_type() for a CALL statement should return
MYSQLI_RPL_SLAVE for CALL statements where the stored procedure is
defined as READS SQL DATA, and MYSQLI_RPL_MASTER for other SPs.
The way it is now (always returning MYSQLI_RPL_MASTER) makes
replication useless when stored procedures are being used.
Reproduce code:
---------------
Where getUser is a stored procedure taking one INT argument and defined
as READS SQL DATA:
<?php
$query_type = $myDatabaseConnection->rpl_query_type('CALL
getUser(7)');
if($query_type == MYSQLI_RPL_SLAVE) {
print('Execute on slave');
} else {
print('Execute on master');
}
?>
Expected result:
----------------
"Execute on slave"
Actual result:
--------------
"Execute on master"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34624&edit=1