From 8899425e26b8d9653e122b5b4aee8a410040146a Mon Sep 17 00:00:00 2001 From: Andrey Hristov Date: Tue, 12 Jul 2005 19:22:05 +0000 Subject: strictly check the result of mysql_affected_rows() --- ext/pdo_mysql/mysql_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ext/pdo_mysql/mysql_driver.c') 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; } } -- cgit v1.2.1