summaryrefslogtreecommitdiff
path: root/sql/sql_union.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r--sql/sql_union.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc
index 0eea10e068a..51f278536de 100644
--- a/sql/sql_union.cc
+++ b/sql/sql_union.cc
@@ -43,8 +43,8 @@ int mysql_union(THD *thd, LEX *lex,select_result *result)
/* Global option */
if (((void*)(global= unit->global_parameters)) == ((void*)unit))
{
- found_rows_for_union = lex->select_lex.options & OPTION_FOUND_ROWS &&
- !describe && global->select_limit;
+ found_rows_for_union= (lex->select_lex.options & OPTION_FOUND_ROWS &&
+ !describe && global->select_limit);
if (found_rows_for_union)
lex->select_lex.options ^= OPTION_FOUND_ROWS;
}
@@ -221,10 +221,11 @@ bool select_union::send_data(List<Item> &values)
unit->offset_limit_cnt--;
return 0;
}
+
fill_record(table->field,values);
if ((write_record(table,&info)))
{
- if (create_myisam_from_heap(table, tmp_table_param, info.errorno, 0))
+ if (create_myisam_from_heap(table, tmp_table_param, info.last_errno, 0))
return 1;
}
return 0;