1
0
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:
unknown
2002-11-16 00:01:48 +02:00
parent e7bbe3aa0b
commit 49aefe3fb7
3 changed files with 9 additions and 4 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)
@ -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);
}