]> granicus.if.org Git - php/commitdiff
fix a small bug about affected_rows in the text protocol
authorAndrey Hristov <andrey@php.net>
Thu, 16 Dec 2010 12:56:19 +0000 (12:56 +0000)
committerAndrey Hristov <andrey@php.net>
Thu, 16 Dec 2010 12:56:19 +0000 (12:56 +0000)
NEWS
ext/mysqlnd/mysqlnd.c

diff --git a/NEWS b/NEWS
index 4c67881f45c7fe8886894fba14c8939404065033..62f758123d1ff95a0f66267abb33c0bf4b231faf 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -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
index d4ccd0034642067305d9b573e8fab8bd7123cd0f..1d9ad8ddf8c16177e1cbfaaaca717358c609a880 100644 (file)
@@ -1812,6 +1812,9 @@ MYSQLND_METHOD(mysqlnd_conn, next_result)(MYSQLND * const conn TSRMLS_DC)
                        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);
 }