summaryrefslogtreecommitdiff
path: root/sql/examples
diff options
context:
space:
mode:
authorunknown <sergefp@mysql.com>2004-09-13 06:14:25 +0400
committerunknown <sergefp@mysql.com>2004-09-13 06:14:25 +0400
commitb28118abfb0cd05e7172a20842bcdce39f49791a (patch)
tree9ecce886341d7871fcdae98f906e14129bb3af0d /sql/examples
parent3f70b62cebfbaa0e93ea5f378167d9d3e7b02a91 (diff)
downloadmariadb-git-b28118abfb0cd05e7172a20842bcdce39f49791a.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. sql/examples/ha_tina.h: Renamed estimate_number_of_rows -> estimate_rows_upper_bound sql/filesort.cc: * Fix for BUG#5117: made filesort() to use full sort buffer if number of rows to sort is not known. * Comments and assertion added sql/ha_berkeley.cc: Renamed estimate_number_of_rows -> estimate_rows_upper_bound sql/ha_berkeley.h: Renamed estimate_number_of_rows -> estimate_rows_upper_bound sql/ha_innodb.cc: Renamed estimate_number_of_rows -> estimate_rows_upper_bound sql/ha_innodb.h: Renamed estimate_number_of_rows -> estimate_rows_upper_bound sql/handler.h: Renamed estimate_number_of_rows -> estimate_rows_upper_bound
Diffstat (limited to 'sql/examples')
-rw-r--r--sql/examples/ha_tina.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/examples/ha_tina.h b/sql/examples/ha_tina.h
index 67a907fddb6..22193c01013 100644
--- a/sql/examples/ha_tina.h
+++ b/sql/examples/ha_tina.h
@@ -90,6 +90,12 @@ class ha_tina: public handler
/* The next method will never be called */
virtual double read_time(ha_rows rows) { DBUG_ASSERT(0); return((double) rows / 20.0+1); }
virtual bool fast_key_read() { return 1;}
+ /*
+ TODO: return actual upper bound of number of records in the table.
+ (e.g. save number of records seen on full table scan and/or use file size
+ as upper bound)
+ */
+ ha_rows estimate_rows_upper_bound() { return HA_POS_ERROR; }
int open(const char *name, int mode, uint test_if_locked);
int close(void);