diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-06-12 08:37:27 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-06-12 08:37:27 +0300 |
commit | 2fd82471aba9447e5490b24da5da89c33a21525e (patch) | |
tree | 562b878063c3d6224ba7090c7c01306a18561ec5 /tests | |
parent | 1f6b02e9f0059932da4a9c05fdfc26f473a89cde (diff) | |
parent | b42dbdbccd3b939394ca9b608ad91a04235e95f1 (diff) | |
download | mariadb-git-2fd82471aba9447e5490b24da5da89c33a21525e.tar.gz |
Merge 10.3 into 10.4
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 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; |