21 #include "sql_class.h"
30 uint key_stat_version;
31 my_bool internal_table;
38 return (table->in_use->variables.sql_mode & MODE_MYSQL323) ?
41 const char *index_type(uint inx)
43 return ((table_share->key_info[inx].algorithm == HA_KEY_ALG_BTREE) ?
49 ulonglong table_flags()
const
51 return (HA_FAST_KEY_READ | HA_NO_BLOBS | HA_NULL_IN_KEY |
52 HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE |
53 HA_REC_NOT_IN_SEQ | HA_CAN_INSERT_DELAYED | HA_NO_TRANSACTIONS |
54 HA_HAS_RECORDS | HA_STATS_RECORDS_IS_EXACT);
56 ulong index_flags(uint inx, uint part,
bool all_parts)
const
58 return ((table_share->key_info[inx].algorithm == HA_KEY_ALG_BTREE) ?
59 HA_READ_NEXT | HA_READ_PREV | HA_READ_ORDER | HA_READ_RANGE :
60 HA_ONLY_WHOLE_INDEX | HA_KEY_SCAN_NOT_ROR);
62 const key_map *keys_to_use_for_scanning() {
return &btree_keys; }
63 uint max_supported_keys()
const {
return MAX_KEY; }
64 uint max_supported_key_part_length()
const {
return MAX_KEY_LENGTH; }
66 {
return (
double) (
stats.records+
stats.deleted) / 20.0+10; }
68 {
return (
double) rows / 20.0+1; }
70 int open(
const char *name,
int mode, uint test_if_locked);
72 void set_keys_for_scanning(
void);
73 int write_row(uchar *
buf);
74 int update_row(
const uchar * old_data, uchar * new_data);
75 int delete_row(
const uchar *
buf);
77 ulonglong nb_desired_values,
78 ulonglong *first_value,
79 ulonglong *nb_reserved_values);
81 enum ha_rkey_function find_flag);
84 key_part_map keypart_map,
85 enum ha_rkey_function find_flag);
93 void position(
const uchar *
record);
95 int extra(
enum ha_extra_function operation);
97 int external_lock(THD *thd,
int lock_type);
101 int disable_indexes(uint
mode);
102 int enable_indexes(uint
mode);
103 int indexes_are_disabled(
void);
106 void drop_table(
const char *name);
112 enum thr_lock_type lock_type);
113 int cmp_ref(
const uchar *ref1,
const uchar *ref2)
115 return memcmp(ref1, ref2,
sizeof(HEAP_PTR));
119 void update_key_stats();