From b72437494b872d5fd94623dad0e608f6720aef86 Mon Sep 17 00:00:00 2001 From: Andrey Hristov Date: Thu, 29 Apr 2010 13:19:57 +0000 Subject: [PATCH] Add a test case for the recently fixed memleak --- ext/mysqli/tests/mysqli_options.phpt | 4 ++++ 1 file changed, 4 insertions(+) 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); -- 2.40.0