iliaa           Mon Jul 31 20:18:11 2006 UTC

  Added files:                 (Branch: PHP_5_2)
    /php-src/ext/pdo_mysql/tests        bug_37445.phpt 

  Modified files:              
    /php-src    NEWS 
    /php-src/ext/pdo    pdo_dbh.c pdo_stmt.c 
    /php-src/ext/pdo_mysql/tests        common.phpt 
  Log:
  Fixed bug #37445 (Fixed crash in pdo_mysql resulting from premature object
  destruction).
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.169&r2=1.2027.2.547.2.170&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.169 php-src/NEWS:1.2027.2.547.2.170
--- php-src/NEWS:1.2027.2.547.2.169     Mon Jul 31 12:56:52 2006
+++ php-src/NEWS        Mon Jul 31 20:18:11 2006
@@ -54,6 +54,8 @@
   SQLT_AFC, AVC). (Tony)
 - Fixed bug #37564 (AES privacy encryption not possible due to net-snmp 5.2
   compatibility issue). (Jani, patch by scott dot moynes+php at gmail dot com)
+- Fixed bug #37445 (Fixed crash in pdo_mysql resulting from premature object
+  destruction). (Ilia)
 
 24 Jul 2006, PHP 5.2.0RC1
 - Updated bundled MySQL client library to version 5.0.22 in the Windows
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_dbh.c?r1=1.82.2.31.2.4&r2=1.82.2.31.2.5&diff_format=u
Index: php-src/ext/pdo/pdo_dbh.c
diff -u php-src/ext/pdo/pdo_dbh.c:1.82.2.31.2.4 
php-src/ext/pdo/pdo_dbh.c:1.82.2.31.2.5
--- php-src/ext/pdo/pdo_dbh.c:1.82.2.31.2.4     Thu Jul 27 08:00:54 2006
+++ php-src/ext/pdo/pdo_dbh.c   Mon Jul 31 20:18:11 2006
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: pdo_dbh.c,v 1.82.2.31.2.4 2006/07/27 08:00:54 tony2001 Exp $ */
+/* $Id: pdo_dbh.c,v 1.82.2.31.2.5 2006/07/31 20:18:11 iliaa Exp $ */
 
 /* The PDO Database Handle Class */
 
@@ -570,6 +570,7 @@
        stmt->dbh = dbh;
        /* give it a reference to me */
        zend_objects_store_add_ref(getThis() TSRMLS_CC);
+       php_pdo_dbh_addref(dbh TSRMLS_CC);
        stmt->database_object_handle = *getThis();
        /* we haven't created a lazy object yet */
        ZVAL_NULL(&stmt->lazy_object_ref);
@@ -1016,6 +1017,7 @@
        stmt->dbh = dbh;
        /* give it a reference to me */
        zend_objects_store_add_ref(getThis() TSRMLS_CC);
+       php_pdo_dbh_addref(dbh TSRMLS_CC);
        stmt->database_object_handle = *getThis();
        /* we haven't created a lazy object yet */
        ZVAL_NULL(&stmt->lazy_object_ref);
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_stmt.c?r1=1.118.2.38.2.4&r2=1.118.2.38.2.5&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.4 
php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.5
--- php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.4   Sun Jul 30 11:19:56 2006
+++ php-src/ext/pdo/pdo_stmt.c  Mon Jul 31 20:18:11 2006
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: pdo_stmt.c,v 1.118.2.38.2.4 2006/07/30 11:19:56 tony2001 Exp $ */
+/* $Id: pdo_stmt.c,v 1.118.2.38.2.5 2006/07/31 20:18:11 iliaa Exp $ */
 
 /* The PDO Statement Handle Class */
 
@@ -2258,6 +2258,7 @@
        do_fetch_opt_finish(stmt, 1 TSRMLS_CC);
 
        zend_objects_store_del_ref(&stmt->database_object_handle TSRMLS_CC);
+       php_pdo_dbh_delref(stmt->dbh TSRMLS_CC);
        efree(stmt);
 }
 
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/tests/common.phpt?r1=1.1.2.1.2.1&r2=1.1.2.1.2.2&diff_format=u
Index: php-src/ext/pdo_mysql/tests/common.phpt
diff -u php-src/ext/pdo_mysql/tests/common.phpt:1.1.2.1.2.1 
php-src/ext/pdo_mysql/tests/common.phpt:1.1.2.1.2.2
--- php-src/ext/pdo_mysql/tests/common.phpt:1.1.2.1.2.1 Mon Jul 31 20:14:40 2006
+++ php-src/ext/pdo_mysql/tests/common.phpt     Mon Jul 31 20:18:11 2006
@@ -22,7 +22,7 @@
 } else {
        $config['ENV']['PDOTEST_DSN'] = 'mysql:host=localhost;dbname=test';
        $config['ENV']['PDOTEST_USER'] = 'root';
-       $config['ENV']['PDOTEST_PASS'] = 'asukasmysql';
+       $config['ENV']['PDOTEST_PASS'] = '';
 }
 
 return $config;

http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/tests/bug_37445.phpt?view=markup&rev=1.1
Index: php-src/ext/pdo_mysql/tests/bug_37445.phpt
+++ php-src/ext/pdo_mysql/tests/bug_37445.phpt

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to