[MDEV-26925] Failure when using mysql_upgrade if 'root'@'localhost' does not exist Created: 2021-10-27  Updated: 2022-04-08  Resolved: 2021-12-16

Status: Closed
Project: MariaDB Server
Component/s: Upgrades
Affects Version/s: 10.6.4
Fix Version/s: 10.6.6

Type: Bug Priority: Critical
Reporter: Maria M Pflaum Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: None


 Description   

mysql> mysql_upgrade -u*** -p --socket=/tmp/mysql.sock1 --force -s
Enter password:
The --upgrade-system-tables option was used, user tables won't be touched.
Phase 1/7: Checking and upgrading mysql database
Processing databases
mysql
mysql.column_stats OK
mysql.columns_priv OK
...
mysql.transaction_registry OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views... Skipped
Phase 4/7: Running 'mysql_fix_privilege_tables'
ERROR 1449 (HY000) at line 832: The user specified as a definer ('root'@'localhost') does not exist
FATAL ERROR: Upgrade failed

If you do not use "force", the upgrade runs, but then setting a new value in SYS_CONFIG gives an error:

MariaDB [sys]> update sys_config set value = 128 where variable = 'statement_truncate_len';
ERROR 1449 (HY000): The user specified as a definer ('root'@'localhost') does not exist



 Comments   
Comment by Sergei Golubchik [ 2021-12-16 ]

wlad, the reporter says the bug is still present in 10.6.5-2. Please, check if the bug is indeed fixed, and add a test case to make sure it won't re-appear in the future (no matter how and what we merge or rebase).

Comment by Vladislav Vaintroub [ 2021-12-16 ]

The bug is of course fixed. It did not made it into 10.6.5, so I'm fixing the "Fix version". It was possible to choose that in ""Fixed in" field, and 10.6.5 was not released, so I do not feel any guilt about that.

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