summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorunknown <holyfoot/hf@mysql.com/hfmain.(none)>2007-07-19 20:59:11 +0500
committerunknown <holyfoot/hf@mysql.com/hfmain.(none)>2007-07-19 20:59:11 +0500
commit223f3978f8f5acd52943c80097ea4919d4e4fcc1 (patch)
treeeeeaaf9990487ff0a9961feae01ffef4aa027102 /tests
parent244c7ef3153c1831313269f306825368fd5e64e8 (diff)
downloadmariadb-git-223f3978f8f5acd52943c80097ea4919d4e4fcc1.tar.gz
test case for memory leak added
tests/mysql_client_test.c: test case added
Diffstat (limited to 'tests')
-rw-r--r--tests/mysql_client_test.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index cb1561ad6f5..3a516545096 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -16271,6 +16271,38 @@ static void test_bug27592()
}
+
+/*
+ Bug#29687 mysql_stmt_store_result memory leak in libmysqld
+*/
+
+static void test_bug29687()
+{
+ const int NUM_ITERATIONS= 40;
+ int i;
+ int rc;
+ MYSQL_STMT *stmt= NULL;
+
+ DBUG_ENTER("test_bug29687");
+ myheader("test_bug29687");
+
+ stmt= mysql_simple_prepare(mysql, "SELECT 1 FROM dual WHERE 0=2");
+ DIE_UNLESS(stmt);
+
+ for (i= 0; i < NUM_ITERATIONS; i++)
+ {
+ mysql_stmt_execute(stmt);
+ check_execute(stmt, rc);
+ mysql_stmt_store_result(stmt);
+ while (mysql_stmt_fetch(stmt)==0);
+ mysql_stmt_free_result(stmt);
+ }
+
+ mysql_stmt_close(stmt);
+ DBUG_VOID_RETURN;
+}
+
+
/*
Read and parse arguments and MySQL options from my.cnf
*/
@@ -16560,6 +16592,7 @@ static struct my_tests_st my_tests[]= {
{ "test_bug28505", test_bug28505 },
{ "test_bug28934", test_bug28934 },
{ "test_bug27592", test_bug27592 },
+ { "test_bug29687", test_bug29687 },
{ 0, 0 }
};