MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:holyfoot Date:July 19 2007 3:59pm
Subject:bk commit into 5.1 tree (holyfoot:1.2539)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of hf. When hf does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-07-19 20:59:11+05:00, holyfoot@stripped +1 -0
  test case for memory leak added

  tests/mysql_client_test.c@stripped, 2007-07-19 20:59:09+05:00, holyfoot@stripped +33 -0
    test case added

diff -Nrup a/tests/mysql_client_test.c b/tests/mysql_client_test.c
--- a/tests/mysql_client_test.c	2007-07-02 02:54:58 +05:00
+++ b/tests/mysql_client_test.c	2007-07-19 20:59:09 +05:00
@@ -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 }
 };
 
Thread
bk commit into 5.1 tree (holyfoot:1.2539)holyfoot19 Jul