Below is the list of changes that have just been committed into a local
5.1 repository of kostja. When kostja 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, 2008-02-26 17:25:21+03:00, kostja@dipika.(none) +1 -0
Valgrind errors in mysql_client_test.
tests/mysql_client_test.c@stripped, 2008-02-26 17:25:19+03:00, kostja@dipika.(none) +28 -0
Fix a memory leak.
Run the test for Bug#28386 only if logging to tables is enabled.
diff -Nrup a/tests/mysql_client_test.c b/tests/mysql_client_test.c
--- a/tests/mysql_client_test.c 2008-02-26 16:12:23 +03:00
+++ b/tests/mysql_client_test.c 2008-02-26 17:25:19 +03:00
@@ -8985,6 +8985,7 @@ static void test_sqlmode()
fprintf(stdout, "\n query: %s", query);
stmt= mysql_simple_prepare(mysql, query);
check_stmt(stmt);
+ mysql_stmt_close(stmt);
/* ANSI */
strmov(query, "SET SQL_MODE= \"ANSI\"");
@@ -17334,12 +17335,36 @@ static void test_bug28386()
int rc;
MYSQL_STMT *stmt;
MYSQL_RES *result;
+ MYSQL_ROW row;
MYSQL_BIND bind;
const char hello[]= "hello world!";
DBUG_ENTER("test_bug28386");
myheader("test_bug28386");
+ rc= mysql_query(mysql, "select @@global.log_output");
+ myquery(rc);
+
+ result= mysql_store_result(mysql);
+ DIE_UNLESS(result);
+
+ row= mysql_fetch_row(result);
+ if (! strstr(row[0], "TABLE"))
+ {
+ mysql_free_result(result);
+ if (! opt_silent)
+ printf("Skipping the test since logging to tables is not enabled\n");
+ /* Log output is not to tables */
+ return;
+ }
+ mysql_free_result(result);
+
+ rc= mysql_query(mysql, "set @save_global_general_log=@@global.general_log");
+ myquery(rc);
+
+ rc= mysql_query(mysql, "set @@global.general_log=on");
+ myquery(rc);
+
rc= mysql_query(mysql, "truncate mysql.general_log");
myquery(rc);
@@ -17379,6 +17404,9 @@ static void test_bug28386()
DIE_UNLESS(mysql_num_rows(result) == 3);
mysql_free_result(result);
+
+ rc= mysql_query(mysql, "set @@global.general_log=@save_global_general_log");
+ myquery(rc);
DBUG_VOID_RETURN;
}
| Thread |
|---|
| • bk commit into 5.1 tree (kostja:1.2581) | konstantin | 26 Feb |