[MDEV-22909] ERROR 1449 (HY000): The user specified as a definer ('mariadb.sys'@'localhost') does not exist inconsistency/regression (on optimized builds) Created: 2020-06-16  Updated: 2020-06-26  Resolved: 2020-06-24

Status: Closed
Project: MariaDB Server
Component/s: Authentication and Privilege System
Affects Version/s: 10.5.4, 10.4.14
Fix Version/s: N/A

Type: Bug Priority: Blocker
Reporter: Roel Van de Paar Assignee: Sergei Golubchik
Resolution: Not a Bug Votes: 0
Labels: not-10.1, not-10.2, not-10.3, regression, security


 Description   

SELECT user,host FROM mysql.user;
SELECT USER(),CURRENT_USER();
DELETE FROM mysql.user WHERE user like '%';
SELECT user,host FROM mysql.user;
FLUSH PRIVILEGES;  
SELECT USER(),CURRENT_USER();
# Following query will produce ERROR 1449 on 10.4.14 and 10.5.4 (opt+dbg on both), 
# And "OK" on 10.1.46, 10.2.33, and 10.3.24 (dbg+opt both tested on all) and MySQL 5.5.62, 5.6.47, 5.7.29, and 8.0.19 (opt tested on all)
SELECT * FROM mysql.user;  

10.5.4 4080e3acefd7e58d88c2f3539fb6a0fb359cf057

10.5.4>SELECT * FROM mysql.user;  
ERROR 1449 (HY000): The user specified as a definer ('mariadb.sys'@'localhost') does not exist



 Comments   
Comment by Roel Van de Paar [ 2020-06-16 ]

History/possibly related: MDEV-22542, MDEV-22477, MDEV-19650, MDEV-22683, (DBAAS-3699), (TODO-2339), (TODO-2372)

Comment by Sergei Golubchik [ 2020-06-24 ]

mysql.user is a view, its definer is mariadb.sys@localhost user. You delete this user — the view becomes not accessible. This is expected.

Comment by Roel Van de Paar [ 2020-06-25 ]

serg Understood. How about the differences between the versions?

Comment by Sergei Golubchik [ 2020-06-25 ]

The difference is due to the fact that 10.4 uses mysql.global_priv and older versions use mysql.user to store user information

Comment by Roel Van de Paar [ 2020-06-26 ]

Aha, understood. Thank you for the input.

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