1
0
mirror of https://github.com/php/php-src.git synced 2026-04-19 05:51:02 +02:00

MFH: fix #35391 (pdo_mysql::exec does not return number of affected rows)

This commit is contained in:
Antony Dovgal
2005-11-25 12:56:04 +00:00
parent 350aec954e
commit dc0db7382c
2 changed files with 3 additions and 1 deletions

2
NEWS
View File

@@ -5,6 +5,8 @@ PHP NEWS
- Added an additional field $frame['object'] to the result array of
debug_backtrace() that contains a reference to the respective object when the
frame was called from an object. (Sebastian)
- Fixed bug #35391 (pdo_mysql::exec does not return number of affected rows).
(Tony)
- Fixed bug #35360 (exceptions in interactive mode (php -a) may cause crash).
(Dmitry)
- Fixed bug #35358 (Incorrect error messages for PDO class constants). (Ilia)

View File

@@ -244,7 +244,7 @@ static long mysql_handle_doer(pdo_dbh_t *dbh, const char *sql, long sql_len TSRM
return -1;
} else {
my_ulonglong c = mysql_affected_rows(H->server);
if (c != (my_ulonglong) -1) {
if (c == (my_ulonglong) -1) {
pdo_mysql_error(dbh);
return (H->einfo.errcode ? -1 : 0);
} else {