summaryrefslogtreecommitdiff
path: root/sql/opt_sum.cc
diff options
context:
space:
mode:
authorstewart@willster.(none) <>2006-08-10 22:55:20 +0800
committerstewart@willster.(none) <>2006-08-10 22:55:20 +0800
commit9d2e6b8d23eb5e18a75a2fcb42a63abc97461c38 (patch)
treeeca32a4dab10c05bdc27fdb082459d63c173bbe4 /sql/opt_sum.cc
parent50ae5b7989e6148bee11a718c72ebfdade2ccdc8 (diff)
downloadmariadb-git-9d2e6b8d23eb5e18a75a2fcb42a63abc97461c38.tar.gz
BUG#19914 SELECT COUNT(*) sometimes returns MAX_INT on cluster tables
allow handler::info to return an error code (that will be returned to the user)
Diffstat (limited to 'sql/opt_sum.cc')
-rw-r--r--sql/opt_sum.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc
index b53fbfd3f80..64b01ce002a 100644
--- a/sql/opt_sum.cc
+++ b/sql/opt_sum.cc
@@ -125,7 +125,12 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds)
}
else
{
- tl->table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK);
+ error= tl->table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK);
+ if(error)
+ {
+ tl->table->file->print_error(error, MYF(0));
+ return error;
+ }
count*= tl->table->file->records;
}
}