Commit 4e116fe7 authored by kostja@dipika.(none)'s avatar kostja@dipika.(none)

Valgrind errors in mysql_client_test.

parent 79d4ed08
...@@ -8985,6 +8985,7 @@ static void test_sqlmode() ...@@ -8985,6 +8985,7 @@ static void test_sqlmode()
fprintf(stdout, "\n query: %s", query); fprintf(stdout, "\n query: %s", query);
stmt= mysql_simple_prepare(mysql, query); stmt= mysql_simple_prepare(mysql, query);
check_stmt(stmt); check_stmt(stmt);
mysql_stmt_close(stmt);
/* ANSI */ /* ANSI */
strmov(query, "SET SQL_MODE= \"ANSI\""); strmov(query, "SET SQL_MODE= \"ANSI\"");
...@@ -17334,12 +17335,36 @@ static void test_bug28386() ...@@ -17334,12 +17335,36 @@ static void test_bug28386()
int rc; int rc;
MYSQL_STMT *stmt; MYSQL_STMT *stmt;
MYSQL_RES *result; MYSQL_RES *result;
MYSQL_ROW row;
MYSQL_BIND bind; MYSQL_BIND bind;
const char hello[]= "hello world!"; const char hello[]= "hello world!";
DBUG_ENTER("test_bug28386"); DBUG_ENTER("test_bug28386");
myheader("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"); rc= mysql_query(mysql, "truncate mysql.general_log");
myquery(rc); myquery(rc);
...@@ -17380,6 +17405,9 @@ static void test_bug28386() ...@@ -17380,6 +17405,9 @@ static void test_bug28386()
mysql_free_result(result); mysql_free_result(result);
rc= mysql_query(mysql, "set @@global.general_log=@save_global_general_log");
myquery(rc);
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment