andrey                                   Thu, 10 Dec 2009 09:35:10 +0000

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

Log:
Fix pdo build, forgot to remove the zval caching from pdo-mysql

Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c
    U   php/php-src/branches/PHP_5_3/ext/pdo_mysql/pdo_mysql.c
    U   php/php-src/branches/PHP_5_3/ext/pdo_mysql/php_pdo_mysql_int.h
    U   php/php-src/trunk/ext/pdo_mysql/mysql_driver.c
    U   php/php-src/trunk/ext/pdo_mysql/pdo_mysql.c
    U   php/php-src/trunk/ext/pdo_mysql/php_pdo_mysql_int.h

Modified: php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c   2009-12-10 
09:23:06 UTC (rev 291941)
+++ php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c   2009-12-10 
09:35:10 UTC (rev 291942)
@@ -731,7 +731,7 @@
        }

        if (mysqlnd_connect(H->server, host, dbh->username, dbh->password, 
password_len, dbname, dbname_len,
-                                               port, unix_socket, 
connect_opts, PDO_MYSQL_G(mysqlnd_thd_zval_cache) TSRMLS_CC) == NULL) {
+                                               port, unix_socket, connect_opts 
TSRMLS_CC) == NULL) {
 #else
        if (mysql_real_connect(H->server, host, dbh->username, dbh->password, 
dbname, port, unix_socket, connect_opts) == NULL) {
 #endif

Modified: php/php-src/branches/PHP_5_3/ext/pdo_mysql/pdo_mysql.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/pdo_mysql/pdo_mysql.c      2009-12-10 
09:23:06 UTC (rev 291941)
+++ php/php-src/branches/PHP_5_3/ext/pdo_mysql/pdo_mysql.c      2009-12-10 
09:35:10 UTC (rev 291942)
@@ -57,17 +57,12 @@
 #if PDO_DBG_ENABLED
        STD_PHP_INI_ENTRY("pdo_mysql.debug",    NULL, PHP_INI_SYSTEM, 
OnUpdateString, debug, zend_pdo_mysql_globals, pdo_mysql_globals)
 #endif
-       STD_PHP_INI_ENTRY("pdo_mysql.cache_size",                       "2000", 
PHP_INI_SYSTEM,         OnUpdateLong,           cache_size,                     
zend_pdo_mysql_globals,         pdo_mysql_globals)
 PHP_INI_END()
 /* }}} */
 #endif

-/* true global environment */
-#ifdef PDO_USE_MYSQLND
-static MYSQLND_ZVAL_PCACHE *pdo_mysqlnd_zval_cache;
-#endif
+/* true global environment */

-
 /* {{{ PHP_MINIT_FUNCTION
  */
 static PHP_MINIT_FUNCTION(pdo_mysql)
@@ -89,10 +84,6 @@
        REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_FOUND_ROWS", 
(long)PDO_MYSQL_ATTR_FOUND_ROWS);
        REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_IGNORE_SPACE", 
(long)PDO_MYSQL_ATTR_IGNORE_SPACE);

-#ifdef PDO_USE_MYSQLND
-       pdo_mysqlnd_zval_cache = 
mysqlnd_palloc_init_cache(PDO_MYSQL_G(cache_size));
-#endif
-
        return php_pdo_register_driver(&pdo_mysql_driver);
 }
 /* }}} */
@@ -103,7 +94,6 @@
 {
        php_pdo_unregister_driver(&pdo_mysql_driver);
 #if PDO_USE_MYSQLND
-       mysqlnd_palloc_free_cache(pdo_mysqlnd_zval_cache);
        UNREGISTER_INI_ENTRIES();
 #endif

@@ -120,20 +110,6 @@
        php_info_print_table_header(2, "PDO Driver for MySQL", "enabled");
        php_info_print_table_row(2, "Client API version", 
mysql_get_client_info());

-#ifdef PDO_USE_MYSQLND
-       {
-               zval values;
-
-               php_info_print_table_header(2, "Persistent cache", 
pdo_mysqlnd_zval_cache ? "enabled":"disabled");
-
-               if (pdo_mysqlnd_zval_cache) {
-                       /* Now report cache status */
-                       mysqlnd_palloc_stats(pdo_mysqlnd_zval_cache, &values);
-                       mysqlnd_minfo_print_hash(&values);
-                       zval_dtor(&values);
-               }
-       }
-#endif
        php_info_print_table_end();

 #ifdef PDO_USE_MYSQLND
@@ -147,9 +123,7 @@
 /* {{{ PHP_RINIT_FUNCTION
  */
 static PHP_RINIT_FUNCTION(pdo_mysql)
-{
-       PDO_MYSQL_G(mysqlnd_thd_zval_cache) = 
mysqlnd_palloc_rinit(pdo_mysqlnd_zval_cache);
-
+{
 #if PDO_DBG_ENABLED
        if (PDO_MYSQL_G(debug)) {
                MYSQLND_DEBUG *dbg = mysqlnd_debug_init(TSRMLS_C);
@@ -170,8 +144,6 @@
  */
 static PHP_RSHUTDOWN_FUNCTION(pdo_mysql)
 {
-       mysqlnd_palloc_rshutdown(PDO_MYSQL_G(mysqlnd_thd_zval_cache));
-
 #if PDO_DBG_ENABLED
        MYSQLND_DEBUG *dbg = PDO_MYSQL_G(dbg);
        PDO_DBG_ENTER("RSHUTDOWN");
@@ -190,8 +162,6 @@
  */
 static PHP_GINIT_FUNCTION(pdo_mysql)
 {
-       pdo_mysql_globals->mysqlnd_thd_zval_cache = NULL; /* zval cache */
-       pdo_mysql_globals->cache_size = 0;
 #ifndef PHP_WIN32
        pdo_mysql_globals->default_socket = NULL;
 #endif

Modified: php/php-src/branches/PHP_5_3/ext/pdo_mysql/php_pdo_mysql_int.h
===================================================================
--- php/php-src/branches/PHP_5_3/ext/pdo_mysql/php_pdo_mysql_int.h      
2009-12-10 09:23:06 UTC (rev 291941)
+++ php/php-src/branches/PHP_5_3/ext/pdo_mysql/php_pdo_mysql_int.h      
2009-12-10 09:35:10 UTC (rev 291942)
@@ -63,8 +63,6 @@

 #ifdef PDO_USE_MYSQLND
 ZEND_BEGIN_MODULE_GLOBALS(pdo_mysql)
-       MYSQLND_THD_ZVAL_PCACHE *mysqlnd_thd_zval_cache;
-       long          cache_size;
 #ifndef PHP_WIN32
        char          *default_socket;
 #endif

Modified: php/php-src/trunk/ext/pdo_mysql/mysql_driver.c
===================================================================
--- php/php-src/trunk/ext/pdo_mysql/mysql_driver.c      2009-12-10 09:23:06 UTC 
(rev 291941)
+++ php/php-src/trunk/ext/pdo_mysql/mysql_driver.c      2009-12-10 09:35:10 UTC 
(rev 291942)
@@ -732,7 +732,7 @@
        }

        if (mysqlnd_connect(H->server, host, dbh->username, dbh->password, 
password_len, dbname, dbname_len,
-                                               port, unix_socket, 
connect_opts, PDO_MYSQL_G(mysqlnd_thd_zval_cache) TSRMLS_CC) == NULL) {
+                                               port, unix_socket, connect_opts 
TSRMLS_CC) == NULL) {
 #else
        if (mysql_real_connect(H->server, host, dbh->username, dbh->password, 
dbname, port, unix_socket, connect_opts) == NULL) {
 #endif

Modified: php/php-src/trunk/ext/pdo_mysql/pdo_mysql.c
===================================================================
--- php/php-src/trunk/ext/pdo_mysql/pdo_mysql.c 2009-12-10 09:23:06 UTC (rev 
291941)
+++ php/php-src/trunk/ext/pdo_mysql/pdo_mysql.c 2009-12-10 09:35:10 UTC (rev 
291942)
@@ -57,17 +57,12 @@
 #if PDO_DBG_ENABLED
        STD_PHP_INI_ENTRY("pdo_mysql.debug",    NULL, PHP_INI_SYSTEM, 
OnUpdateString, debug, zend_pdo_mysql_globals, pdo_mysql_globals)
 #endif
-       STD_PHP_INI_ENTRY("pdo_mysql.cache_size",                       "2000", 
PHP_INI_SYSTEM,         OnUpdateLong,           cache_size,                     
zend_pdo_mysql_globals,         pdo_mysql_globals)
 PHP_INI_END()
 /* }}} */
 #endif

-/* true global environment */
-#ifdef PDO_USE_MYSQLND
-static MYSQLND_ZVAL_PCACHE *pdo_mysqlnd_zval_cache;
-#endif
+/* true global environment */

-
 /* {{{ PHP_MINIT_FUNCTION
  */
 static PHP_MINIT_FUNCTION(pdo_mysql)
@@ -89,10 +84,6 @@
        REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_FOUND_ROWS", 
(long)PDO_MYSQL_ATTR_FOUND_ROWS);
        REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_IGNORE_SPACE", 
(long)PDO_MYSQL_ATTR_IGNORE_SPACE);

-#ifdef PDO_USE_MYSQLND
-       pdo_mysqlnd_zval_cache = 
mysqlnd_palloc_init_cache(PDO_MYSQL_G(cache_size));
-#endif
-
        return php_pdo_register_driver(&pdo_mysql_driver);
 }
 /* }}} */
@@ -103,7 +94,6 @@
 {
        php_pdo_unregister_driver(&pdo_mysql_driver);
 #if PDO_USE_MYSQLND
-       mysqlnd_palloc_free_cache(pdo_mysqlnd_zval_cache);
        UNREGISTER_INI_ENTRIES();
 #endif

@@ -120,20 +110,6 @@
        php_info_print_table_header(2, "PDO Driver for MySQL", "enabled");
        php_info_print_table_row(2, "Client API version", 
mysql_get_client_info());

-#ifdef PDO_USE_MYSQLND
-       {
-               zval values;
-
-               php_info_print_table_header(2, "Persistent cache", 
pdo_mysqlnd_zval_cache ? "enabled":"disabled");
-
-               if (pdo_mysqlnd_zval_cache) {
-                       /* Now report cache status */
-                       mysqlnd_palloc_stats(pdo_mysqlnd_zval_cache, &values);
-                       mysqlnd_minfo_print_hash(&values);
-                       zval_dtor(&values);
-               }
-       }
-#endif
        php_info_print_table_end();

 #ifdef PDO_USE_MYSQLND
@@ -147,9 +123,7 @@
 /* {{{ PHP_RINIT_FUNCTION
  */
 static PHP_RINIT_FUNCTION(pdo_mysql)
-{
-       PDO_MYSQL_G(mysqlnd_thd_zval_cache) = 
mysqlnd_palloc_rinit(pdo_mysqlnd_zval_cache);
-
+{
 #if PDO_DBG_ENABLED
        if (PDO_MYSQL_G(debug)) {
                MYSQLND_DEBUG *dbg = mysqlnd_debug_init(TSRMLS_C);
@@ -170,8 +144,6 @@
  */
 static PHP_RSHUTDOWN_FUNCTION(pdo_mysql)
 {
-       mysqlnd_palloc_rshutdown(PDO_MYSQL_G(mysqlnd_thd_zval_cache));
-
 #if PDO_DBG_ENABLED
        MYSQLND_DEBUG *dbg = PDO_MYSQL_G(dbg);
        PDO_DBG_ENTER("RSHUTDOWN");
@@ -190,8 +162,6 @@
  */
 static PHP_GINIT_FUNCTION(pdo_mysql)
 {
-       pdo_mysql_globals->mysqlnd_thd_zval_cache = NULL; /* zval cache */
-       pdo_mysql_globals->cache_size = 0;
 #ifndef PHP_WIN32
        pdo_mysql_globals->default_socket = NULL;
 #endif

Modified: php/php-src/trunk/ext/pdo_mysql/php_pdo_mysql_int.h
===================================================================
--- php/php-src/trunk/ext/pdo_mysql/php_pdo_mysql_int.h 2009-12-10 09:23:06 UTC 
(rev 291941)
+++ php/php-src/trunk/ext/pdo_mysql/php_pdo_mysql_int.h 2009-12-10 09:35:10 UTC 
(rev 291942)
@@ -63,8 +63,6 @@

 #ifdef PDO_USE_MYSQLND
 ZEND_BEGIN_MODULE_GLOBALS(pdo_mysql)
-       MYSQLND_THD_ZVAL_PCACHE *mysqlnd_thd_zval_cache;
-       long          cache_size;
 #ifndef PHP_WIN32
        char          *default_socket;
 #endif

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

Reply via email to