tony2001 Fri Nov 25 07:56:04 2005 EDT
Modified files: (Branch: PHP_5_1)
/php-src NEWS
/php-src/ext/pdo_mysql mysql_driver.c
Log:
MFH: fix #35391 (pdo_mysql::exec does not return number of affected rows)
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.223&r2=1.2027.2.224&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.223 php-src/NEWS:1.2027.2.224
--- php-src/NEWS:1.2027.2.223 Thu Nov 24 19:02:16 2005
+++ php-src/NEWS Fri Nov 25 07:55:54 2005
@@ -5,6 +5,8 @@
- 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)
http://cvs.php.net/diff.php/php-src/ext/pdo_mysql/mysql_driver.c?r1=1.59.2.5&r2=1.59.2.6&ty=u
Index: php-src/ext/pdo_mysql/mysql_driver.c
diff -u php-src/ext/pdo_mysql/mysql_driver.c:1.59.2.5
php-src/ext/pdo_mysql/mysql_driver.c:1.59.2.6
--- php-src/ext/pdo_mysql/mysql_driver.c:1.59.2.5 Fri Oct 28 22:36:30 2005
+++ php-src/ext/pdo_mysql/mysql_driver.c Fri Nov 25 07:56:04 2005
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mysql_driver.c,v 1.59.2.5 2005/10/29 02:36:30 wez Exp $ */
+/* $Id: mysql_driver.c,v 1.59.2.6 2005/11/25 12:56:04 tony2001 Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -244,7 +244,7 @@
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 {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php