diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-06-11 13:00:18 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-06-11 13:00:18 +0300 |
commit | b42dbdbccd3b939394ca9b608ad91a04235e95f1 (patch) | |
tree | e969f314963faa202fdb6f87d5aca67810844742 /tests | |
parent | 490dcfd5d74ce45cbdd6105e4295116f6a944e2b (diff) | |
parent | cbac8f935182ecc5bb907de3ae48942467f0b8ba (diff) | |
download | mariadb-git-b42dbdbccd3b939394ca9b608ad91a04235e95f1.tar.gz |
Merge 10.2 into 10.3
Diffstat (limited to 'tests')
-rw-r--r-- | tests/mysql_client_test.c | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 88e28f79789..43fe96a20f3 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); } @@ -13441,6 +13447,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"); @@ -13467,9 +13479,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); } @@ -18254,6 +18266,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"); @@ -18281,8 +18299,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; |