diff options
author | unknown <Sinisa@sinisa.nasamreza.org> | 2002-11-15 19:58:07 +0200 |
---|---|---|
committer | unknown <Sinisa@sinisa.nasamreza.org> | 2002-11-15 19:58:07 +0200 |
commit | 27b7b8abbd399982ffb8a16cf3dd2ac882acca57 (patch) | |
tree | cd196d9a0db73de48bdf21cdb9621aa7344b9255 /sql/sql_derived.cc | |
parent | 183a207fd7bc734a1747fa9cfe0eae194d2d1b50 (diff) | |
download | mariadb-git-27b7b8abbd399982ffb8a16cf3dd2ac882acca57.tar.gz |
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.
Diffstat (limited to 'sql/sql_derived.cc')
-rw-r--r-- | sql/sql_derived.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index 7cbc1ea6db3..44183a95473 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -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 ... } } |