1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-24363 mysql.user password_expired column is incorrect

The mysql.user view password_expired column should display the right
result, in sync with whether an account has its password expired or not

For mariadb 10.4+ upgrades before this commit, the mysql.user view needs
to be dropped and recreated to actually make the view display the
correct value for the password_expired column.
This commit is contained in:
Robert Bindar
2021-02-02 14:57:16 +02:00
parent a26e7a3726
commit 363ba10784
14 changed files with 209 additions and 13 deletions

View File

@ -824,7 +824,7 @@ IF 'BASE TABLE' = (select table_type from information_schema.tables where table_
DROP TABLE user;
END IF//
IF 1 = (SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def' and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'root@localhost') THEN
IF 1 = (SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def' and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and (DEFINER = 'root@localhost' or VIEW_DEFINITION LIKE "%'N' AS `password_expired`%")) THEN
DROP VIEW IF EXISTS mysql.user;
END IF//