diff options
author | unknown <tnurnberg@sin.intern.azundris.com> | 2007-03-23 19:24:03 +0100 |
---|---|---|
committer | unknown <tnurnberg@sin.intern.azundris.com> | 2007-03-23 19:24:03 +0100 |
commit | b765a8af9bb0417a8bbb12cef44014de9badd938 (patch) | |
tree | c42e49cbee46459efb9479e080691b0b5b34cf90 /sql/sql_view.cc | |
parent | 6d93f15039d551f291232c1b60527b00cd9c6bc9 (diff) | |
download | mariadb-git-b765a8af9bb0417a8bbb12cef44014de9badd938.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
client/client_priv.h:
Bug #26817: mysqldump fails to backup database containing view with invalid definer
New option for mysqldump: redirect stderr to file ("2> for Windows")
client/mysqldump.c:
Bug #26817: mysqldump fails to backup database containing view with invalid definer
New option for mysqldump: redirect stderr to file ("2> for Windows")
mysql-test/r/information_schema_db.result:
Bug #26817: mysqldump fails to backup database containing view with invalid definer
New option for mysqldump: redirect stderr to file ("2> for Windows")
mysql-test/t/information_schema_db.test:
Bug #26817: mysqldump fails to backup database containing view with invalid definer
New option for mysqldump: redirect stderr to file ("2> for Windows")
sql/sql_base.cc:
Bug #26817: mysqldump fails to backup database containing view with invalid definer
be a little more lenient for SHOW FIELDS FROM
sql/sql_parse.cc:
Bug #26817: mysqldump fails to backup database containing view with invalid definer
be a little more lenient for SHOW FIELDS FROM on views on views
sql/sql_view.cc:
Bug #26817: mysqldump fails to backup database containing view with invalid definer
give SHOW FIELDS the same perks as SHOW CREATE
sql/table.cc:
Bug #26817: mysqldump fails to backup database containing view with invalid definer
give SHOW FIELDS the same perks as SHOW CREATE
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r-- | sql/sql_view.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 7143df8474a..32231a93ef7 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -1003,6 +1003,11 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table, CHARSET_INFO *save_cs= thd->variables.character_set_client; thd->variables.character_set_client= system_charset_info; res= MYSQLparse((void *)thd); + + if ((old_lex->sql_command == SQLCOM_SHOW_FIELDS) || + (old_lex->sql_command == SQLCOM_SHOW_CREATE)) + lex->sql_command= old_lex->sql_command; + thd->variables.character_set_client= save_cs; thd->variables.sql_mode= save_mode; } @@ -1028,7 +1033,7 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table, } } else if (!table->prelocking_placeholder && - old_lex->sql_command == SQLCOM_SHOW_CREATE && + (old_lex->sql_command == SQLCOM_SHOW_CREATE) && !table->belong_to_view) { if (check_table_access(thd, SHOW_VIEW_ACL, table, 0)) |