johannes                                 Wed, 31 Aug 2011 11:11:08 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=315877

Log:
- Fix Bug #55550 mysql.trace_mode miscounts result sets,
  fixes ext/mysql/tests/mysql_deprecated_api.phpt

Bug: https://bugs.php.net/55550 (Open) mysql.trace_mode miscounts result sets
      
Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c
    U   php/php-src/branches/PHP_5_4/ext/mysql/php_mysql.c
    U   php/php-src/trunk/ext/mysql/php_mysql.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS   2011-08-31 10:46:20 UTC (rev 315876)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-08-31 11:11:08 UTC (rev 315877)
@@ -12,6 +12,9 @@
   . Fixed bug #48476 (cloning extended DateTime class without calling
     parent::__constr crashed PHP). (Hannes)

+- MySQL:
+  . Fixed bug #55550 (mysql.trace_mode miscounts result sets). (Johannes)
+
 - Phar:
   . Fixed bug#52013 (Unable to decompress files in a compressed phar). (Hannes)
   . Fixed bug#53872 (internal corruption of phar). (Hannes)

Modified: php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c  2011-08-31 10:46:20 UTC 
(rev 315876)
+++ php/php-src/branches/PHP_5_3/ext/mysql/php_mysql.c  2011-08-31 11:11:08 UTC 
(rev 315877)
@@ -1588,6 +1588,7 @@
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to save 
MySQL query result");
                RETURN_FALSE;
        }
+       MySG(result_allocated)++;
        ZEND_REGISTER_RESOURCE(return_value, mysql_result, le_result);
 }
 /* }}} */
@@ -1625,6 +1626,7 @@
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to save 
MySQL query result");
                RETURN_FALSE;
        }
+       MySG(result_allocated)++;
        ZEND_REGISTER_RESOURCE(return_value, mysql_result, le_result);
 }
 /* }}} */
@@ -1662,6 +1664,7 @@
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to save 
MySQL query result");
                RETURN_FALSE;
        }
+       MySG(result_allocated)++;
        ZEND_REGISTER_RESOURCE(return_value, mysql_result, le_result);
 }
 /* }}} */
@@ -1694,6 +1697,7 @@
                RETURN_FALSE;
        }

+       MySG(result_allocated)++;
        ZEND_REGISTER_RESOURCE(return_value, mysql_result, le_result);
 }
 /* }}} */

Modified: php/php-src/branches/PHP_5_4/ext/mysql/php_mysql.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/mysql/php_mysql.c  2011-08-31 10:46:20 UTC 
(rev 315876)
+++ php/php-src/branches/PHP_5_4/ext/mysql/php_mysql.c  2011-08-31 11:11:08 UTC 
(rev 315877)
@@ -1590,6 +1590,7 @@
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to save 
MySQL query result");
                RETURN_FALSE;
        }
+       MySG(result_allocated)++;
        ZEND_REGISTER_RESOURCE(return_value, mysql_result, le_result);
 }
 /* }}} */
@@ -1627,6 +1628,7 @@
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to save 
MySQL query result");
                RETURN_FALSE;
        }
+       MySG(result_allocated)++;
        ZEND_REGISTER_RESOURCE(return_value, mysql_result, le_result);
 }
 /* }}} */
@@ -1664,6 +1666,7 @@
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to save 
MySQL query result");
                RETURN_FALSE;
        }
+       MySG(result_allocated)++;
        ZEND_REGISTER_RESOURCE(return_value, mysql_result, le_result);
 }
 /* }}} */
@@ -1696,6 +1699,7 @@
                RETURN_FALSE;
        }

+       MySG(result_allocated)++;
        ZEND_REGISTER_RESOURCE(return_value, mysql_result, le_result);
 }
 /* }}} */

Modified: php/php-src/trunk/ext/mysql/php_mysql.c
===================================================================
--- php/php-src/trunk/ext/mysql/php_mysql.c     2011-08-31 10:46:20 UTC (rev 
315876)
+++ php/php-src/trunk/ext/mysql/php_mysql.c     2011-08-31 11:11:08 UTC (rev 
315877)
@@ -1590,6 +1590,7 @@
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to save 
MySQL query result");
                RETURN_FALSE;
        }
+       MySG(result_allocated)++;
        ZEND_REGISTER_RESOURCE(return_value, mysql_result, le_result);
 }
 /* }}} */
@@ -1627,6 +1628,7 @@
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to save 
MySQL query result");
                RETURN_FALSE;
        }
+       MySG(result_allocated)++;
        ZEND_REGISTER_RESOURCE(return_value, mysql_result, le_result);
 }
 /* }}} */
@@ -1664,6 +1666,7 @@
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to save 
MySQL query result");
                RETURN_FALSE;
        }
+       MySG(result_allocated)++;
        ZEND_REGISTER_RESOURCE(return_value, mysql_result, le_result);
 }
 /* }}} */
@@ -1696,6 +1699,7 @@
                RETURN_FALSE;
        }

+       MySG(result_allocated)++;
        ZEND_REGISTER_RESOURCE(return_value, mysql_result, le_result);
 }
 /* }}} */

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

Reply via email to