andrey Tue, 06 Oct 2009 10:33:23 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=289247
Log:
count the queries
Changed paths:
U php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c
U php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h
U php/php-src/trunk/ext/mysqlnd/mysqlnd.c
U php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h
Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c 2009-10-06 10:08:50 UTC
(rev 289246)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c 2009-10-06 10:33:23 UTC
(rev 289247)
@@ -399,6 +399,10 @@
SET_ERROR_AFF_ROWS(conn);
SET_EMPTY_ERROR(conn->error_info);
+ if (command == COM_QUERY) {
+ ++conn->query_counter;
+ }
+
PACKET_INIT_ALLOCA(cmd_packet, PROT_CMD_PACKET);
cmd_packet.command = command;
if (arg && arg_len) {
Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h 2009-10-06
10:08:50 UTC (rev 289246)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_structs.h 2009-10-06
10:33:23 UTC (rev 289247)
@@ -425,6 +425,7 @@
*/
enum mysqlnd_connection_state state;
enum_mysqlnd_query_type last_query_type;
+ uint32_t query_counter;
/* Temporary storage between query and (use|store)_result() call */
MYSQLND_RES *current_result;
Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd.c
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd.c 2009-10-06 10:08:50 UTC (rev
289246)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd.c 2009-10-06 10:33:23 UTC (rev
289247)
@@ -399,6 +399,10 @@
SET_ERROR_AFF_ROWS(conn);
SET_EMPTY_ERROR(conn->error_info);
+ if (command == COM_QUERY) {
+ ++conn->query_counter;
+ }
+
PACKET_INIT_ALLOCA(cmd_packet, PROT_CMD_PACKET);
cmd_packet.command = command;
if (arg && arg_len) {
Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h 2009-10-06 10:08:50 UTC
(rev 289246)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd_structs.h 2009-10-06 10:33:23 UTC
(rev 289247)
@@ -425,6 +425,7 @@
*/
enum mysqlnd_connection_state state;
enum_mysqlnd_query_type last_query_type;
+ uint32_t query_counter;
/* Temporary storage between query and (use|store)_result() call */
MYSQLND_RES *current_result;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php