1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

MDEV-23729 MDEV-32218 INFORMATION_SCHEMA table for user data

* A new table INFORMATION_SCHEMA.USERS is introduced.
* It stores auxiliary user data
* An unprivileged user can access their own data, and that is the main
  difference with what mysql.global_priv provides
* The fields are currently: USER, PASSWORD_ERRORS, PASSWORD_EXPIRATION_TIME
* If password_errors is ignored for the user, PASSWORD_ERRORS is NULL
* PASSWORD_EXPIRATION_TIME is a timestamp with exact point in time, calculated
from password_last_changed and password_lifetime (i.e. days) stored for the user
This commit is contained in:
Nikita Malyavin
2024-02-29 16:49:18 +01:00
parent bec1f32103
commit d229b4af0e
6 changed files with 263 additions and 0 deletions

View File

@@ -10243,6 +10243,7 @@ ST_FIELD_INFO files_fields_info[]=
CEnd()
};
extern ST_FIELD_INFO users_fields_info[];
}; // namespace Show
@@ -10556,6 +10557,8 @@ ST_SCHEMA_TABLE schema_tables[]=
{"TRIGGERS"_Lex_ident_i_s_table, Show::triggers_fields_info, 0,
get_all_tables, make_old_format, get_schema_triggers_record, 5, 6, 0,
OPEN_TRIGGER_ONLY|OPTIMIZE_I_S_TABLE},
{"USERS"_Lex_ident_i_s_table, Show::users_fields_info, 0, fill_users_schema_table,
0, 0, -1, -1, 0, 0},
{"USER_PRIVILEGES"_Lex_ident_i_s_table,
Show::user_privileges_fields_info, 0,
fill_schema_user_privileges, 0, 0, -1, -1, 0, 0},