summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorkostja@dipika.(none) <>2008-02-26 17:25:21 +0300
committerkostja@dipika.(none) <>2008-02-26 17:25:21 +0300
commit4e116fe70bdee0e051adb8c271fc85c5e0f6062d (patch)
tree7f83c07a3c3ea80fb99f848678bc01d9a90a5255 /tests
parent79d4ed082b142ea7a693ce1d536dddb2b2dc5ee0 (diff)
downloadmariadb-git-4e116fe70bdee0e051adb8c271fc85c5e0f6062d.tar.gz
Valgrind errors in mysql_client_test.
Diffstat (limited to 'tests')
-rw-r--r--tests/mysql_client_test.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 7466f20fbdc..26c243d89a4 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -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);
@@ -17380,6 +17405,9 @@ static void test_bug28386()
mysql_free_result(result);
+ rc= mysql_query(mysql, "set @@global.general_log=@save_global_general_log");
+ myquery(rc);
+
DBUG_VOID_RETURN;
}