[MDEV-20473] mysql_upgrade can delete all user Created: 2019-09-03  Updated: 2019-09-19

Status: Open
Project: MariaDB Server
Component/s: Authentication and Privilege System, Scripts & Clients
Affects Version/s: 10.4
Fix Version/s: 10.4

Type: Bug Priority: Major
Reporter: Richard Stracke Assignee: Oleksandr Byelkin
Resolution: Unresolved Votes: 0
Labels: None


 Description   

In mysql_upgrade the new table global_priv will be created like this:

CREATE TABLE IF NOT EXISTS global_priv  [...]
select  Host, User, JSON_COMPACT from mysql.user.
 
 DROP TABLE user; 

If this select fails, all user will be deleted in the migration process.

So DROP TABLE user; should only be executed,
if the select get no error or return at least 1 row.



 Comments   
Comment by Sergei Golubchik [ 2019-09-03 ]

looking at the original issue, I'd say that mysql_upgrade should properly convert the table structure before doing create...select and rename auth_string to authentication_string

Generated at Thu Feb 08 08:59:44 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.