#34624 [NEW]: mysqli_rpl_query_type always returns MYSQLI_RPL_MASTER for CALL statements
From: jasper at bryant-greene dot name
Operating system: Gentoo Linux x86
PHP version: 5.0.5
PHP Bug Type: MySQLi related
Bug description: mysqli_rpl_query_type always returns MYSQLI_RPL_MASTER for CALL statements
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 bug report at http://bugs.php.net/?id=34624&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34624&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34624&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34624&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34624&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34624&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34624&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34624&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34624&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34624&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34624&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=34624&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=34624&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34624&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34624&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34624&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34624&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34624&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34624&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34624&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34624&r=mysqlcfg
Thread (4 messages)
- jasper at bryant-greene dot name