uw Mon, 21 Sep 2009 08:59:00 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=288511
Log:
Fixing test: references has to be collected even if the users disables the
collection of statistics. It is needed for memory management.
Changed paths:
U
php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_get_cache_stats_off.phpt
U php/php-src/trunk/ext/mysqli/tests/mysqli_get_cache_stats_off.phpt
Modified:
php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_get_cache_stats_off.phpt
===================================================================
---
php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_get_cache_stats_off.phpt
2009-09-21 08:36:14 UTC (rev 288510)
+++
php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_get_cache_stats_off.phpt
2009-09-21 08:59:00 UTC (rev 288511)
@@ -33,10 +33,15 @@
;
$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);
Modified: 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
2009-09-21 08:36:14 UTC (rev 288510)
+++ php/php-src/trunk/ext/mysqli/tests/mysqli_get_cache_stats_off.phpt
2009-09-21 08:59:00 UTC (rev 288511)
@@ -33,10 +33,15 @@
;
$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);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php