diff options
author | Monty <monty@mariadb.org> | 2022-03-23 21:17:32 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2022-04-04 16:14:22 +0300 |
commit | c4ebb2bd04974807b3b81001fd2d733e75dfc1fb (patch) | |
tree | e14045f19ee08850fe90f008ddd95915959339f1 /client | |
parent | 09c7f78c2ef8c43d519eb4bad61d1be177a2c9b2 (diff) | |
download | mariadb-git-c4ebb2bd04974807b3b81001fd2d733e75dfc1fb.tar.gz |
Fixed that mysql_upgrade doesn't give errors about mariadb.sys
The reason for this fix was that when I tried to run mysql_upgrade
at home to update an old 10.5 installation, mysql_upgrade failed
with warnings about mariadb.sys user not existing.
If the server was started with --skip-grants, there would be no warnings
from mysql_upgrade, but in some cases running mysql_upgrade again could
produce new warnings.
The reason for the warnings was that any access of the mysql.user view
will produce a warning if the mariadb.sys user does not exists.
Fixed with the following changes:
- Disable warnings about mariadb.sys user not existing
- Don't overwrite old mariadb.sys entries in tables_priv and global_priv
- Ensure that tables_priv has an entry for mariadb.sys if the user exists.
This fixes an issue that tables_priv would not be updated if there
was a failure directly after global_priv was updated.
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql_upgrade.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c index 0608665d6fc..6d5c954bd08 100644 --- a/client/mysql_upgrade.c +++ b/client/mysql_upgrade.c @@ -1029,6 +1029,7 @@ static const char *expected_errors[]= "ERROR 1347", /* 'mysql.user' is not of type 'BASE TABLE' */ "ERROR 1348", /* Column 'Show_db_priv' is not updatable */ "ERROR 1356", /* definer of view lack rights (UPDATE) */ + "ERROR 1449", /* definer ('mariadb.sys'@'localhost') of mysql.user does not exist */ 0 }; |