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
The following test case demonstrate the problem:
create table t1 (a int) engine=myisam; |
create table t2 (a int) engine=myisam; |
create table t3 (a int) engine=myisam; |
create table t4 (a int) engine=myisam; |
insert into t1 values (0), (3), (1); |
insert into t2 values (1), (0); |
insert into t3 values (7), (3), (1); |
insert into t4 values (3), (8), (7), (1); |
create view v1 as select t1.a from (t1 join t2 on t1.a>t2.a) join (t3 join t4 on t4.a > t3.a) on t1.a<t4.a with check option; |
update v1 set v1.a=9 where v1.a=1; |
drop view v1; |
drop table t1,t2,t3,t4; |
The update statement above succeeds after which we have
MariaDB [test]> select * from t1;
|
+------+
|
| a |
|
+------+
|
| 0 |
|
| 3 |
|
| 9 |
|
+------+
|
It means that at least the condition t1.a<t4.a was not checked.
I debugger we see that the condition that is checked after a row update is actually:
t1.a > t2.a and t4.a > t3.a
|
Attachments
Issue Links
- relates to
-
MDEV-23336 CHECK OPTION is ignored for a multi-table update over a view
- Confirmed