Comment 15 for bug 532481

Revision history for this message
David Shrewsbury (dshrews) wrote :

The query that kills it has 28 subselects (see below). One less and it works. To reproduce this without going through the test-run nonsense...

create database test;
use test;
create table t1(a int, b int, key(a), key(b));
insert into t1(a,b) values (1,2),(2,1),(2,3),(3,4),(5,4),(5,5),(6,7),(7,4),(5,3);
select sum(a),a from t1 where a> (
 select sum(a) from t1 where a> (
  select sum(a) from t1 where a> (
   select sum(a) from t1 where a> (
    select sum(a) from t1 where a> (
     select sum(a) from t1 where a> (
      select sum(a) from t1 where a> (
       select sum(a) from t1 where a> (
        select sum(a) from t1 where a> (
         select sum(a) from t1 where a> (
          select sum(a) from t1 where a> (
           select sum(a) from t1 where a> (
            select sum(a) from t1 where a> (
             select sum(a) from t1 where a> (
              select sum(a) from t1 where a> (
               select sum(a) from t1 where a> (
                select sum(a) from t1 where a> (
                 select sum(a) from t1 where a> (
                  select sum(a) from t1 where a> (
                   select sum(a) from t1 where a> (
                    select sum(a) from t1 where a> (
                     select sum(a) from t1 where a> (
                      select sum(a) from t1 where a> (
                       select sum(a) from t1 where a> (
                        select sum(a) from t1 where a> (
                         select sum(a) from t1 where a> (
                          select sum(a) from t1 where a> (
                           select sum(a) from t1 where a> (
                            select sum(a) from t1 where a> ( select sum(a) from t1 ) group by b limit 1 )
                           group by b limit 1 )
                          group by b limit 1 )
                         group by b limit 1 )
                        group by b limit 1 )
                       group by b limit 1 )
                      group by b limit 1 )
                     group by b limit 1 )
                    group by b limit 1 )
                   group by b limit 1 )
                  group by b limit 1 )
                 group by b limit 1 )
                group by b limit 1 )
               group by b limit 1 )
              group by b limit 1 )
             group by b limit 1 )
            group by b limit 1 )
           group by b limit 1 )
          group by b limit 1 )
         group by b limit 1 )
        group by b limit 1 )
       group by b limit 1 )
      group by b limit 1 )
     group by b limit 1 )
    group by b limit 1 )
   group by b limit 1 )
  group by b limit 1 )
 group by b limit 1 )
group by a;