[MDEV-23340] Incomplete condition is checked when updating a view defined using WITH CHECK OPTION clause Created: 2020-07-30 Updated: 2023-04-27 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Views |
| Affects Version/s: | 10.1.45, 10.2.32, 10.3.23, 10.4.13, 10.5.3 |
| Fix Version/s: | 10.4, 10.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Igor Babaev | Assignee: | Oleksandr Byelkin |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
The following test case demonstrate the problem:
The update statement above succeeds after which we have
It means that at least the condition t1.a<t4.a was not checked.
|
| Comments |
| Comment by Igor Babaev [ 2020-07-30 ] | |
|
MySQL 8.0 currently properly forms the condition checked when updating rows of a view whose definition contains WITH CHECK OPTION clause. It makes sense to port the corresponding code. | |
| Comment by Igor Babaev [ 2020-07-30 ] | |
|
This bug was actually fixed in MySQL 8.0 (see the commit 44395ac15f239c07dc7e681cadd44c60216ad27). Postgres 9.6 also handles the above test case properly. It returns:
|