2
# Bug31048: Many nested subqueries may cause server crash.
4
create table t1(a int,b int,key(a),key(b));
5
insert into t1(a,b) values (1,2),(2,1),(2,3),(3,4),(5,4),(5,5),
9
let $should_work_nesting= 5;
10
let $start= select sum(a),a from t1 where a> ( select sum(a) from t1 ;
11
let $end= )group by a ;
12
let $start_app= where a> ( select sum(a) from t1 ;
13
let $end_pre= )group by b limit 1 ;
17
# At least 4 level nesting should work without errors
18
while ($should_work_nesting)
20
--echo $should_work_nesting
22
eval explain $start $end;
27
dec $should_work_nesting;
29
# Other may fail with the 'stack overrun error'
36
eval explain $start $end;
47
--echo End of 5.1 tests