cvs: php-src(PHP_5_2) / NEWS /ext/pdo pdo_stmt.c /ext/pdo_pgsql pgsql_statement.c
| From: | Ilia Alshanetsky | Date: | Tue, 28 Nov 2006 16:27:53 +0000 |
| Subject: | cvs: php-src(PHP_5_2) / NEWS /ext/pdo pdo_stmt.c /ext/pdo_pgsql pgsql_statement.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-41760@lists.php.net to get a copy of this message | ||
iliaa Tue Nov 28 16:27:53 2006 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/pdo pdo_stmt.c
/php-src/ext/pdo_pgsql pgsql_statement.c
/php-src NEWS
Log:
Fixed bug #39656 (crash when calling fetch() on a PDO statment object
after closeCursor()).
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_stmt.c?r1=1.118.2.38.2.9&r2=1.118.2.38.2.10&diff_format=u
Index: php-src/ext/pdo/pdo_stmt.c
diff -u php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.9 php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.10
--- php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.9 Tue Nov 7 17:57:17 2006
+++ php-src/ext/pdo/pdo_stmt.c Tue Nov 28 16:27:52 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pdo_stmt.c,v 1.118.2.38.2.9 2006/11/07 17:57:17 iliaa Exp $ */
+/* $Id: pdo_stmt.c,v 1.118.2.38.2.10 2006/11/28 16:27:52 iliaa Exp $ */
/* The PDO Statement Handle Class */
@@ -466,7 +466,7 @@
if (!stmt->executed) {
/* this is the first execute */
- if (stmt->dbh->alloc_own_columns) {
+ if (stmt->dbh->alloc_own_columns && !stmt->columns) {
/* for "big boy" drivers, we need to allocate memory to fetch
* the results into, so lets do that now */
ret = pdo_stmt_describe_columns(stmt TSRMLS_CC);
@@ -617,6 +617,10 @@
static int do_fetch_common(pdo_stmt_t *stmt, enum pdo_fetch_orientation ori,
long offset, int do_bind TSRMLS_DC) /* {{{ */
{
+ if (!stmt->executed) {
+ return 0;
+ }
+
if (!dispatch_param_event(stmt, PDO_PARAM_EVT_FETCH_PRE TSRMLS_CC)) {
return 0;
}
@@ -1993,6 +1997,7 @@
}
} while (1);
+ stmt->executed = 0;
RETURN_TRUE;
}
@@ -2002,7 +2007,7 @@
PDO_HANDLE_STMT_ERR();
RETURN_FALSE;
}
-
+ stmt->executed = 0;
RETURN_TRUE;
}
/* }}} */
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_pgsql/pgsql_statement.c?r1=1.31.2.12.2.4&r2=1.31.2.12.2.5&diff_format=u
Index: php-src/ext/pdo_pgsql/pgsql_statement.c
diff -u php-src/ext/pdo_pgsql/pgsql_statement.c:1.31.2.12.2.4
php-src/ext/pdo_pgsql/pgsql_statement.c:1.31.2.12.2.5
--- php-src/ext/pdo_pgsql/pgsql_statement.c:1.31.2.12.2.4 Thu Nov 16 17:33:39 2006
+++ php-src/ext/pdo_pgsql/pgsql_statement.c Tue Nov 28 16:27:53 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pgsql_statement.c,v 1.31.2.12.2.4 2006/11/16 17:33:39 iliaa Exp $ */
+/* $Id: pgsql_statement.c,v 1.31.2.12.2.5 2006/11/28 16:27:53 iliaa Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -197,7 +197,7 @@
return 0;
}
- if(!stmt->executed) {
+ if (!stmt->executed && !stmt->column_count) {
stmt->column_count = (int) PQnfields(S->result);
S->cols = ecalloc(stmt->column_count, sizeof(pdo_pgsql_column));
}
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.379&r2=1.2027.2.547.2.380&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.379 php-src/NEWS:1.2027.2.547.2.380
--- php-src/NEWS:1.2027.2.547.2.379 Tue Nov 28 11:40:41 2006
+++ php-src/NEWS Tue Nov 28 16:27:53 2006
@@ -43,8 +43,12 @@
php_filter.h).
- Fixed wrong signature initialization in imagepng (Takeshi Abe)
- Added optimization for imageline with horizontal and vertial lines (Pierre)
+- Fixed bug #39656 (crash when calling fetch() on a PDO statment object
+ after closeCursor()). (Ilia, Tony)
- Fixed bug #39653 (ext/dba doesn't check for db-4.5 and db-4.4 when db4
support is enabled). (Tony)
+- Fixed bug #39623 (thread safety fixes on *nix for putenv() & mime_magic).
+ (Ilia, wharmby at uk dot ibm dot com)
- Fixed bug #39621 (str_replace() is not binary safe on strings with equal
length). (Tony)
- Fixed bug #39613 (Possible segfault in imap initialization due to missing