mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
issue correct error message in case of view presence for duplicated table on update (BUG#10773)
frequently used command sequence replaced with inline function
This commit is contained in:
@ -720,9 +720,7 @@ mysql_make_view(File_parser *parser, TABLE_LIST *table)
|
||||
}
|
||||
if (!res && !thd->is_fatal_error)
|
||||
{
|
||||
TABLE_LIST *top_view= (table->belong_to_view ?
|
||||
table->belong_to_view :
|
||||
table);
|
||||
TABLE_LIST *top_view= table->top_table();
|
||||
TABLE_LIST *view_tables= lex->query_tables;
|
||||
TABLE_LIST *view_tables_tail= 0;
|
||||
TABLE_LIST *tbl;
|
||||
@ -1072,8 +1070,7 @@ bool check_key_in_view(THD *thd, TABLE_LIST *view)
|
||||
thd->lex->select_lex.select_limit == 0)
|
||||
DBUG_RETURN(FALSE); /* it is normal table or query without LIMIT */
|
||||
table= view->table;
|
||||
if (view->belong_to_view)
|
||||
view= view->belong_to_view;
|
||||
view= view->top_table();
|
||||
trans= view->field_translation;
|
||||
key_info_end= (key_info= table->key_info)+ table->s->keys;
|
||||
|
||||
|
Reference in New Issue
Block a user