diff options
| author | Ulf Wendel <uw@php.net> | 2009-09-21 08:59:00 +0000 |
|---|---|---|
| committer | Ulf Wendel <uw@php.net> | 2009-09-21 08:59:00 +0000 |
| commit | 0d202cd84ddbc8cb25951f888edc0743cf91edb7 (patch) | |
| tree | 2a7cd4269c5fde66ad16e7c6fb4b5b13ae7e78ee | |
| parent | a65e1456e9858a987b20b51fd01f121b44b8558b (diff) | |
| download | php-git-0d202cd84ddbc8cb25951f888edc0743cf91edb7.tar.gz | |
Fixing test: references has to be collected even if the users disables the collection of statistics. It is needed for memory management.
| -rw-r--r-- | ext/mysqli/tests/mysqli_get_cache_stats_off.phpt | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/ext/mysqli/tests/mysqli_get_cache_stats_off.phpt b/ext/mysqli/tests/mysqli_get_cache_stats_off.phpt index 8f9fcc7f2d..4b0bab2406 100644 --- a/ext/mysqli/tests/mysqli_get_cache_stats_off.phpt +++ b/ext/mysqli/tests/mysqli_get_cache_stats_off.phpt @@ -33,10 +33,15 @@ if (!function_exists('mysqli_get_cache_stats')) { ; $after = mysqli_get_cache_stats(); - if ($before !== $after) { - printf("[004] Statistics have changed\n"); - var_dump($before); - var_dump($after); + /* 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); |
