summaryrefslogtreecommitdiff
path: root/mysql-test/t/sp.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/sp.test')
-rw-r--r--mysql-test/t/sp.test16
1 files changed, 13 insertions, 3 deletions
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test
index eea16d5d174..2b83e9a10dc 100644
--- a/mysql-test/t/sp.test
+++ b/mysql-test/t/sp.test
@@ -3749,15 +3749,25 @@ begin
return @x;
end|
-set @qcs1 = @@query_cache_size|
-set global query_cache_size = 102400|
+--disable_query_log
+--echo # Set query cache size, if we have query cache
+if (`select @@have_query_cache='YES'`) {
+ set @qcs1 = @@query_cache_size|
+ set global query_cache_size = 102400|
+}
+--enable_query_log
set @x = 1|
insert into t1 values ("qc", 42)|
select bug9902() from t1|
select bug9902() from t1|
select @x|
-set global query_cache_size = @qcs1|
+--echo # Restore the old query cache size
+--disable_query_log
+if (`select @@have_query_cache='YES'`) {
+ set global query_cache_size = @qcs1|
+}
+--enable_query_log
delete from t1|
drop function bug9902|