|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-09-24 13:37 UTC] sniper@php.net
[2005-09-27 07:32 UTC] jasper at bryant-greene dot name
[2005-09-27 10:47 UTC] georg@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 18:00:01 2025 UTC |
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"