summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-06-12 08:37:27 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-06-12 08:37:27 +0300
commit2fd82471aba9447e5490b24da5da89c33a21525e (patch)
tree562b878063c3d6224ba7090c7c01306a18561ec5 /tests
parent1f6b02e9f0059932da4a9c05fdfc26f473a89cde (diff)
parentb42dbdbccd3b939394ca9b608ad91a04235e95f1 (diff)
downloadmariadb-git-2fd82471aba9447e5490b24da5da89c33a21525e.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'tests')
-rw-r--r--tests/mysql_client_test.c30
1 files changed, 24 insertions, 6 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 40fbffa57bc..16bfa72985f 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -2348,6 +2348,12 @@ static void test_ps_query_cache()
"(2, 'hh', 'hh'), (1, 'ii', 'ii'), (2, 'ii', 'ii')");
myquery(rc);
+ rc= mysql_query(mysql,
+ "set @save_query_cache_type="
+ "@@global.query_cache_type,"
+ "@save_query_cache_size="
+ "@@global.query_cache_size");
+ myquery(rc);
rc= mysql_query(lmysql, "set global query_cache_type=ON");
myquery(rc);
rc= mysql_query(lmysql, "set local query_cache_type=ON");
@@ -2504,9 +2510,9 @@ static void test_ps_query_cache()
if (lmysql != mysql)
mysql_close(lmysql);
- rc= mysql_query(mysql, "set global query_cache_size=default");
+ rc= mysql_query(mysql, "set global query_cache_size=@save_query_cache_size");
myquery(rc);
- rc= mysql_query(mysql, "set global query_cache_type=default");
+ rc= mysql_query(mysql, "set global query_cache_type=@save_query_cache_type");
myquery(rc);
}
@@ -13522,6 +13528,12 @@ static void test_open_cursor_prepared_statement_query_cache()
return;
}
+ rc= mysql_query(mysql,
+ "set @save_query_cache_type="
+ "@@global.query_cache_type,"
+ "@save_query_cache_size="
+ "@@global.query_cache_size");
+ myquery(rc);
rc= mysql_query(mysql, "set global query_cache_type=ON");
myquery(rc);
rc= mysql_query(mysql, "set local query_cache_type=ON");
@@ -13548,9 +13560,9 @@ static void test_open_cursor_prepared_statement_query_cache()
check_execute(stmt, rc);
mysql_stmt_close(stmt);
- rc= mysql_query(mysql, "set global query_cache_type=default");
+ rc= mysql_query(mysql, "set global query_cache_type=@save_query_cache_type");
myquery(rc);
- rc= mysql_query(mysql, "set global query_cache_size=default");
+ rc= mysql_query(mysql, "set global query_cache_size=@save_query_cache_size");
myquery(rc);
}
@@ -18335,6 +18347,12 @@ static void test_bug36326()
myquery(rc);
rc= mysql_query(mysql, "INSERT INTO t1 VALUES (1)");
myquery(rc);
+ rc= mysql_query(mysql,
+ "set @save_query_cache_type="
+ "@@global.query_cache_type,"
+ "@save_query_cache_size="
+ "@@global.query_cache_size");
+ myquery(rc);
rc= mysql_query(mysql, "SET GLOBAL query_cache_type = 1");
myquery(rc);
rc= mysql_query(mysql, "SET LOCAL query_cache_type = 1");
@@ -18362,8 +18380,8 @@ static void test_bug36326()
DIE_UNLESS(rc == 1);
rc= mysql_query(mysql, "DROP TABLE t1");
myquery(rc);
- rc= mysql_query(mysql, "SET GLOBAL query_cache_size = default");
- rc= mysql_query(mysql, "SET GLOBAL query_cache_type = default");
+ rc= mysql_query(mysql, "SET GLOBAL query_cache_size = @save_query_cache_size");
+ rc= mysql_query(mysql, "SET GLOBAL query_cache_type = @save_query_cache_type");
myquery(rc);
DBUG_VOID_RETURN;