summaryrefslogtreecommitdiff
path: root/ext/pdo_mysql/mysql_driver.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2005-07-12 19:22:05 +0000
committerAndrey Hristov <andrey@php.net>2005-07-12 19:22:05 +0000
commit8899425e26b8d9653e122b5b4aee8a410040146a (patch)
tree97c2ba350562c0df982e824f255528b77934752b /ext/pdo_mysql/mysql_driver.c
parentfa4ea0fff4873821c30f434c0c9a85ba588d59be (diff)
downloadphp-git-8899425e26b8d9653e122b5b4aee8a410040146a.tar.gz
strictly check the result of mysql_affected_rows()
Diffstat (limited to 'ext/pdo_mysql/mysql_driver.c')
-rwxr-xr-xext/pdo_mysql/mysql_driver.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c
index b57599c322..08b4429880 100755
--- a/ext/pdo_mysql/mysql_driver.c
+++ b/ext/pdo_mysql/mysql_driver.c
@@ -225,7 +225,8 @@ static long mysql_handle_doer(pdo_dbh_t *dbh, const char *sql, long sql_len TSRM
pdo_mysql_error(dbh);
return -1;
} else {
- return mysql_affected_rows(H->server);
+ my_ulonglong c= mysql_affected_rows(H->server);
+ return c != (my_ulonglong)-1 ? c:-1;
}
}