andrey Thu, 29 Apr 2010 13:19:57 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=298772
Log: Add a test case for the recently fixed memleak Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_options.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_options.phpt Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_options.phpt =================================================================== --- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_options.phpt 2010-04-29 13:13:41 UTC (rev 298771) +++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_options.phpt 2010-04-29 13:19:57 UTC (rev 298772) @@ -53,6 +53,10 @@ $link = mysqli_init(); + /* set it twice, checking if memory for the previous one is correctly freed */ + mysqli_options($link, MYSQLI_SET_CHARSET_NAME, "utf8"); + mysqli_options($link, MYSQLI_SET_CHARSET_NAME, "latin1"); + if (!is_null($tmp = @mysqli_options($link, MYSQLI_OPT_CONNECT_TIMEOUT))) printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_options.phpt =================================================================== --- php/php-src/trunk/ext/mysqli/tests/mysqli_options.phpt 2010-04-29 13:13:41 UTC (rev 298771) +++ php/php-src/trunk/ext/mysqli/tests/mysqli_options.phpt 2010-04-29 13:19:57 UTC (rev 298772) @@ -53,6 +53,10 @@ $link = mysqli_init(); + /* set it twice, checking if memory for the previous one is correctly freed */ + mysqli_options($link, MYSQLI_SET_CHARSET_NAME, "utf8"); + mysqli_options($link, MYSQLI_SET_CHARSET_NAME, "latin1"); + if (!is_null($tmp = @mysqli_options($link, MYSQLI_OPT_CONNECT_TIMEOUT))) printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php