summaryrefslogtreecommitdiff
path: root/sql/sql_union.cc
diff options
context:
space:
mode:
authorstewart@willster.(none) <>2006-09-28 23:41:37 +1000
committerstewart@willster.(none) <>2006-09-28 23:41:37 +1000
commit57a97f53bc13488d702ee3478aba83ffa4de5f7a (patch)
treeeb9ad699c3a5035d182101ae8e8082d97593b767 /sql/sql_union.cc
parent3ecc09e0e4671431d7caeab1760faccf0636fe41 (diff)
downloadmariadb-git-57a97f53bc13488d702ee3478aba83ffa4de5f7a.tar.gz
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.
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r--sql/sql_union.cc7
1 files changed, 6 insertions, 1 deletions
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)
{