From 44a882f92540a51949485a08a0ced93d114fdfa9 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 28 Sep 2006 23:41:37 +1000 Subject: BUG#19914 SELECT COUNT(*) sometimes returns MAX_INT on cluster tables post-review fixes as indicated by Serg. manual testing of error cases done in 5.0 due to support for DBUG_EXECUTE_IF to insert errors. Unable to write test case for mysql-test until 5.1 due to support for setting debug options at runtime. sql/ha_blackhole.cc: update for handler::info() now returning int sql/ha_blackhole.h: update for handler::info() now returning int sql/ha_isam.cc: update for handler::info() now returning int sql/ha_isam.h: update for handler::info() now returning int sql/ha_isammrg.cc: update for handler::info() now returning int sql/ha_isammrg.h: update for handler::info() now returning int sql/item_sum.cc: update for handler::info() now returning int. return error to user if info call fails sql/sql_delete.cc: update for handler::info() now returning int. return error to user if info call fails sql/sql_select.cc: update for handler::info() now returning int. return error to user if info call fails sql/sql_union.cc: update for handler::info() now returning int. return error to user if info call fails --- sql/sql_union.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sql/sql_union.cc') diff --git a/sql/sql_union.cc b/sql/sql_union.cc index 0948602bbb4..f3f814831f5 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -492,7 +492,12 @@ int 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) { -- cgit v1.2.1