iliaa Wed Aug 9 14:45:00 2006 UTC
Added files: (Branch: PHP_5_2)
/php-src/ext/pdo/tests bug_38394.phpt
Modified files:
/php-src NEWS
/php-src/ext/pdo pdo_stmt.c
Log:
Fixed bug #38394 (PDO fails to recover from failed prepared statement
execution).
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.192&r2=1.2027.2.547.2.193&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.192 php-src/NEWS:1.2027.2.547.2.193
--- php-src/NEWS:1.2027.2.547.2.192 Wed Aug 9 12:15:42 2006
+++ php-src/NEWS Wed Aug 9 14:45:00 2006
@@ -32,6 +32,8 @@
- Fixed phpinfo() cutoff of variables at \0. (Ilia)
- Fixed a bug in the filter extension that prevented magic_quotes_gpc from
being applied when RAW filter is used. (Ilia)
+- Fixed bug #38394 (PDO fails to recover from failed prepared statement
+ execution). (Ilia)
- Fixed bug #38377 (session_destroy() gives warning after
session_regenerate_id()). (Ilia)
- Fixed bug #38354 (Unwanted reformatting of XML when using AsXML). (Christian)
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_stmt.c?r1=1.118.2.38.2.6&r2=1.118.2.38.2.7&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.6
php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.7
--- php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.6 Tue Aug 1 15:06:01 2006
+++ php-src/ext/pdo/pdo_stmt.c Wed Aug 9 14:45:00 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pdo_stmt.c,v 1.118.2.38.2.6 2006/08/01 15:06:01 iliaa Exp $ */
+/* $Id: pdo_stmt.c,v 1.118.2.38.2.7 2006/08/09 14:45:00 iliaa Exp $ */
/* The PDO Statement Handle Class */
@@ -392,6 +392,12 @@
zval **tmp;
uint str_length;
ulong num_index;
+
+ if (stmt->bound_params) {
+ zend_hash_destroy(stmt->bound_params);
+ FREE_HASHTABLE(stmt->bound_params);
+ stmt->bound_params = NULL;
+ }
zend_hash_internal_pointer_reset(Z_ARRVAL_P(input_params));
while (SUCCESS ==
zend_hash_get_current_data(Z_ARRVAL_P(input_params), (void*)&tmp)) {
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/tests/bug_38394.phpt?view=markup&rev=1.1
Index: php-src/ext/pdo/tests/bug_38394.phpt
+++ php-src/ext/pdo/tests/bug_38394.phpt
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php