andrey Wed, 26 May 2010 13:30:19 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=299782
Log:
Remove a function that has no usage. The zval cache was disabled/removed
in 5.3.0-RC3.
Changed paths:
U php/php-src/trunk/ext/mysqli/mysqli_fe.c
U php/php-src/trunk/ext/mysqli/mysqli_nonapi.c
U php/php-src/trunk/ext/mysqli/php_mysqli_structs.h
U php/php-src/trunk/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt
D php/php-src/trunk/ext/mysqli/tests/mysqli_get_cache_stats_off.phpt
Modified: php/php-src/trunk/ext/mysqli/mysqli_fe.c
===================================================================
--- php/php-src/trunk/ext/mysqli/mysqli_fe.c 2010-05-26 12:08:34 UTC (rev
299781)
+++ php/php-src/trunk/ext/mysqli/mysqli_fe.c 2010-05-26 13:30:19 UTC (rev
299782)
@@ -91,7 +91,6 @@
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
Modified: php/php-src/trunk/ext/mysqli/mysqli_nonapi.c
===================================================================
--- php/php-src/trunk/ext/mysqli/mysqli_nonapi.c 2010-05-26 12:08:34 UTC
(rev 299781)
+++ php/php-src/trunk/ext/mysqli/mysqli_nonapi.c 2010-05-26 13:30:19 UTC
(rev 299782)
@@ -383,18 +383,6 @@
/* }}} */
-/* {{{ 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)
Modified: php/php-src/trunk/ext/mysqli/php_mysqli_structs.h
===================================================================
--- php/php-src/trunk/ext/mysqli/php_mysqli_structs.h 2010-05-26 12:08:34 UTC
(rev 299781)
+++ php/php-src/trunk/ext/mysqli/php_mysqli_structs.h 2010-05-26 13:30:19 UTC
(rev 299782)
@@ -391,7 +391,6 @@
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_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);
Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt
===================================================================
--- php/php-src/trunk/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt
2010-05-26 12:08:34 UTC (rev 299781)
+++ php/php-src/trunk/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt
2010-05-26 13:30:19 UTC (rev 299782)
@@ -59,7 +59,6 @@
);
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;
Deleted: php/php-src/trunk/ext/mysqli/tests/mysqli_get_cache_stats_off.phpt
===================================================================
--- php/php-src/trunk/ext/mysqli/tests/mysqli_get_cache_stats_off.phpt
2010-05-26 12:08:34 UTC (rev 299781)
+++ php/php-src/trunk/ext/mysqli/tests/mysqli_get_cache_stats_off.phpt
2010-05-26 13:30:19 UTC (rev 299782)
@@ -1,64 +0,0 @@
---TEST--
-mysqli_get_cache_stats() - disabled via php.ini
---INI--
-mysqlnd.collect_statistics="0"
-mysqlnd.collect_memory_statistics="0"
---SKIPIF--
-<?PHP
-require_once('skipif.inc');
-require_once('skipifemb.inc');
-require_once('skipifconnectfailure.inc');
-if (!function_exists('mysqli_get_cache_stats')) {
- die("skip only available with mysqlnd");
-}
-?>
---FILE--
-<?php
- $before = mysqli_get_cache_stats();
- if (!is_array($before) || empty($before)) {
- printf("[001] Expecting non-empty array, got %s.\n",
gettype($before));
- var_dump($before);
- }
-
- require_once('table.inc');
- if (!$res = mysqli_query($link, "SELECT id, label FROM test")) {
- printf("[002] [%d] %s\n", mysqli_errno($link),
mysqli_error($link));
- }
- while ($row = mysqli_fetch_assoc($res))
- ;
- if (!$res = mysqli_query($link, "SELECT id, label FROM test")) {
- printf("[003] [%d] %s\n", mysqli_errno($link),
mysqli_error($link));
- }
- while ($row = mysqli_fetch_assoc($res))
- ;
-
- $after = mysqli_get_cache_stats();
- /* references has to be maintained - it is used for memory management */
- $ignore = array('references' => 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--
-<?php
- require_once("clean_table.inc");
-?>
---EXPECTF--
-done!
\ No newline at end of file
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php