diff options
author | stewart@willster.(none) <> | 2006-09-28 23:41:37 +1000 |
---|---|---|
committer | stewart@willster.(none) <> | 2006-09-28 23:41:37 +1000 |
commit | 57a97f53bc13488d702ee3478aba83ffa4de5f7a (patch) | |
tree | eb9ad699c3a5035d182101ae8e8082d97593b767 /sql/sql_select.cc | |
parent | 3ecc09e0e4671431d7caeab1760faccf0636fe41 (diff) | |
download | mariadb-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_select.cc')
-rw-r--r-- | sql/sql_select.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 36959ee1d0f..d36a6252adc 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -1786,7 +1786,12 @@ make_join_statistics(JOIN *join,TABLE_LIST *tables,COND *conds, s->checked_keys.init(); s->needed_reg.init(); table_vector[i]=s->table=table=tables->table; - table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK);// record count + error= table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK); + if(error) + { + table->file->print_error(error, MYF(0)); + DBUG_RETURN(1); + } table->quick_keys.clear_all(); table->reginfo.join_tab=s; table->reginfo.not_exists_optimize=0; |