diff options
author | sergefp@mysql.com <> | 2004-09-13 06:14:25 +0400 |
---|---|---|
committer | sergefp@mysql.com <> | 2004-09-13 06:14:25 +0400 |
commit | 13fdbc99cf35dbc8a0c148ae206f70110c7f0280 (patch) | |
tree | 9ecce886341d7871fcdae98f906e14129bb3af0d /sql/handler.h | |
parent | 0afcaac5a8178cc7f9befdde1714fa84200293d7 (diff) | |
download | mariadb-git-13fdbc99cf35dbc8a0c148ae206f70110c7f0280.tar.gz |
Fix for BUG#5117:
* Renamed handler::estimate_number_of_rows to handler::estimate_rows_upper_bound function, which can also return "unknown"
* made filesort to use full sort buffer if number of rows to sort is not known.
Diffstat (limited to 'sql/handler.h')
-rw-r--r-- | sql/handler.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/handler.h b/sql/handler.h index 4bb1d66eef3..073bb688077 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -300,7 +300,15 @@ public: virtual const key_map *keys_to_use_for_scanning() { return &key_map_empty; } virtual bool has_transactions(){ return 0;} virtual uint extra_rec_buf_length() { return 0; } - virtual ha_rows estimate_number_of_rows() { return records+EXTRA_RECORDS; } + + /* + Return upper bound of current number of records in the table + (max. of how many records one will retrieve when doing a full table scan) + If upper bound is not known, HA_POS_ERROR should be returned as a max + possible upper bound. + */ + virtual ha_rows estimate_rows_upper_bound() + { return records+EXTRA_RECORDS; } virtual const char *index_type(uint key_number) { DBUG_ASSERT(0); return "";} |