~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
#
2
# Bug31048: Many nested subqueries may cause server crash.
3
#
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),
6
  (6,7),(7,4),(5,3);
7
8
let $nesting= 26;
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 ;
14
15
--disable_result_log
16
--disable_query_log
17
# At least 4 level nesting should work without errors
18
while ($should_work_nesting)
19
{
20
--echo $should_work_nesting
21
  eval $start $end;
22
  eval explain $start $end;
23
  let $start= $start
24
  $start_app;
25
  let $end= $end_pre
26
  $end;
27
  dec $should_work_nesting;
28
}
29
# Other may fail with the 'stack overrun error'
30
while ($nesting)
31
{
32
--echo $nesting
2107.1.1 by Brian Aker
Add in all of the error messages, also remove all cases of --error number
33
--error EE_OK,ER_STACK_OVERRUN_NEED_MORE
1 by brian
clean slate
34
  eval $start $end;
2107.1.1 by Brian Aker
Add in all of the error messages, also remove all cases of --error number
35
--error EE_OK,ER_STACK_OVERRUN_NEED_MORE
1 by brian
clean slate
36
  eval explain $start $end;
37
  let $start= $start
38
  $start_app;
39
  let $end= $end_pre
40
  $end;
41
  dec $nesting;
42
}
43
--enable_result_log
44
--enable_query_log
45
drop table t1;
46
47
--echo End of 5.1 tests