[MDEV-24435] UPDATE through a view requires an UPDATE GRANT on columns used for JOIN Created: 2020-12-18 Updated: 2023-04-27 |
|
| Status: | Confirmed |
| Project: | MariaDB Server |
| Component/s: | Authentication and Privilege System, Data Manipulation - Update, Views |
| Affects Version/s: | 10.1, 10.1.47, 10.3.27, 10.5.8, 10.2, 10.3, 10.4, 10.5, 10.6 |
| Fix Version/s: | 10.4, 10.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Ángel | Assignee: | Oleksandr Byelkin |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | upstream-fixed | ||
| Environment: |
Verified on Debian stable with mariadb versions 10.1, 10.3, 10.5.8 and 10.6 build-36886 (i.e. 2020-12-18) |
||
| Description |
|
When doing an UPDATE on a JOIN of views, mariadb requires that the user holds the UPDATE privilege on the columns referenced in the ON clause. Expected behavior: only SELECT should be needed on those columns. The = there are comparison operators, not assignments. Test setup:
Test execution:
Expected behavior: The second command should have succeeded, as in the real table ("You need the UPDATE privilege only for columns referenced in an UPDATE that are actually updated. You need only the SELECT privilege for any columns that are read but not modified."). |
| Comments |
| Comment by Elena Stepanova [ 2021-01-12 ] | ||||||||||||||||||||||||||||||||||||||||
|
Thanks for the report. Reproducible as described.
Reproducible on all of MariaDB 5.5-10.6 and MySQL 5.5. |