From f9ad56eab9e0010231643d51a0e0038f99f2f94b Mon Sep 17 00:00:00 2001 From: Andrey Hristov Date: Wed, 26 May 2010 13:30:19 +0000 Subject: [PATCH] Remove a function that has no usage. The zval cache was disabled/removed in 5.3.0-RC3. --- ext/mysqli/mysqli_fe.c | 1 - ext/mysqli/mysqli_nonapi.c | 12 ---- ext/mysqli/php_mysqli_structs.h | 2 - .../tests/mysqli_class_mysqli_interface.phpt | 1 - .../tests/mysqli_get_cache_stats_off.phpt | 64 ------------------- 5 files changed, 80 deletions(-) delete mode 100644 ext/mysqli/tests/mysqli_get_cache_stats_off.phpt diff --git a/ext/mysqli/mysqli_fe.c b/ext/mysqli/mysqli_fe.c index 0f9c9b6943..12e717d105 100644 --- a/ext/mysqli/mysqli_fe.c +++ b/ext/mysqli/mysqli_fe.c @@ -91,7 +91,6 @@ const zend_function_entry mysqli_functions[] = { PHP_FE(mysqli_field_tell, NULL) PHP_FE(mysqli_free_result, NULL) #if defined(MYSQLI_USE_MYSQLND) - PHP_FE(mysqli_get_cache_stats, NULL) PHP_FE(mysqli_get_connection_stats, NULL) PHP_FE(mysqli_get_client_stats, NULL) #endif diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c index ad3e815a5c..e50fda93d0 100644 --- a/ext/mysqli/mysqli_nonapi.c +++ b/ext/mysqli/mysqli_nonapi.c @@ -383,18 +383,6 @@ PHP_FUNCTION(mysqli_fetch_all) /* }}} */ -/* {{{ proto array mysqli_cache_stats(void) U - Returns statistics about the zval cache */ -PHP_FUNCTION(mysqli_get_cache_stats) -{ - if (zend_parse_parameters_none() == FAILURE) { - return; - } - array_init(return_value); -} -/* }}} */ - - /* {{{ proto array mysqli_get_client_stats(void) Returns statistics about the zval cache */ PHP_FUNCTION(mysqli_get_client_stats) diff --git a/ext/mysqli/php_mysqli_structs.h b/ext/mysqli/php_mysqli_structs.h index 737641eace..9c2433ec1b 100644 --- a/ext/mysqli/php_mysqli_structs.h +++ b/ext/mysqli/php_mysqli_structs.h @@ -391,7 +391,6 @@ ZEND_BEGIN_MODULE_GLOBALS(mysqli) long num_inactive_persistent; long max_persistent; long allow_persistent; - long cache_size; unsigned long default_port; char *default_host; char *default_user; @@ -456,7 +455,6 @@ PHP_FUNCTION(mysqli_field_count); PHP_FUNCTION(mysqli_field_seek); PHP_FUNCTION(mysqli_field_tell); PHP_FUNCTION(mysqli_free_result); -PHP_FUNCTION(mysqli_get_cache_stats); PHP_FUNCTION(mysqli_get_client_stats); PHP_FUNCTION(mysqli_get_connection_stats); PHP_FUNCTION(mysqli_get_charset); diff --git a/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt b/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt index 50c66d4f4d..a68fb15812 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt @@ -59,7 +59,6 @@ require_once('skipifconnectfailure.inc'); ); if ($IS_MYSQLND) { // mysqlnd only - /* $expected_methods['get_cache_stats'] = true; */ /* $expected_methods['get_client_stats'] = true; */ $expected_methods['get_connection_stats'] = true; $expected_methods['poll'] = true; diff --git a/ext/mysqli/tests/mysqli_get_cache_stats_off.phpt b/ext/mysqli/tests/mysqli_get_cache_stats_off.phpt deleted file mode 100644 index 4b0bab2406..0000000000 --- a/ext/mysqli/tests/mysqli_get_cache_stats_off.phpt +++ /dev/null @@ -1,64 +0,0 @@ ---TEST-- -mysqli_get_cache_stats() - disabled via php.ini ---INI-- -mysqlnd.collect_statistics="0" -mysqlnd.collect_memory_statistics="0" ---SKIPIF-- - ---FILE-- - true); - foreach ($before as $k => $v) { - if (isset($ignore[$k])) - continue; - - if ($before[$k] != $after[$k]) - printf("[004] Statistics have changed - %s: %s => %s\n", $ - $k, $before[$k], $after[$k]); - } - - $ignore = array("size" => true, "free_items" => true, "references" => true); - foreach ($after as $k => $v) { - if ($v != 0 && !isset($ignore[$k])) { - printf("[005] Field %s should not have any other value but 0, got %s.\n", - $k, $v); - } - } - - mysqli_close($link); - - print "done!"; -?> ---CLEAN-- - ---EXPECTF-- -done! \ No newline at end of file -- 2.49.0