cvs: php-src(PHP_5_1) / NEWS /ext/pdo_pgsql pgsql_driver.c

From: Date: Sun, 29 Jan 2006 17:35:57 +0000
Subject: cvs: php-src(PHP_5_1) / NEWS /ext/pdo_pgsql pgsql_driver.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-36671@lists.php.net to get a copy of this message
iliaa Sun Jan 29 17:35:57 2006 UTC Modified files: (Branch: PHP_5_1) /php-src/ext/pdo_pgsql pgsql_driver.c /php-src NEWS Log: Fixed bug #36176 (PDO_PGSQL - PDO::exec() does not return number of rows affected by the operation). http://cvs.php.net/viewcvs.cgi/php-src/ext/pdo_pgsql/pgsql_driver.c?r1=1.53.2.10&r2=1.53.2.11&diff_format=u Index: php-src/ext/pdo_pgsql/pgsql_driver.c diff -u php-src/ext/pdo_pgsql/pgsql_driver.c:1.53.2.10 php-src/ext/pdo_pgsql/pgsql_driver.c:1.53.2.11 --- php-src/ext/pdo_pgsql/pgsql_driver.c:1.53.2.10 Sun Jan 1 12:50:12 2006 +++ php-src/ext/pdo_pgsql/pgsql_driver.c Sun Jan 29 17:35:54 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pgsql_driver.c,v 1.53.2.10 2006/01/01 12:50:12 sniper Exp $ */ +/* $Id: pgsql_driver.c,v 1.53.2.11 2006/01/29 17:35:54 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -270,23 +270,26 @@ { pdo_pgsql_db_handle *H = (pdo_pgsql_db_handle *)dbh->driver_data; PGresult *res; + long ret = 1; if (!(res = PQexec(H->server, sql))) { /* fatal error */ pdo_pgsql_error(dbh, PGRES_FATAL_ERROR, NULL); return -1; - } else { - ExecStatusType qs = PQresultStatus(res); - if (qs != PGRES_COMMAND_OK && qs != PGRES_TUPLES_OK) { - pdo_pgsql_error(dbh, qs, pdo_pgsql_sqlstate(res)); - PQclear(res); - return -1; - } - H->pgoid = PQoidValue(res); + } + ExecStatusType qs = PQresultStatus(res); + if (qs != PGRES_COMMAND_OK && qs != PGRES_TUPLES_OK) { + pdo_pgsql_error(dbh, qs, pdo_pgsql_sqlstate(res)); PQclear(res); + return -1; } + H->pgoid = PQoidValue(res); +#if HAVE_PQCMDTUPLES + ret = atol(PQcmdTuples(res)); +#endif + PQclear(res); - return 1; + return ret; } static int pgsql_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, int unquotedlen, char **quoted, int *quotedlen, enum pdo_param_type paramtype TSRMLS_DC) http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.383&r2=1.2027.2.384&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.383 php-src/NEWS:1.2027.2.384 --- php-src/NEWS:1.2027.2.383 Sun Jan 29 15:25:10 2006 +++ php-src/NEWS Sun Jan 29 17:35:54 2006 @@ -17,6 +17,8 @@ - Fixed imagecolorallocate() and imagecolorallocatelapha() to return FALSE on error. (Pierre) - Fixed bug #36185 (str_rot13(NULL) crash). (Pierre) +- Fixed bug #36176 (PDO_PGSQL - PDO::exec() does not return number of rows + affected by the operation). (Ilia) - Fixed bug #36152 (problems with curl+ssl and pgsql+ssl in same PHP). (Mike) - Fixed bug #36148 (unpack("H*hex", $data) is adding an extra character to the end of the string). (Ilia)

« previous php.cvs (#36671) next »