summaryrefslogtreecommitdiff
path: root/sql/ha_innodb.h
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-06-23 12:29:05 +0200
committerunknown <serg@serg.mylan>2004-06-23 12:29:05 +0200
commit9a554b4751237bc96f9ad6eae2df8b310567479d (patch)
treeed41d441646213c959f138d9a933c09f994d81d9 /sql/ha_innodb.h
parent16c5f173e825ff9936e5d3c96d4bf20210788ad2 (diff)
downloadmariadb-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_innodb.h')
-rw-r--r--sql/ha_innodb.h35
1 files changed, 9 insertions, 26 deletions
diff --git a/sql/ha_innodb.h b/sql/ha_innodb.h
index c585fd9c463..3b2f04c1679 100644
--- a/sql/ha_innodb.h
+++ b/sql/ha_innodb.h
@@ -61,20 +61,11 @@ class ha_innobase: public handler
ulong start_of_scan; /* this is set to 1 when we are
starting a table scan but have not
yet fetched any row, else 0 */
- uint active_index_before_scan;
- /* since a table scan in InnoDB is
- always done through an index, a table
- scan may change active_index; but
- MySQL may assume that active_index
- after a table scan is the same as
- before; we store the value here so
- that we can restore the value after
- a scan */
uint last_match_mode;/* match mode of the latest search:
ROW_SEL_EXACT, ROW_SEL_EXACT_PREFIX,
or undefined */
longlong auto_inc_counter_for_this_stat;
- ulong max_row_length(const byte *buf);
+ ulong max_supported_row_length(const byte *buf);
uint store_key_val_for_row(uint keynr, char* buff, uint buff_len,
const byte* record);
@@ -87,13 +78,10 @@ class ha_innobase: public handler
public:
ha_innobase(TABLE *table): handler(table),
int_table_flags(HA_REC_NOT_IN_SEQ |
- HA_KEYPOS_TO_RNDPOS |
- HA_LASTKEY_ORDER |
- HA_NULL_KEY | HA_FAST_KEY_READ |
- HA_BLOB_KEY |
+ HA_NULL_IN_KEY | HA_FAST_KEY_READ |
+ HA_CAN_INDEX_BLOBS |
HA_CAN_SQL_HANDLER |
HA_NOT_EXACT_COUNT |
- HA_NO_WRITE_DELAYED |
HA_PRIMARY_KEY_IN_READ_INDEX |
HA_TABLE_SCAN_ON_INDEX),
last_dup_key((uint) -1),
@@ -106,14 +94,12 @@ class ha_innobase: public handler
const char *index_type(uint key_number) { return "BTREE"; }
const char** bas_ext() const;
ulong table_flags() const { return int_table_flags; }
- ulong index_flags(uint idx) const
+ ulong index_flags(uint idx, uint part) const
{
- return (HA_READ_NEXT | HA_READ_PREV | HA_READ_ORDER |
- HA_KEY_READ_ONLY);
+ return (HA_READ_NEXT | HA_READ_PREV | HA_READ_ORDER | HA_READ_RANGE |
+ HA_KEYREAD_ONLY);
}
- uint max_record_length() const { return HA_MAX_REC_LENGTH; }
- uint max_keys() const { return MAX_KEY; }
- uint max_key_parts() const { return MAX_REF_PARTS; }
+ uint max_supported_keys() const { return MAX_KEY; }
/* An InnoDB page must store >= 2 keys;
a secondary key record must also contain the
primary key value:
@@ -121,15 +107,12 @@ class ha_innobase: public handler
less than 1 / 4 of page size which is 16 kB;
but currently MySQL does not work with keys
whose size is > MAX_KEY_LENGTH */
- uint max_key_length() const { return((MAX_KEY_LENGTH <= 3500) ?
- MAX_KEY_LENGTH : 3500);}
- uint max_key_part_length() { return((MAX_KEY_LENGTH <= 3500) ?
- MAX_KEY_LENGTH : 3500);}
+ uint max_supported_key_length() const { return 3500; }
+ uint max_supported_key_part_length() const { return 3500; }
const key_map *keys_to_use_for_scanning() { return &key_map_full; }
bool has_transactions() { return 1;}
int open(const char *name, int mode, uint test_if_locked);
- void initialize(void);
int close(void);
double scan_time();
double read_time(uint index, uint ranges, ha_rows rows);