diff options
author | serg@serg.mylan <> | 2004-06-23 12:29:05 +0200 |
---|---|---|
committer | serg@serg.mylan <> | 2004-06-23 12:29:05 +0200 |
commit | 3f1c4ba745573eefb8739a9d16199ec552f190de (patch) | |
tree | ed41d441646213c959f138d9a933c09f994d81d9 /sql/ha_myisammrg.h | |
parent | e70b330f6956041d5e57d77961e0de92682971eb (diff) | |
download | mariadb-git-3f1c4ba745573eefb8739a9d16199ec552f190de.tar.gz |
handler interface cleanups:
more logical table/index_flags
return HA_ERR_WRONG_COMMAND instead of abstract methods where appropriate
max_keys and other limits renamed to max_supported_keys/etc
max_keys/etc are now wrappers to max_supported_keys/etc
ha_index_init/ha_rnd_init/ha_index_end/ha_rnd_end are now wrappers to real {index,rnd}_{init,end} to enforce strict pairing
Diffstat (limited to 'sql/ha_myisammrg.h')
-rw-r--r-- | sql/ha_myisammrg.h | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/sql/ha_myisammrg.h b/sql/ha_myisammrg.h index fd36c78202d..9a6b2a7ee14 100644 --- a/sql/ha_myisammrg.h +++ b/sql/ha_myisammrg.h @@ -34,21 +34,20 @@ class ha_myisammrg: public handler const char **bas_ext() const; ulong table_flags() const { - return (HA_REC_NOT_IN_SEQ | HA_READ_RND_SAME | HA_AUTO_PART_KEY | - HA_KEYPOS_TO_RNDPOS | HA_LASTKEY_ORDER | - HA_NULL_KEY | HA_BLOB_KEY | HA_FILE_BASED); + return (HA_REC_NOT_IN_SEQ | HA_AUTO_PART_KEY | HA_READ_RND_SAME | + HA_NULL_IN_KEY | HA_CAN_INDEX_BLOBS | HA_FILE_BASED | + HA_CAN_INSERT_DELAYED); } - ulong index_flags(uint inx) const + ulong index_flags(uint inx, uint part) const { - ulong flags=(HA_READ_NEXT | HA_READ_PREV | HA_READ_ORDER); - return (flags | ((table->key_info[inx].algorithm == HA_KEY_ALG_FULLTEXT) ? - 0 : HA_KEY_READ_ONLY)); + return ((table->key_info[inx].algorithm == HA_KEY_ALG_FULLTEXT) ? + 0 : HA_READ_NEXT | HA_READ_PREV | HA_READ_RANGE | + HA_READ_ORDER | HA_KEYREAD_ONLY); } - uint max_record_length() const { return HA_MAX_REC_LENGTH; } - uint max_keys() const { return MI_MAX_KEY; } - uint max_key_parts() const { return MAX_REF_PARTS; } - uint max_key_length() const { return MAX_KEY_LENGTH; } - virtual double scan_time() + uint max_supported_keys() const { return MI_MAX_KEY; } + uint max_supported_key_length() const { return MI_MAX_KEY_LENGTH; } + uint max_supported_key_part_length() { return MI_MAX_KEY_LENGTH; } + double scan_time() { return ulonglong2double(data_file_length) / IO_SIZE + file->tables; } int open(const char *name, int mode, uint test_if_locked); @@ -71,7 +70,6 @@ class ha_myisammrg: public handler int rnd_pos(byte * buf, byte *pos); void position(const byte *record); ha_rows records_in_range(uint inx, key_range *min_key, key_range *max_key); - my_off_t row_position() { return myrg_position(file); } void info(uint); int extra(enum ha_extra_function operation); int extra_opt(enum ha_extra_function operation, ulong cache_size); |