Bug #6894 Views: crash if correlated subquery
Submitted: 30 Nov 2004 16:33 Modified: 2 Mar 2005 21:30
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.2-alpha-debug OS:Linux (SuSE 8.2)
Assigned to: Oleksandr Byelkin CPU Architecture:Any

[30 Nov 2004 16:33] Peter Gulutzan
Description:
When I use a view in a correlated subquery that contains HAVING but not GROUP BY, 
the server crashes. 
 

How to repeat:
mysql> create table tq (s1 int, s2 char); 
Query OK, 0 rows affected (0.29 sec) 
 
mysql> create view vq as select s1, s2 from tq; 
Query OK, 0 rows affected (0.00 sec) 
 
mysql> select s2 from vq vq1 where 2 = (select count(*) from vq vq2 having vq1.s2 = 
vq2.s2); 
ERROR 2013 (HY000): Lost connection to MySQL server during query
[30 Nov 2004 18:16] MySQL Verification Team
Thank you for the bug report.
[15 Feb 2005 10:15] Oleksandr Byelkin
ChangeSet
  1.1823 05/02/15 12:13:46 bell@sanja.is.com.ua +3 -0
  Abort processing current Item is it resolved as view field (BUG#6894)
[24 Feb 2005 2:18] Oleksandr Byelkin
Thank you for bugreport!
Bugfix is pushed into 5.0.3 source repository.
[2 Mar 2005 21:30] Paul DuBois
Noted in 5.0.3 changelog.