Skip to content
Permalink
Browse files
MDEV-24117: Memory management problem (in range optimizer)
Adjust the testcase for MariaDB 10.3+ : prevent IN-to-subquery conversion
optimization from working.
  • Loading branch information
spetrunia committed Nov 10, 2020
1 parent 212d92a commit dba846c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
@@ -3056,7 +3056,7 @@ set @tmp_24117= @@max_session_mem_used;
# - 2.8M without the bug
# - 1G with the bug.
set max_session_mem_used=64*1024*1024;
set @query=concat('explain select * from t2 where a in (', @query, ')');
set @query=concat('explain select * from t2 where a=1 or a in (', @query, ')');
prepare s from @query;
# This should not fail with an error:
execute s;
@@ -2102,7 +2102,7 @@ set @tmp_24117= @@max_session_mem_used;

set max_session_mem_used=64*1024*1024;

set @query=concat('explain select * from t2 where a in (', @query, ')');
set @query=concat('explain select * from t2 where a=1 or a in (', @query, ')');

prepare s from @query;

@@ -3068,7 +3068,7 @@ set @tmp_24117= @@max_session_mem_used;
# - 2.8M without the bug
# - 1G with the bug.
set max_session_mem_used=64*1024*1024;
set @query=concat('explain select * from t2 where a in (', @query, ')');
set @query=concat('explain select * from t2 where a=1 or a in (', @query, ')');
prepare s from @query;
# This should not fail with an error:
execute s;

0 comments on commit dba846c

Please sign in to comment.