mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Bug #26817: mysqldump fails to backup database containing view with invalid definer
give some leeway on required permissions for SHOW FIELDS on views so an unknonwn DEFINER will no longer break mysqldump
This commit is contained in:
@@ -5159,7 +5159,10 @@ bool check_single_table_access(THD *thd, ulong privilege,
|
||||
goto deny;
|
||||
|
||||
/* Show only 1 table for check_grant */
|
||||
if (grant_option && check_grant(thd, privilege, all_tables, 0, 1, 0))
|
||||
if (grant_option &&
|
||||
!(all_tables->belong_to_view &&
|
||||
(thd->lex->sql_command == SQLCOM_SHOW_FIELDS)) &&
|
||||
check_grant(thd, privilege, all_tables, 0, 1, 0))
|
||||
goto deny;
|
||||
|
||||
thd->security_ctx= backup_ctx;
|
||||
|
Reference in New Issue
Block a user