View Metadata WITH CHECK OPTION  testing is standard-compliant: Consider the definitions for the following table and set of views: Here the  v2  and  v3  views are defined in terms of another view,  v1 . Inserts for  v2  are checked against its  LOCAL  check option, then the check recurses to  v1  and the rules are applied again. The rules for  v1  cause a check failure. The check for  v3  also fails: To obtain metadata about views: Stored programs (procedures, functions, triggers, and events) and views are defined prior to use and, when referenced, execute within a security context that determines their privileges. The privileges applicable to execution of a stored object are controlled by its  DEFINER  attribute and  SQL SECURITY characteristic. 4750 •Risk-Minimization Guidelines •Orphan Stored Objects •Examples •The SQL SECURITY Characteristic •The DEFINER Attribute •Use the  SHOW CREATE VIEW  statement. See Section 13.7.7.13, “SHOW CREATE VIEW Statement” . •Query the  VIEWS  table of the  INFORMATION_SCHEMA  database. See Section 26.3.48, “The INFORMATION_SCHEMA VIEWS Table” . •With no check option, the view  WHERE  clause is not checked, then checking recurses to underlying views, and applies the same rules. •With  CASCADED , the view  WHERE  clause is checked, then checking recurses to underlying views, adds  WITH CASCADED CHECK OPTION  to them (for purposes of the check; their definitions remain unchanged), and applies the same rules. •With  LOCAL , the view  WHERE  clause is checked, then checking recurses to underlying views and applies the same rules. CREATE TABLE t1 (a INT); CREATE VIEW v1 AS SELECT * FROM t1 WHERE a < 2 WITH CHECK OPTION; CREATE VIEW v2 AS SELECT * FROM v1 WHERE a > 0 WITH LOCAL CHECK OPTION; CREATE VIEW v3 AS SELECT * FROM v1 WHERE a > 0 WITH CASCADED CHECK OPTION; mysql>  INSERT INTO v2 VALUES (2); ERROR 1369 (HY000): CHECK OPTION failed ’test.v2’ mysql>  INSERT INTO v3 VALUES (2); ERROR 1369 (HY000): CHECK OPTION failed ’test.v3’ 25.5.5 View Metadata 25.6 Stored Object Access Control