|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-05-04 15:30 UTC] johannes@php.net
-Status: Open
+Status: Bogus
[2011-05-04 15:30 UTC] johannes@php.net
[2011-05-04 19:30 UTC] sathia dot musso at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 08:00:01 2025 UTC |
Description: ------------ I've tried to access the statistics on a simple page and if I keep ctrl+r pressed so that it gets 30 requests/s i've noticed that the counters are reset to 0 it doesn't happen if i reload the page slowly. Test script: --------------- <?php $dbuser="x"; $dbpasswd="y"; $dbname="z"; $mysqli = new mysqli("myapp", $dbuser, $dbpasswd, $db); $GLOBALS['MYSQLI'] = $mysqli; function my_query($mysqli, $query, $retry_count = 0) { // print("Is \"".$query."\" Select?". mysqlnd_ms_query_is_select($query)."<br>"); if ($retry_count > 3){ return false; } if (!($ret = $mysqli->query($query))) { /* Error: 1053 SQLSTATE: 08S01 (ER_SERVER_SHUTDOWN) */ if (1053 == $mysqli->errno) { /* ouch, slave is not available, try next... */ return my_query($mysqli, $query, ++$retry_count); } } return $ret; } $x = my_query($mysqli, " UPDATE users SET username = 'pippo' WHERE uid = 59 "); //SELECT * FROM pippo print("<pre>"); print_r(mysqlnd_ms_get_stats()); print("</pre>"); ?> Expected result: ---------------- i'd expect counters to grow anyway. Actual result: -------------- counters are reset to zero randomly