mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Fix for BUG#6808.
The problem was in that add_table_to_list was testing for duplicate tables in a list of tables that included the created view.
This commit is contained in:
@ -6059,7 +6059,10 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
|
||||
/* check that used name is unique */
|
||||
if (lock_type != TL_IGNORE)
|
||||
{
|
||||
for (TABLE_LIST *tables=(TABLE_LIST*) table_list.first ;
|
||||
TABLE_LIST *first_table= (TABLE_LIST*) table_list.first;
|
||||
if (lex->sql_command == SQLCOM_CREATE_VIEW)
|
||||
first_table= first_table ? first_table->next_local : NULL;
|
||||
for (TABLE_LIST *tables= first_table ;
|
||||
tables ;
|
||||
tables=tables->next_local)
|
||||
{
|
||||
|
Reference in New Issue
Block a user