cvs: php-src /ext/pdo_mysql mysql_driver.c

From: Date: Tue, 12 Jul 2005 19:32:13 +0000
Subject: cvs: php-src /ext/pdo_mysql mysql_driver.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-32887@lists.php.net to get a copy of this message
andrey Tue Jul 12 15:32:13 2005 EDT Modified files: /php-src/ext/pdo_mysql mysql_driver.c Log: ok, call pdo_mysql_error() before returning -1 http://cvs.php.net/diff.php/php-src/ext/pdo_mysql/mysql_driver.c?r1=1.56&r2=1.57&ty=u Index: php-src/ext/pdo_mysql/mysql_driver.c diff -u php-src/ext/pdo_mysql/mysql_driver.c:1.56 php-src/ext/pdo_mysql/mysql_driver.c:1.57 --- php-src/ext/pdo_mysql/mysql_driver.c:1.56 Tue Jul 12 15:22:05 2005 +++ php-src/ext/pdo_mysql/mysql_driver.c Tue Jul 12 15:32:13 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysql_driver.c,v 1.56 2005/07/12 19:22:05 andrey Exp $ */ +/* $Id: mysql_driver.c,v 1.57 2005/07/12 19:32:13 andrey Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -177,8 +177,7 @@ return 0; } - S->stmt = mysql_stmt_init(H->server); - if (!S->stmt) { + if (!(S->stmt = mysql_stmt_init(H->server))) { pdo_mysql_error(dbh); if (nsql) { efree(nsql); @@ -226,7 +225,7 @@ return -1; } else { my_ulonglong c= mysql_affected_rows(H->server); - return c != (my_ulonglong)-1 ? c:-1; + return c != (my_ulonglong)-1 ? c:(pdo_mysql_error(dbh),-1); } }

« previous php.cvs (#32887) next »