diff options
author | tnurnberg@sin.intern.azundris.com <> | 2007-03-23 19:24:03 +0100 |
---|---|---|
committer | tnurnberg@sin.intern.azundris.com <> | 2007-03-23 19:24:03 +0100 |
commit | 7c638268948dae63be1a9eb3aa83da040e028aba (patch) | |
tree | c42e49cbee46459efb9479e080691b0b5b34cf90 /sql/sql_parse.cc | |
parent | e84584e2e34c9c32b132f785909c576cb233f9c3 (diff) | |
download | mariadb-git-7c638268948dae63be1a9eb3aa83da040e028aba.tar.gz |
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
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 1b8bfd38fc4..40914339cf1 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -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; |