diff options
author | unknown <Sinisa@sinisa.nasamreza.org> | 2002-05-24 15:26:47 +0300 |
---|---|---|
committer | unknown <Sinisa@sinisa.nasamreza.org> | 2002-05-24 15:26:47 +0300 |
commit | 11b652dda0fb2d7c348ba43f7b0e589b4c0edb85 (patch) | |
tree | 6f01bb2857f1d8462bc97e80d700a8fd4ff99b7d /sql/sql_union.cc | |
parent | 701d369d1844f19853223860c8610e40b802f428 (diff) | |
download | mariadb-git-11b652dda0fb2d7c348ba43f7b0e589b4c0edb85.tar.gz |
Fixed a bug with big result sets and UNION's
BitKeeper/etc/ignore:
Added mysys/getopt.c mysys/getopt1.c to the ignore list
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r-- | sql/sql_union.cc | 9 |
1 files changed, 7 insertions, 2 deletions
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<Item> &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() |