From 4ea2f42e33e1846335c1321fcd4d438d075c8e06 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 25 Nov 2002 22:18:44 +0100 Subject: myisammrg::index_next_same myisammrg/Makefile.am: myrg_rnext_same.c added --- sql/ha_myisammrg.cc | 10 ++++++++++ sql/ha_myisammrg.h | 11 ++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) (limited to 'sql') diff --git a/sql/ha_myisammrg.cc b/sql/ha_myisammrg.cc index 07683dca73e..4398aaecf4d 100644 --- a/sql/ha_myisammrg.cc +++ b/sql/ha_myisammrg.cc @@ -160,6 +160,16 @@ int ha_myisammrg::index_last(byte * buf) return error; } +int ha_myisammrg::index_next_same(byte * buf, + const byte *key __attribute__((unused)), + uint length __attribute__((unused))) +{ + statistic_increment(ha_read_next_count,&LOCK_status); + int error=myrg_rnext_same(file,buf); + table->status=error ? STATUS_NOT_FOUND: 0; + return error; +} + int ha_myisammrg::rnd_init(bool scan) { return myrg_extra(file,HA_EXTRA_RESET,0); diff --git a/sql/ha_myisammrg.h b/sql/ha_myisammrg.h index 8e33b99e418..008f5339caf 100644 --- a/sql/ha_myisammrg.h +++ b/sql/ha_myisammrg.h @@ -65,15 +65,16 @@ class ha_myisammrg: public handler int index_prev(byte * buf); int index_first(byte * buf); int index_last(byte * buf); + int index_next_same(byte *buf, const byte *key, uint keylen); int rnd_init(bool scan=1); int rnd_next(byte *buf); int rnd_pos(byte * buf, byte *pos); void position(const byte *record); - ha_rows ha_myisammrg::records_in_range(int inx, - const byte *start_key,uint start_key_len, - enum ha_rkey_function start_search_flag, - const byte *end_key,uint end_key_len, - enum ha_rkey_function end_search_flag); + ha_rows records_in_range(int inx, + const byte *start_key,uint start_key_len, + enum ha_rkey_function start_search_flag, + const byte *end_key,uint end_key_len, + enum ha_rkey_function end_search_flag); my_off_t row_position() { return myrg_position(file); } void info(uint); int extra(enum ha_extra_function operation); -- cgit v1.2.1