diff options
author | unknown <stewart@willster.(none)> | 2006-08-10 22:55:20 +0800 |
---|---|---|
committer | unknown <stewart@willster.(none)> | 2006-08-10 22:55:20 +0800 |
commit | e34496e5d827c774a92891fb8201a53a27564e38 (patch) | |
tree | eca32a4dab10c05bdc27fdb082459d63c173bbe4 /sql/opt_sum.cc | |
parent | bfdbb780c26aae2705cf0d7e3048b5c0e40f59e1 (diff) | |
download | mariadb-git-e34496e5d827c774a92891fb8201a53a27564e38.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)
sql/ha_berkeley.cc:
update handler::info interface to return int
sql/ha_berkeley.h:
update handler::info interface to return int
sql/ha_heap.cc:
update handler::info interface to return int
sql/ha_heap.h:
update handler::info interface to return int
sql/ha_innodb.cc:
update handler::info interface to return int
sql/ha_innodb.h:
update handler::info interface to return int
sql/ha_myisam.cc:
update handler::info interface to return int
sql/examples/ha_archive.cc:
update handler::info interface to return int
sql/examples/ha_archive.h:
update handler::info interface to return int
sql/examples/ha_example.cc:
update handler::info interface to return int
sql/examples/ha_example.h:
update handler::info interface to return int
sql/examples/ha_tina.cc:
update handler::info interface to return int
sql/examples/ha_tina.h:
update handler::info interface to return int
sql/ha_myisam.h:
update handler::info interface to return int
sql/ha_myisammrg.cc:
update handler::info interface to return int
sql/ha_myisammrg.h:
update handler::info interface to return int
sql/ha_ndbcluster.cc:
update handler::info interface to return int
sql/ha_ndbcluster.h:
update handler::info interface to return int
sql/handler.h:
update handler::info interface to return int
sql/opt_sum.cc:
If we get an error when using handler::info to get count(*),
print and return the error.
sql/sql_select.cc:
if error, set fatal error.
Diffstat (limited to 'sql/opt_sum.cc')
-rw-r--r-- | sql/opt_sum.cc | 7 |
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; } } |