summaryrefslogtreecommitdiff
path: root/ext/mysqli/tests/mysqli_options.phpt
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2010-04-29 13:19:57 +0000
committerAndrey Hristov <andrey@php.net>2010-04-29 13:19:57 +0000
commit60db5154d24086f5509e3a395c61944525018d51 (patch)
treec91fba684002059dcd87c567db7fd34369a0b750 /ext/mysqli/tests/mysqli_options.phpt
parentac172db01fdcdc1756bf267ed445951583e656d7 (diff)
downloadphp-git-60db5154d24086f5509e3a395c61944525018d51.tar.gz
Add a test case for the recently fixed memleak
Diffstat (limited to 'ext/mysqli/tests/mysqli_options.phpt')
-rw-r--r--ext/mysqli/tests/mysqli_options.phpt4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/mysqli/tests/mysqli_options.phpt b/ext/mysqli/tests/mysqli_options.phpt
index 1d5955b55e..de23adefad 100644
--- a/ext/mysqli/tests/mysqli_options.phpt
+++ b/ext/mysqli/tests/mysqli_options.phpt
@@ -53,6 +53,10 @@ already through other measures.
$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);