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
commita692479d21a9c581e187f4615793497131df27c6 (patch)
treea8bdcccd036a17feaf1dc12a54be85abdfb8674b /ext/mysqlnd/mysqlnd.c
parentd35645997152ccd2dc4617d0e9f4bdcd934be87c (diff)
downloadphp-git-a692479d21a9c581e187f4615793497131df27c6.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);
}
/* }}} */