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:
@ -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;
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user