1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Allow inheriting check options if view have not WHERE clause (BUG#5988)

mysql-test/r/view.result:
  test of cascaded check option for whiew without WHERE clause
mysql-test/t/view.test:
  test of cascaded check option for whiew without WHERE clause
sql/table.cc:
  Allow inheriting check options if view have not WHERE clause
This commit is contained in:
unknown
2004-10-21 13:30:25 +03:00
parent 0b01d95d21
commit adc1bff4f8
3 changed files with 25 additions and 4 deletions

View File

@ -1528,3 +1528,10 @@ substring_index(t,':',2)
12:24
drop view v1;
drop table t1;
create table t1 (s1 tinyint);
create view v1 as select * from t1 where s1 <> 0 with local check option;
create view v2 as select * from v1 with cascaded check option;
insert into v2 values (0);
ERROR HY000: CHECK OPTION failed 'test.v2'
drop view v2, v1;
drop table t1;

View File

@ -1471,3 +1471,14 @@ select substring_index(t,':',2) from t1;
select substring_index(t,':',2) from v1;
drop view v1;
drop table t1;
#
# test of cascaded check option for whiew without WHERE clause
#
create table t1 (s1 tinyint);
create view v1 as select * from t1 where s1 <> 0 with local check option;
create view v2 as select * from v1 with cascaded check option;
-- error 1369
insert into v2 values (0);
drop view v2, v1;
drop table t1;