Bug #5989 Views with check option: wrong default assumption
Submitted: 8 Oct 2004 21:01 Modified: 22 Oct 2004 7:47
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:01] Peter Gulutzan
Description:
In standard SQL, the default WITH CHECK OPTION is 
WITH CASCADED CHECK OPTION. 
 
But MySQL assumes the default is WITH LOCAL CHECK OPTION. 
 
I can see this with SHOW CREATE VIEW. 
 
 

How to repeat:
mysql> create table tj (s1 tinyint); 
Query OK, 0 rows affected (0.30 sec) 
 
mysql> create view vj as select * from tj with check option; 
Query OK, 0 rows affected (0.00 sec) 
 
mysql> show create view vj; 
+------+----------------------------------------------+ 
| View | Create View                                  | 
+------+----------------------------------------------+ 
| vj   | CREATE ALGORITHM=UNDEFINED VIEW `db11`.`vj` 
         AS select `db11`.`tj`.`s1` AS `s1` from 
	 `db11`.`tj` WITH LOCAL CHECK OPTION          | 
+------+----------------------------------------------+ 
1 row in set (0.00 sec)
[8 Oct 2004 22:02] MySQL Verification Team
Verified on latest Bk source tree.
[21 Oct 2004 10:43] Oleksandr Byelkin
ChangeSet 
  1.1666 04/10/21 13:39:17 bell@sanja.is.com.ua +2 -0 
  fixed default behaviour of WITH CHECK OPTIONS according to standard (BUG#5989)
[22 Oct 2004 7:47] Oleksandr Byelkin
Thank you for bugreport! Bugfix is pushed into our source repository.