Bug #5276 Views: SELECT hangs if view of a view of a view has an error

Submitted: 28 Aug 2004 1:52 Modified: 6 Sep 2004 13:54
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

[28 Aug 2004 1:52] Peter Gulutzan
Description:
If view1 is based on view2 is based on view3, and something is wrong with view2, then a 
select of view3 never returns. In the example, view2 uses a subquery which returns more 
than one row. That's only a guess ... maybe the problem lies with my use of UNION ALL. 
 
 

How to repeat:
mysql> create view v1 as select 'a',1; 
Query OK, 0 rows affected (0.00 sec) 
 
mysql> create view v2 as select * from v1 union all select * from v1; 
Query OK, 0 rows affected (0.01 sec) 
 
mysql> create view v3 as select * from v2 where 1 = (select `1` from v2); 
Query OK, 0 rows affected (0.01 sec) 
 
mysql> create view v4 as select * from v3; 
Query OK, 0 rows affected (0.00 sec) 
 
mysql> select * from v4;
[28 Aug 2004 6:20] MySQL Verification Team
Verified with latest BK source. Thank you for the bug report.
[2 Sep 2004 6:42] Oleksandr Byelkin
ChangeSet 
  1.1746 04/09/02 07:40:48 bell@sanja.is.com.ua +3 -0 
  fixed bug handling in views (BUG#5276)
[6 Sep 2004 13:54] Oleksandr Byelkin
Thank you for bugreport! Bugfix is pushed intou MySQL server 5.0 source repository.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.054 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.