Bug #8490 Select from views containing subqueries causes server to hang forever.
Submitted: 13 Feb 2005 19:55 Modified: 26 Apr 2005 3:12
Reporter: Sergey Petrunya Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0 OS:Any (*)
Assigned to: Sergey Petrunya CPU Architecture:Any

[13 Feb 2005 19:55] Sergey Petrunya
Description:
The attached test case below causes mysqld to hang forever on the last query. 

Server built with compile-pentium-debug, tip cset is 
ChangeSet@1.1839.8.1, 2005-02-13 01:36:35+04:00, hf@deer.(none)

How to repeat:
create table t10 as select 1 A union select 2 union select 3;
create table t11 as select * from t10;
select * from t10 where a in (select * from t11);
create view v10 as select * from t10 where a in (select * from t11);
select * from v10 where a in (3,4);
select * from v10 A, v10 B where A.a = B.a;
[13 Feb 2005 20:48] Aleksey Kishkin
on windows (5.0.2) it also hangs computer (actualy loads very heavily)
[22 Apr 2005 20:09] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/24240
[25 Apr 2005 0:24] Sergey Petrunya
Pushed into 5.0.5 tree
[26 Apr 2005 3:12] Paul DuBois
Noted in 5.0.5 changelog.