mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed bugs pointed by "Crash with 'big' derivated table in MySQL-4.1" bugreport
- fixed switching from heap to MyISAM table - fixed error handler sql/sql_derived.cc: A fix for the bug when MyISAM tmp table has to be created in order to resolve derived table. fixed error handler sql/sql_parse.cc: fixed error handler sql/sql_union.cc: fixed switching from heap to MyISAM table
This commit is contained in:
@ -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)
|
||||
@ -128,8 +129,6 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t)
|
||||
free_tmp_table(thd,table);
|
||||
exit:
|
||||
close_thread_tables(thd);
|
||||
if (res > 0)
|
||||
send_error(thd, ER_UNKNOWN_COM_ERROR); // temporary only ...
|
||||
}
|
||||
DBUG_RETURN(res);
|
||||
}
|
||||
|
Reference in New Issue
Block a user