1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Derived tables bug fix .......

sql/ha_myisam.cc:
  DISABLE KEYS warnings
sql/sql_table.cc:
  DISABLE KEYS warnings
This commit is contained in:
unknown
2003-06-12 16:52:36 +03:00
parent 9be78a0519
commit 4ac20ad4a9
6 changed files with 44 additions and 12 deletions

View File

@@ -122,6 +122,16 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit,
res= -1;
goto exit;
}
/*
This is done in order to redo all field optimisations when any of the
involved tables is used in the outer query
*/
if (tables)
{
for (TABLE_LIST *cursor= tables; cursor; cursor= cursor->next)
cursor->table->clear_query_id= 1;
}
item_list= select_cursor->item_list;
select_cursor->with_wild= 0;
@@ -223,8 +233,6 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit,
/* Add new temporary table to list of open derived tables */
table->next= thd->derived_tables;
thd->derived_tables= table;
thd->query_id++;
query_id++;
}
exit: