1
0
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:
timour@mysql.com
2005-09-12 17:01:17 +03:00
parent a645d10cf2
commit 9d862db743
3 changed files with 21 additions and 5 deletions

View File

@ -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)
{