1
0
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:
bell@sanja.is.com.ua
2005-08-02 22:54:49 +03:00
parent c9de0b15f2
commit 4c69fbe632
15 changed files with 293 additions and 190 deletions

View File

@ -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;