[MDEV-22478] Bad error ER_VIEW_INVALID returned upon attempt to insert into mysql.user Created: 2020-05-05  Updated: 2023-03-03

Status: Open
Project: MariaDB Server
Component/s: Authentication and Privilege System
Affects Version/s: N/A
Fix Version/s: 10.4, 10.5

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Unresolved Votes: 0
Labels: regression

Issue Links:
Relates
relates to MDEV-19650 Privilege bug on MariaDB 10.4 Closed

 Description   

MDEV-19650 introduced a new definer for mysql.user view, with just enough permissions to perform valid operations on the view.

A side effect of it is that an attempt to insert into the view (which is an invalid operation) started producing a bad error code. Instead of the former accurate ER_NON_INSERTABLE_TABLE ("The target table user of the INSERT is not insertable-into") it now returns the less user-friendly ER_VIEW_INVALID ("View 'mysql.user' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them").



 Comments   
Comment by Otto Kekäläinen [ 2023-03-03 ]

A previous bugfix submission for mysql.user view in https://github.com/MariaDB/server/pull/1926 was rejected on the grounds that the view is frozen and it should not be changed even if it has wrong information. If you decide to fix this mysql.user view bug, then I hope you could re-consider #1926 as well.

Generated at Thu Feb 08 09:15:02 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.