Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.1.45, 10.2.32, 10.3.23, 10.4.13, 10.5.3
-
None
Description
If a view v1 is defined using WITH CHECK OPTION clause and is is used by another view v2 without such clause the check option is not honoured when updating view v2 or when inserting into v2.
The following test case demonstrate the problem:
create table t1 (a int) ; |
insert into t1 values (3), (8), (7), (1); |
create view v1 as select * from t1 where a < 5 with check option; |
create view v2 as select * from v1 where a > 1; |
update v2 set a=9 where a=3; |
select * from t1; |
drop view v1; |
drop table t1; |
After update we have:
MariaDB [test]> select * from t1;
|
+------+
|
| a |
|
+------+
|
| 9 |
|
| 8 |
|
| 7 |
|
| 1 |
|
+------+
|
and we see that the new row violates check option for view v1.
Attachments
Issue Links
- relates to
-
MDEV-23336 CHECK OPTION is ignored for a multi-table update over a view
- Confirmed