fix a small bug about affected_rows in the text protocol

This commit is contained in:
Andrey Hristov 2010-12-16 12:56:19 +00:00
parent 4e08abeead
commit 17b8336047
2 changed files with 6 additions and 0 deletions

3
NEWS
View file

@ -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

View 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);
}