Loading mysql-test/r/replace.result +6 −0 Original line number Diff line number Diff line Loading @@ -24,3 +24,9 @@ a b 63 default_value 127 last drop table t1; CREATE TABLE t1 (f1 INT); CREATE VIEW v1 AS SELECT f1 FROM t1 WHERE f1 = 0 WITH CHECK OPTION; REPLACE INTO v1 (f1) VALUES (1); ERROR HY000: CHECK OPTION failed 'test.v1' DROP TABLE t1; DROP VIEW v1; mysql-test/t/replace.test +10 −0 Original line number Diff line number Diff line Loading @@ -35,3 +35,13 @@ select * from t1; drop table t1; # End of 4.1 tests # # Bug#19789: REPLACE was allowed for a VIEW with CHECK OPTION enabled. # CREATE TABLE t1 (f1 INT); CREATE VIEW v1 AS SELECT f1 FROM t1 WHERE f1 = 0 WITH CHECK OPTION; --error 1369 REPLACE INTO v1 (f1) VALUES (1); DROP TABLE t1; DROP VIEW v1; sql/sql_lex.h +2 −0 Original line number Diff line number Diff line Loading @@ -1000,6 +1000,8 @@ typedef struct st_lex case SQLCOM_UPDATE_MULTI: case SQLCOM_INSERT: case SQLCOM_INSERT_SELECT: case SQLCOM_REPLACE: case SQLCOM_REPLACE_SELECT: case SQLCOM_LOAD: return TRUE; default: Loading Loading
mysql-test/r/replace.result +6 −0 Original line number Diff line number Diff line Loading @@ -24,3 +24,9 @@ a b 63 default_value 127 last drop table t1; CREATE TABLE t1 (f1 INT); CREATE VIEW v1 AS SELECT f1 FROM t1 WHERE f1 = 0 WITH CHECK OPTION; REPLACE INTO v1 (f1) VALUES (1); ERROR HY000: CHECK OPTION failed 'test.v1' DROP TABLE t1; DROP VIEW v1;
mysql-test/t/replace.test +10 −0 Original line number Diff line number Diff line Loading @@ -35,3 +35,13 @@ select * from t1; drop table t1; # End of 4.1 tests # # Bug#19789: REPLACE was allowed for a VIEW with CHECK OPTION enabled. # CREATE TABLE t1 (f1 INT); CREATE VIEW v1 AS SELECT f1 FROM t1 WHERE f1 = 0 WITH CHECK OPTION; --error 1369 REPLACE INTO v1 (f1) VALUES (1); DROP TABLE t1; DROP VIEW v1;
sql/sql_lex.h +2 −0 Original line number Diff line number Diff line Loading @@ -1000,6 +1000,8 @@ typedef struct st_lex case SQLCOM_UPDATE_MULTI: case SQLCOM_INSERT: case SQLCOM_INSERT_SELECT: case SQLCOM_REPLACE: case SQLCOM_REPLACE_SELECT: case SQLCOM_LOAD: return TRUE; default: Loading