diff options
author | unknown <serg@serg.mylan> | 2004-06-23 12:29:05 +0200 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2004-06-23 12:29:05 +0200 |
commit | 9a554b4751237bc96f9ad6eae2df8b310567479d (patch) | |
tree | ed41d441646213c959f138d9a933c09f994d81d9 /sql/ha_myisam.h | |
parent | 16c5f173e825ff9936e5d3c96d4bf20210788ad2 (diff) | |
download | mariadb-git-9a554b4751237bc96f9ad6eae2df8b310567479d.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
include/myisam.h:
increasing myisam_max_temp_file_length
include/my_base.h:
handler interface cleanup
myisam/mi_static.c:
warning removed
mysql-test/Makefile.am:
followup
mysql-test/r/fulltext.result:
fulltext indexes are not ordered
mysql-test/r/rpl_user_variables.result:
followup
sql/field.cc:
index_flags
sql/filesort.cc:
rnd_init -> ha_rnd_init
rnd_end -> ha_rnd_end
sql/ha_berkeley.cc:
cleanup
sql/ha_berkeley.h:
table/index_flags revamped
sql/ha_heap.cc:
ensure index is accessed only after index_init (esp. important for temp tables)
sql/ha_heap.h:
table/index_flags revamped
sql/ha_innodb.cc:
don't workaround MySQL sloppiness
sql/ha_innodb.h:
table/index_flags revamped
sql/ha_isam.h:
table/index_flags revamped
sql/ha_isammrg.h:
table/index_flags revamped
sql/ha_myisam.cc:
ensure index is accessed only after index_init (esp. important for temp tables)
sql/ha_myisam.h:
table/index_flags revamped
sql/ha_myisammrg.h:
table/index_flags revamped
sql/handler.cc:
handler interface cleanups
sql/handler.h:
handler interface cleanups:
more logical table/index_flags
return HA_ERR_WRONG_COMMAND instead of abstract methods
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 enforce strict pairing
sql/item_subselect.cc:
index_init/index_end/rnd_init/rnd_end strict pairing fixed
sql/lex.h:
renamed to avoid conflicts
sql/opt_range.cc:
index_init/index_end/rnd_init/rnd_end strict pairing fixed
table/index_flags cleanup
sql/opt_range.h:
index_init/index_end/rnd_init/rnd_end strict pairing fixed
sql/opt_sum.cc:
index_init/index_end/rnd_init/rnd_end strict pairing fixed
table/index_flags cleanup
sql/records.cc:
index_init/index_end/rnd_init/rnd_end strict pairing fixed
sql/sql_acl.cc:
index_init/index_end/rnd_init/rnd_end strict pairing fixed
sql/sql_cache.cc:
cleanup
sql/sql_delete.cc:
index_init/index_end/rnd_init/rnd_end strict pairing fixed
sql/sql_handler.cc:
index_init/index_end/rnd_init/rnd_end strict pairing fixed
sql/sql_help.cc:
index_init/index_end/rnd_init/rnd_end strict pairing fixed
sql/sql_insert.cc:
table/index_flags cleanup
sql/sql_select.cc:
index_init/index_end/rnd_init/rnd_end strict pairing fixed
table/index_flags cleanup
sql/sql_table.cc:
index_init/index_end/rnd_init/rnd_end strict pairing fixed
table/index_flags cleanup
sql/sql_update.cc:
index_init/index_end/rnd_init/rnd_end strict pairing fixed
sql/sql_yacc.yy:
INDEX -> INDEX_SYM
sql/table.cc:
table/index_flags cleanup
Diffstat (limited to 'sql/ha_myisam.h')
-rw-r--r-- | sql/ha_myisam.h | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/sql/ha_myisam.h b/sql/ha_myisam.h index 77887220903..9069b41364d 100644 --- a/sql/ha_myisam.h +++ b/sql/ha_myisam.h @@ -44,10 +44,10 @@ class ha_myisam: public handler public: ha_myisam(TABLE *table): handler(table), file(0), - int_table_flags(HA_READ_RND_SAME | HA_KEYPOS_TO_RNDPOS | HA_LASTKEY_ORDER | - HA_NULL_KEY | HA_CAN_FULLTEXT | HA_CAN_SQL_HANDLER | - HA_DUPP_POS | HA_BLOB_KEY | HA_AUTO_PART_KEY | - HA_FILE_BASED | HA_HAS_GEOMETRY), + int_table_flags(HA_NULL_IN_KEY | HA_CAN_FULLTEXT | HA_CAN_SQL_HANDLER | + HA_DUPP_POS | HA_CAN_INDEX_BLOBS | HA_AUTO_PART_KEY | + HA_FILE_BASED | HA_CAN_GEOMETRY | HA_READ_RND_SAME | + HA_CAN_INSERT_DELAYED), can_enable_indexes(1) {} ~ha_myisam() {} @@ -55,17 +55,15 @@ class ha_myisam: public handler const char *index_type(uint key_number); const char **bas_ext() const; ulong table_flags() const { return int_table_flags; } - 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 MI_MAX_KEY_LENGTH; } - uint max_key_part_length() { return MI_MAX_KEY_LENGTH; } + 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; } uint checksum() const; int open(const char *name, int mode, uint test_if_locked); @@ -83,7 +81,7 @@ class ha_myisam: public handler int index_first(byte * buf); int index_last(byte * buf); int index_next_same(byte *buf, const byte *key, uint keylen); - int index_end() { ft_handler=NULL; return 0; } + int index_end() { ft_handler=NULL; return handler::index_end(); } int ft_init() { if (!ft_handler) @@ -99,7 +97,6 @@ class ha_myisam: public handler int rnd_pos(byte * buf, byte *pos); int restart_rnd_next(byte *buf, byte *pos); void position(const byte *record); - my_off_t row_position() { return mi_position(file); } void info(uint); int extra(enum ha_extra_function operation); int extra_opt(enum ha_extra_function operation, ulong cache_size); |