svn: /php/php-src/ branches/PHP_5_3/ext/mysqli/tests/mysqli_options.phpt trunk/ext/mysqli/tests/mysqli_options.phpt
| From: | Andrey Hristov | Date: | Thu, 29 Apr 2010 13:19:57 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_3/ext/mysqli/tests/mysqli_options.phpt trunk/ext/mysqli/tests/mysqli_options.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-62483@lists.php.net to get a copy of this message | ||
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);