From 11b652dda0fb2d7c348ba43f7b0e589b4c0edb85 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 24 May 2002 15:26:47 +0300 Subject: Fixed a bug with big result sets and UNION's BitKeeper/etc/ignore: Added mysys/getopt.c mysys/getopt1.c to the ignore list --- sql/sql_union.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sql/sql_union.cc') diff --git a/sql/sql_union.cc b/sql/sql_union.cc index c8237f3ae9b..7f00ddad99f 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -132,7 +132,7 @@ int mysql_union(THD *thd, LEX *lex,select_result *result) goto exit; } union_result->save_time_stamp=!describe; - + union_result->tmp_table_param=&tmp_table_param; for (sl= &lex->select_lex; sl; sl=sl->next) { lex->select=sl; @@ -253,7 +253,12 @@ bool select_union::send_data(List &values) return 0; } fill_record(table->field,values); - return write_record(table,&info) ? 1 : 0; + if ((write_record(table,&info))) + { + if (create_myisam_from_heap(table, tmp_table_param, info.errorno, 0)) + return 1; + } + return 0; } bool select_union::send_eof() -- cgit v1.2.1