Hi Sergei! I agree with most review comments except one:
information.
diff --git a/mysql-test/include/switch_to_mysql_user.inc b/mysql- test/include/switch_to_mysql_user.inc index f5801db6114..eff1d98c2df 100644 --- a/mysql-test/include/switch_to_mysql_user.inc +++ b/mysql-test/include/switch_to_mysql_user.inc @@ -45,6 +45,9 @@ CREATE TABLE mysql.user ( plugin char(64) CHARACTER SET latin1 DEFAULT '' NOT NULL, authentication_string TEXT NOT NULL, password_expired ENUM('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, + password_last_changed datetime NULL, + password_lifetime int(20) unsigned NULL, + account_locked enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
No-no. mysql.user structure was frozen in time the moment I pushed the commit with the new structure. It doesn't change anymore.
To test 5.7 support, just add ALTER TABLE in one specific test file. See main/system_mysql_db_507.test
If we are to freeze mysql.user and be as "compatible" as possible , I would freeze it with the latest version of 5.7 included, it feels the most complete. Any other reason that this is a no-no? :) As for password_xxx columns, they were added at the same time here so as to have the final format in and simplify logic slightly with mysql.user tabular. Your suggestion of handling it via types could work even with the password columns I think. One could split it into 2 commits, one that just adds columns and minimal changes to keep things working and one that adds account locking logic. Vicențiu