diff options
Diffstat (limited to 'mysql-test/main/opt_trace.test')
-rw-r--r-- | mysql-test/main/opt_trace.test | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/mysql-test/main/opt_trace.test b/mysql-test/main/opt_trace.test index 0785d828a07..dab0dc6cdff 100644 --- a/mysql-test/main/opt_trace.test +++ b/mysql-test/main/opt_trace.test @@ -677,6 +677,39 @@ INSERT INTO t1 VALUES (0,0); SELECT a FROM t1 WHERE (a,b) in (SELECT @c,@d); DROP TABLE t1; + +--echo # +--echo # MDEV-30964: MAX_SEL_ARG memory exhaustion is not visible in the optimizer trace +--echo # +create table t1 ( + c1 int, + c2 int, + c3 int, + c4 int, + c5 int, + c6 int, + c7 int, + c8 int, + key(c1,c2,c3,c4,c5,c6,c7,c8) +); +insert into t1 () values (),(),(); + +explain select * +from t1 +where + (c1 in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16) and c2=1) and + c3 in (1,2,3,4,5,6,7,8,9,10) and + c4 in (1,2,3,4,5,6,7,8,9,10) and + c5 in (1,2,3,4,5,6,7,8,9,10) and + c6 in (1,2,3,4); + +select + json_detailed(json_extract(trace, '$**.setup_range_conditions')) +from + information_schema.optimizer_trace; + +drop table t1; + --echo # --echo # End of 10.4 tests --echo # |