Monty reported that the following query, taken from the crash-me.sh script takes much longer in 5.3:
select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me))))))))))))))))))))))))))))))))
IRC conversation:
(16:13:57) montywi: spetrunia: the following query takes much longer in 5.3 than in 5.2: ))))))) ))))))) ))))))) ))))))) ))) pastie. org/2427796
(16:14:00) montywi: select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where
(16:14:00) montywi: a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_m
(16:14:02) montywi: e where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me where a in (select a from crash_me)
(16:14:22) montywi: this for a table with one row
(16:14:25) montywi: This is in crash-me.sh
(16:15:22) montywi: timour: see above. We are talking about minutes
(16:16:44) timour: montywi, hi, I will investigate later today, have to do some admin stuff before the call today.
(16:17:02) montywi: no big problem, just something we need to take a look at
(16:17:21) montywi: can't understand how the above could 'take forever' for a table with 1 row
(16:17:56) montywi: In 5.2 the subqueries are probably regarded as a constant which explains why it was fast
(16:20:47) timour: montywi, yes, this is one of the changes in 5.3 - we do not evaluate subqueries during optimization. However, minutes seems to be too much, have to investigate.
(16:22:21) spetrunia: montywi: checking
(16:22:37) montywi: have now run for 10 minutes
(16:24:33) spetrunia: montywi: what does EXPLAIN say?
(16:24:53) spetrunia: I'm wondering what there could be done for so much time with a table of 1 row..
(16:24:57) ***spetrunia tries to repeat
(16:25:05) montywi: http://
(16:25:54) montywi: | 1 | PRIMARY | crash_me | system | NULL | NULL | NULL | NULL | 1 | |
(16:25:54) montywi: | 2 | DEPENDENT SUBQUERY | crash_me | system | NULL | NULL | NULL | NULL | 1 | |
(16:26:10) montywi: and then row 2 is repeated for 32 times
(16:26:12) spetrunia: I get ERROR 1473 (HY000): Too high level of nesting for select
(16:26:24) spetrunia: thread_stack...
(16:29:00) spetrunia: nope, thread_stack doesn't help
(16:29:06) spetrunia: still the same error
(16:29:40) spetrunia: ok repeated
(16:34:08) spetrunia: montywi: execution doesn't make much sense.. I think there is a bug somewhere
(16:34:16) spetrunia: and I doubt that the query will ever finish
(16:34:29) spetrunia: (I could repeat with a select 1 level s...