1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

A fix for the bug when MyISAM tmp table has to be created in order

to resolve derived table.

Will make a test case for this quite soon.
This commit is contained in:
Sinisa@sinisa.nasamreza.org
2002-11-15 19:58:07 +02:00
parent 4e6f5f2d12
commit 014073b013
2 changed files with 3 additions and 1 deletions

View File

@ -88,6 +88,7 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t)
if ((derived_result=new select_union(table)))
{
derived_result->tmp_table_param=&tmp_table_param;
unit->offset_limit_cnt= sl->offset_limit;
unit->select_limit_cnt= sl->select_limit+sl->offset_limit;
if (unit->select_limit_cnt < sl->select_limit)
@ -118,7 +119,7 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t)
table->tmp_table=TMP_TABLE;
if (!lex->describe)
sl->exclude();
t->db="";
t->db=(char *)"";
t->derived=(SELECT_LEX *)0; // just in case ...
}
}