Bug #5993 Views with check option: no CASCADED unless all CHECK OPTION
Submitted: 8 Oct 2004 21:15 Modified: 22 Oct 2004 7:50
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

[8 Oct 2004 21:15] Peter Gulutzan
Description:
If I have a view v2 (with a check option) based on a view v1 
(without a check option), the WHERE condition of view v1 
should be checked. But MySQL doesn't check it. 
 

How to repeat:
mysql> create table tm (s1 tinyint); 
Query OK, 0 rows affected (0.27 sec) 
 
mysql> create view vm1 as select * from tm where s1 <> 0; 
Query OK, 0 rows affected (0.00 sec) 
 
mysql> create view vm2 as select * from vm1 where s1 <> 1 with cascaded check option; 
Query OK, 0 rows affected (0.00 sec) 
 
mysql> insert into vm2 values (0); 
Query OK, 1 row affected (0.00 sec)
[8 Oct 2004 21:51] MySQL Verification Team
Verified on latest BK source tree.
[21 Oct 2004 15:13] Oleksandr Byelkin
ChangeSet 
  1.1669 04/10/21 18:10:59 bell@sanja.is.com.ua +5 -0 
  new behaviour of CHECK option build, for mor efficience and more correct: 
  check option build only according most top VIEW  CHECK OPTION TYPE  (BUG#5993)
[22 Oct 2004 7:50] Oleksandr Byelkin
Thank you for bugreport! Bug is fixed, bugfix is pushed into our internal source repository.