iliaa Fri Jun 24 19:58:09 2005 EDT
Modified files:
/php-src/ext/pdo_mysql mysql_driver.c
Log:
Fixed bogus query failure claim, on some queries such as OPTIMIZE table.
http://cvs.php.net/diff.php/php-src/ext/pdo_mysql/mysql_driver.c?r1=1.47&r2=1.48&ty=u
Index: php-src/ext/pdo_mysql/mysql_driver.c
diff -u php-src/ext/pdo_mysql/mysql_driver.c:1.47
php-src/ext/pdo_mysql/mysql_driver.c:1.48
--- php-src/ext/pdo_mysql/mysql_driver.c:1.47 Fri Jun 24 15:45:57 2005
+++ php-src/ext/pdo_mysql/mysql_driver.c Fri Jun 24 19:58:06 2005
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mysql_driver.c,v 1.47 2005/06/24 19:45:57 iliaa Exp $ */
+/* $Id: mysql_driver.c,v 1.48 2005/06/24 23:58:06 iliaa Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -151,7 +151,8 @@
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;
}
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php