summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2009-10-22 14:30:51 +0000
committerAndrey Hristov <andrey@php.net>2009-10-22 14:30:51 +0000
commit8792edcf761cdd4714c83069854b3b076596921c (patch)
tree31a3f9f902cb80387c3b7c6cca75f5853216ebc0 /ext/mysqlnd/mysqlnd.c
parent4a7912b9a04545d262e6a4e7e11c9a7e01be979c (diff)
downloadphp-git-8792edcf761cdd4714c83069854b3b076596921c.tar.gz
Count number of affected_rows for normal and PS queries
Diffstat (limited to 'ext/mysqlnd/mysqlnd.c')
-rw-r--r--ext/mysqlnd/mysqlnd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c
index c5e3350cbb..14b7df9784 100644
--- a/ext/mysqlnd/mysqlnd.c
+++ b/ext/mysqlnd/mysqlnd.c
@@ -885,6 +885,10 @@ MYSQLND_METHOD(mysqlnd_conn, query)(MYSQLND *conn, const char *query, unsigned i
information from the ok packet. We will fetch it ourselves.
*/
ret = mysqlnd_query_read_result_set_header(conn, NULL TSRMLS_CC);
+ 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);
}
/* }}} */