Fix for bug#18224 VIEW on information_schema crashes the server

additional check for subselect


mysql-test/r/information_schema.result:
  Fix for bug#18224 VIEW on information_schema crashes the server
    test case
mysql-test/t/information_schema.test:
  Fix for bug#18224 VIEW on information_schema crashes the server
    test case
This commit is contained in:
unknown 2006-03-20 14:17:47 +04:00
commit 53862e6060
3 changed files with 14 additions and 1 deletions

View file

@ -3864,7 +3864,8 @@ bool get_schema_tables_result(JOIN *join)
TABLE_LIST *table_list= tab->table->pos_in_table_list;
if (table_list->schema_table && thd->fill_derived_tables())
{
bool is_subselect= (&lex->unit != lex->current_select->master_unit());
bool is_subselect= (&lex->unit != lex->current_select->master_unit() &&
lex->current_select->master_unit()->item);
/*
The schema table is already processed and
the statement is not a subselect.