diff options
| author | Ilia Alshanetsky <iliaa@php.net> | 2005-06-24 23:58:06 +0000 |
|---|---|---|
| committer | Ilia Alshanetsky <iliaa@php.net> | 2005-06-24 23:58:06 +0000 |
| commit | 09f052358f1abf8cf7e7dd726f55d8c827ef9324 (patch) | |
| tree | 085fd48df641fe49971cbec0c645c4ebf3d3f352 /ext/pdo_mysql/mysql_driver.c | |
| parent | e923ffddabd11f7e5de4e3bc634f9723df27f4a1 (diff) | |
| download | php-git-09f052358f1abf8cf7e7dd726f55d8c827ef9324.tar.gz | |
Fixed bogus query failure claim, on some queries such as OPTIMIZE table.
Diffstat (limited to 'ext/pdo_mysql/mysql_driver.c')
| -rwxr-xr-x | ext/pdo_mysql/mysql_driver.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c index 293a822aff..3300fa3358 100755 --- a/ext/pdo_mysql/mysql_driver.c +++ b/ext/pdo_mysql/mysql_driver.c @@ -151,7 +151,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); + long c = mysql_affected_rows(H->server); + return c >0 ? c : 0; } } |
