diff options
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r-- | sql/sql_union.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc index c5af81ae55a..3de2ca62c94 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -496,7 +496,12 @@ bool st_select_lex_unit::exec() DBUG_RETURN(res); } /* Needed for the following test and for records_at_start in next loop */ - table->file->info(HA_STATUS_VARIABLE); + int error= table->file->info(HA_STATUS_VARIABLE); + if(error) + { + table->file->print_error(error, MYF(0)); + DBUG_RETURN(1); + } if (found_rows_for_union && !sl->braces && select_limit_cnt != HA_POS_ERROR) { |