andrey Thu, 16 Dec 2010 12:56:19 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=306407
Log:
fix a small bug about affected_rows in the text protocol
Changed paths:
U php/php-src/branches/PHP_5_3/NEWS
U php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c
U php/php-src/trunk/ext/mysqlnd/mysqlnd.c
Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS 2010-12-16 12:25:27 UTC (rev 306406)
+++ php/php-src/branches/PHP_5_3/NEWS 2010-12-16 12:56:19 UTC (rev 306407)
@@ -36,6 +36,9 @@
query). (Kalle)
. Fixed bug #53425 (mysqli_real_connect() ignores client flags when built to
call libmysql). (Kalle, tre-php-net at crushedhat dot com)
+ . Fixed buggy counting of affected rows when using the text protocol. The
+ collected statistics were wrong when multi_query was used with mysqlnd.
+ (Andrey)
- OpenSSL extension:
. Implemented FR #53447 (Cannot disable SessionTicket extension for servers
Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c 2010-12-16 12:25:27 UTC
(rev 306406)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c 2010-12-16 12:56:19 UTC
(rev 306407)
@@ -1812,6 +1812,9 @@
DBG_INF_FMT("Error from the server : (%u) %s",
conn->error_info.error_no, conn->error_info.error);
}
}
+ if (ret == PASS && conn->last_query_type == QUERY_UPSERT &&
conn->upsert_status.affected_rows) {
+ MYSQLND_INC_CONN_STATISTIC_W_VALUE(conn->stats,
STAT_ROWS_AFFECTED_NORMAL, conn->upsert_status.affected_rows);
+ }
DBG_RETURN(ret);
}
Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd.c
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd.c 2010-12-16 12:25:27 UTC (rev
306406)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd.c 2010-12-16 12:56:19 UTC (rev
306407)
@@ -1835,6 +1835,9 @@
DBG_INF_FMT("Error from the server : (%u) %s",
conn->error_info.error_no, conn->error_info.error);
}
}
+ if (ret == PASS && conn->last_query_type == QUERY_UPSERT &&
conn->upsert_status.affected_rows) {
+ MYSQLND_INC_CONN_STATISTIC_W_VALUE(conn->stats,
STAT_ROWS_AFFECTED_NORMAL, conn->upsert_status.affected_rows);
+ }
DBG_RETURN(ret);
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php