42#define HA_OPEN_ABORT_IF_LOCKED 0
43#define HA_OPEN_WAIT_IF_LOCKED 1
44#define HA_OPEN_IGNORE_IF_LOCKED 2
45#define HA_OPEN_TMP_TABLE 4
46#define HA_OPEN_DELAY_KEY_WRITE 8
47#define HA_OPEN_ABORT_IF_CRASHED 16
48#define HA_OPEN_FOR_REPAIR 32
49#define HA_OPEN_FROM_SQL_LAYER 64
50#define HA_OPEN_COPY 256
55#define HA_OPEN_INTERNAL_TABLE 512
427#define HA_EXTRA_PREPARE_FOR_DELETE HA_EXTRA_PREPARE_FOR_DROP
464#define HA_MAX_KEYTYPE 31
476#define HA_PACK_KEY (1 << 1)
483#define HA_SPACE_PACK_USED (1 << 2)
485#define HA_VAR_LENGTH_KEY (1 << 3)
492#define HA_AUTO_KEY (1 << 4)
494#define HA_BINARY_PACK_KEY (1 << 5)
496#define HA_NULL_PART_KEY (1 << 6)
498#define HA_FULLTEXT (1 << 7)
504#define HA_UNIQUE_CHECK (1 << 8)
506#define HA_SORT_ALLOWS_SAME (1 << 9)
508#define HA_SPATIAL (1 << 10)
514#define HA_NULL_ARE_EQUAL (1 << 11)
516#define HA_USES_COMMENT (1 << 12)
518#define HA_GENERATED_KEY (1 << 13)
521#define HA_KEYFLAG_MASK \
522 (HA_NOSAME | HA_PACK_KEY | HA_AUTO_KEY | HA_BINARY_PACK_KEY | HA_FULLTEXT | \
523 HA_UNIQUE_CHECK | HA_SPATIAL | HA_NULL_ARE_EQUAL | HA_GENERATED_KEY)
526#define HA_USES_PARSER (1 << 14)
528#define HA_USES_BLOCK_SIZE (1 << 15)
538#define HA_KEY_HAS_PART_KEY_SEG (1 << 16)
550#define HA_KEY_RENAMED (1 << 17)
552#define HA_VIRTUAL_GEN_KEY (1 << 18)
554#define HA_MULTI_VALUED_KEY (1 << 19)
561#define HA_SPACE_PACK 1
562#define HA_PART_KEY_SEG 4
563#define HA_VAR_LENGTH_PART 8
564#define HA_NULL_PART 16
565#define HA_BLOB_PART 32
566#define HA_SWAP_KEY 64
567#define HA_REVERSE_SORT 128
568#define HA_NO_SORT 256
573#define HA_END_SPACE_ARE_EQUAL 512
574#define HA_BIT_PART 1024
602#define HA_OPTION_PACK_RECORD 1
615#define HA_OPTION_PACK_KEYS 2
628#define HA_OPTION_COMPRESS_RECORD 4
633#define HA_OPTION_UNUSED1 8
640#define HA_OPTION_TMP_TABLE 16
647#define HA_OPTION_CHECKSUM 32
655#define HA_OPTION_DELAY_KEY_WRITE 64
662#define HA_OPTION_NO_PACK_KEYS 128
670#define HA_OPTION_CREATE_FROM_ENGINE 256
678#define HA_OPTION_RELIES_ON_SQL_LAYER 512
680#define HA_OPTION_UNUSED2 1024
682#define HA_OPTION_UNUSED3 2048
687#define HA_OPTION_STATS_PERSISTENT 4096
694#define HA_OPTION_NO_STATS_PERSISTENT 8192
701#define HA_OPTION_TEMP_COMPRESS_RECORD 16384
709#define HA_OPTION_READ_ONLY_DATA 32768
714#define HA_OPTION_NO_CHECKSUM (1L << 17)
719#define HA_OPTION_NO_DELAY_KEY_WRITE (1L << 18)
723#define HA_DONT_TOUCH_DATA 1
724#define HA_PACK_RECORD 2
725#define HA_CREATE_TMP_TABLE 4
726#define HA_CREATE_CHECKSUM 8
727#define HA_CREATE_KEEP_FILES 16
728#define HA_CREATE_PAGE_CHECKSUM 32
729#define HA_CREATE_DELAY_KEY_WRITE 64
730#define HA_CREATE_RELIES_ON_SQL_LAYER 128
731#define HA_CREATE_INTERNAL_TABLE 256
742#define HA_STATUS_POS 1
749#define HA_STATUS_NO_LOCK 2
751#define HA_STATUS_TIME 4
787#define HA_STATUS_CONST 8
793#define HA_STATUS_VARIABLE 16
800#define HA_STATUS_ERRKEY 32
804#define HA_STATUS_AUTO 64
809#define HA_STATUS_VARIABLE_EXTRA 128
818#define HA_ERR_FIRST 120
820#define HA_ERR_KEY_NOT_FOUND 120
822#define HA_ERR_FOUND_DUPP_KEY 121
824#define HA_ERR_INTERNAL_ERROR 122
826#define HA_ERR_RECORD_CHANGED 123
828#define HA_ERR_WRONG_INDEX 124
830#define HA_ERR_ROLLED_BACK 125
832#define HA_ERR_CRASHED 126
834#define HA_ERR_WRONG_IN_RECORD 127
836#define HA_ERR_OUT_OF_MEM 128
838#define HA_ERR_NOT_A_TABLE 130
840#define HA_ERR_WRONG_COMMAND 131
842#define HA_ERR_OLD_FILE 132
844#define HA_ERR_NO_ACTIVE_RECORD 133
846#define HA_ERR_RECORD_DELETED 134
848#define HA_ERR_RECORD_FILE_FULL 135
850#define HA_ERR_INDEX_FILE_FULL 136
852#define HA_ERR_END_OF_FILE 137
854#define HA_ERR_UNSUPPORTED 138
856#define HA_ERR_TOO_BIG_ROW 139
858#define HA_WRONG_CREATE_OPTION 140
860#define HA_ERR_FOUND_DUPP_UNIQUE 141
862#define HA_ERR_UNKNOWN_CHARSET 142
864#define HA_ERR_WRONG_MRG_TABLE_DEF 143
866#define HA_ERR_CRASHED_ON_REPAIR 144
868#define HA_ERR_CRASHED_ON_USAGE 145
869#define HA_ERR_LOCK_WAIT_TIMEOUT 146
870#define HA_ERR_LOCK_TABLE_FULL 147
872#define HA_ERR_READ_ONLY_TRANSACTION 148
873#define HA_ERR_LOCK_DEADLOCK 149
875#define HA_ERR_CANNOT_ADD_FOREIGN 150
877#define HA_ERR_NO_REFERENCED_ROW 151
879#define HA_ERR_ROW_IS_REFERENCED 152
881#define HA_ERR_NO_SAVEPOINT 153
883#define HA_ERR_NON_UNIQUE_BLOCK_SIZE 154
885#define HA_ERR_NO_SUCH_TABLE 155
887#define HA_ERR_TABLE_EXIST 156
889#define HA_ERR_NO_CONNECTION 157
891#define HA_ERR_NULL_IN_SPATIAL 158
893#define HA_ERR_TABLE_DEF_CHANGED 159
895#define HA_ERR_NO_PARTITION_FOUND 160
897#define HA_ERR_RBR_LOGGING_FAILED 161
899#define HA_ERR_DROP_INDEX_FK 162
902#define HA_ERR_FOREIGN_DUPLICATE_KEY 163
904#define HA_ERR_TABLE_NEEDS_UPGRADE 164
906#define HA_ERR_TABLE_READONLY 165
908#define HA_ERR_AUTOINC_READ_FAILED 166
910#define HA_ERR_AUTOINC_ERANGE 167
912#define HA_ERR_GENERIC 168
914#define HA_ERR_RECORD_IS_THE_SAME 169
916#define HA_ERR_LOGGING_IMPOSSIBLE 170
918#define HA_ERR_CORRUPT_EVENT 171
920#define HA_ERR_NEW_FILE 172
922#define HA_ERR_ROWS_EVENT_APPLY 173
924#define HA_ERR_INITIALIZATION 174
926#define HA_ERR_FILE_TOO_SHORT 175
928#define HA_ERR_WRONG_CRC 176
930#define HA_ERR_TOO_MANY_CONCURRENT_TRXS 177
932#define HA_ERR_NOT_IN_LOCK_PARTITIONS 178
934#define HA_ERR_INDEX_COL_TOO_LONG 179
936#define HA_ERR_INDEX_CORRUPT 180
938#define HA_ERR_UNDO_REC_TOO_BIG 181
940#define HA_FTS_INVALID_DOCID 182
942#define HA_ERR_TABLE_IN_FK_CHECK 183
944#define HA_ERR_TABLESPACE_EXISTS 184
946#define HA_ERR_TOO_MANY_FIELDS 185
948#define HA_ERR_ROW_IN_WRONG_PARTITION 186
950#define HA_ERR_INNODB_READ_ONLY 187
952#define HA_ERR_FTS_EXCEED_RESULT_CACHE_LIMIT 188
954#define HA_ERR_TEMP_FILE_WRITE_FAILURE 189
956#define HA_ERR_INNODB_FORCED_RECOVERY 190
958#define HA_ERR_FTS_TOO_MANY_WORDS_IN_PHRASE 191
960#define HA_ERR_FK_DEPTH_EXCEEDED 192
962#define HA_MISSING_CREATE_OPTION 193
964#define HA_ERR_SE_OUT_OF_MEMORY 194
966#define HA_ERR_TABLE_CORRUPT 195
968#define HA_ERR_QUERY_INTERRUPTED 196
970#define HA_ERR_TABLESPACE_MISSING 197
972#define HA_ERR_TABLESPACE_IS_NOT_EMPTY 198
974#define HA_ERR_WRONG_FILE_NAME 199
976#define HA_ERR_NOT_ALLOWED_COMMAND 200
978#define HA_ERR_COMPUTE_FAILED 201
981#define HA_ERR_ROW_FORMAT_CHANGED 202
983#define HA_ERR_NO_WAIT_LOCK 203
985#define HA_ERR_DISK_FULL_NOWAIT 204
987#define HA_ERR_NO_SESSION_TEMP 205
989#define HA_ERR_WRONG_TABLE_NAME 206
991#define HA_ERR_TOO_LONG_PATH 207
993#define HA_ERR_SAMPLING_INIT_FAILED 208
995#define HA_ERR_FTS_TOO_MANY_NESTED_EXP 209
997#define HA_ERR_LAST 209
1000#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)
1004#define HA_NAMELEN 64
1005#define NO_SUCH_KEY (~(uint)0)
1008#define HA_WHOLE_KEY (~(key_part_map)0)
1013#define SEARCH_FIND 1
1014#define SEARCH_NO_FIND 2
1015#define SEARCH_SAME 4
1016#define SEARCH_BIGGER 8
1017#define SEARCH_SMALLER 16
1018#define SEARCH_SAVE_BUFF 32
1019#define SEARCH_UPDATE 64
1020#define SEARCH_PREFIX 128
1021#define SEARCH_LAST 256
1022#define MBR_CONTAIN 512
1023#define MBR_INTERSECT 1024
1024#define MBR_WITHIN 2048
1025#define MBR_DISJOINT 4096
1026#define MBR_EQUAL 8192
1027#define MBR_DATA 16384
1028#define SEARCH_NULL_ARE_EQUAL 32768
1029#define SEARCH_NULL_ARE_NOT_EQUAL 65536
1033#define READ_CACHE_USED 2
1034#define READ_CHECK_USED 4
1035#define KEY_READ_USED 8
1036#define WRITE_CACHE_USED 16
1037#define OPT_NO_ROWS 32
1040#define HA_STATE_CHANGED 1
1041#define HA_STATE_AKTIV 2
1042#define HA_STATE_WRITTEN 4
1043#define HA_STATE_DELETED 8
1044#define HA_STATE_NEXT_FOUND 16
1045#define HA_STATE_PREV_FOUND 32
1046#define HA_STATE_NO_KEY 64
1047#define HA_STATE_KEY_CHANGED 128
1048#define HA_STATE_WRITE_AT_END 256
1049#define HA_STATE_BUFF_SAVED 512
1050#define HA_STATE_ROW_CHANGED 1024
1051#define HA_STATE_EXTEND_BLOCK 2048
1139#define rows2double(A) ulonglong2double(A)
1142#define HA_POS_ERROR (~(ha_rows)0)
1143#define HA_OFFSET_ERROR (~(my_off_t)0)
1145#define MAX_FILE_SIZE LLONG_MAX
1147#define HA_VARCHAR_PACKLENGTH(field_length) ((field_length) < 256 ? 1 : 2)
ha_base_keytype
Definition: my_base.h:439
@ HA_KEYTYPE_VARBINARY2
Definition: my_base.h:460
@ HA_KEYTYPE_BINARY
Definition: my_base.h:442
@ HA_KEYTYPE_USHORT_INT
Definition: my_base.h:448
@ HA_KEYTYPE_ULONGLONG
Definition: my_base.h:451
@ HA_KEYTYPE_UINT24
Definition: my_base.h:453
@ HA_KEYTYPE_VARTEXT2
Definition: my_base.h:459
@ HA_KEYTYPE_FLOAT
Definition: my_base.h:445
@ HA_KEYTYPE_BIT
Definition: my_base.h:461
@ HA_KEYTYPE_END
Definition: my_base.h:440
@ HA_KEYTYPE_ULONG_INT
Definition: my_base.h:449
@ HA_KEYTYPE_SHORT_INT
Definition: my_base.h:443
@ HA_KEYTYPE_NUM
Definition: my_base.h:447
@ HA_KEYTYPE_DOUBLE
Definition: my_base.h:446
@ HA_KEYTYPE_LONG_INT
Definition: my_base.h:444
@ HA_KEYTYPE_INT8
Definition: my_base.h:454
@ HA_KEYTYPE_INT24
Definition: my_base.h:452
@ HA_KEYTYPE_VARTEXT1
Definition: my_base.h:456
@ HA_KEYTYPE_VARBINARY1
Definition: my_base.h:457
@ HA_KEYTYPE_TEXT
Definition: my_base.h:441
@ HA_KEYTYPE_LONGLONG
Definition: my_base.h:450
ha_panic_function
Definition: my_base.h:431
@ HA_PANIC_WRITE
Definition: my_base.h:433
@ HA_PANIC_CLOSE
Definition: my_base.h:432
@ HA_PANIC_READ
Definition: my_base.h:434
data_file_type
Definition: my_base.h:1069
@ COMPRESSED_RECORD
Definition: my_base.h:1072
@ DYNAMIC_RECORD
Definition: my_base.h:1071
@ BLOCK_RECORD
Definition: my_base.h:1073
@ STATIC_RECORD
Definition: my_base.h:1070
ha_key_alg
Definition: my_base.h:97
@ HA_KEY_ALG_RTREE
Definition: my_base.h:108
@ HA_KEY_ALG_HASH
Definition: my_base.h:109
@ HA_KEY_ALG_SE_SPECIFIC
Used for cases when key algorithm which is supported by SE can't be described by one of other classes...
Definition: my_base.h:106
@ HA_KEY_ALG_BTREE
Definition: my_base.h:107
@ HA_KEY_ALG_FULLTEXT
Definition: my_base.h:110
ha_rkey_function
Definition: my_base.h:78
@ HA_READ_MBR_EQUAL
Definition: my_base.h:91
@ HA_READ_KEY_OR_PREV
Definition: my_base.h:81
@ HA_READ_PREFIX_LAST
Definition: my_base.h:85
@ HA_READ_PREFIX_LAST_OR_PREV
Definition: my_base.h:86
@ HA_READ_KEY_EXACT
Definition: my_base.h:79
@ HA_READ_AFTER_KEY
Definition: my_base.h:82
@ HA_READ_MBR_DISJOINT
Definition: my_base.h:90
@ HA_READ_INVALID
Definition: my_base.h:92
@ HA_READ_MBR_INTERSECT
Definition: my_base.h:88
@ HA_READ_BEFORE_KEY
Definition: my_base.h:83
@ HA_READ_MBR_CONTAIN
Definition: my_base.h:87
@ HA_READ_MBR_WITHIN
Definition: my_base.h:89
@ HA_READ_KEY_OR_NEXT
Definition: my_base.h:80
@ HA_READ_PREFIX
Definition: my_base.h:84
key_range_flags
Definition: my_base.h:1078
@ UNIQUE_RANGE
Definition: my_base.h:1090
@ SKIP_RANGE
Definition: my_base.h:1109
@ NEAR_MIN
Definition: my_base.h:1082
@ DESC_FLAG
Definition: my_base.h:1121
@ NO_MIN_RANGE
from -inf
Definition: my_base.h:1079
@ NO_MAX_RANGE
to +inf
Definition: my_base.h:1080
@ EQ_RANGE
Definition: my_base.h:1096
@ SKIP_RECORDS_IN_RANGE
Definition: my_base.h:1116
@ NEAR_MAX
Definition: my_base.h:1084
@ NULL_RANGE
Definition: my_base.h:1101
@ GEOM_FLAG
This flag means that the index is an rtree index, and the interval is specified using HA_READ_MBR_XXX...
Definition: my_base.h:1106
ulong key_part_map
Definition: my_base.h:1007
my_off_t ha_rows
Definition: my_base.h:1140
ha_extra_function
Definition: my_base.h:184
@ HA_EXTRA_NO_USER_CHANGE
Definition: my_base.h:245
@ HA_EXTRA_ENABLE_UNIQUE_RECORD_FILTER
Definition: my_base.h:421
@ HA_EXTRA_NO_KEYREAD
Definition: my_base.h:240
@ HA_EXTRA_KEYREAD_CHANGE_POS
Definition: my_base.h:260
@ HA_EXTRA_ADD_CHILDREN_LIST
Definition: my_base.h:397
@ HA_EXTRA_REMEMBER_POS
Definition: my_base.h:262
@ HA_EXTRA_FORCE_REOPEN
Definition: my_base.h:268
@ HA_EXTRA_DELETE_CANNOT_BATCH
Definition: my_base.h:380
@ HA_EXTRA_NORMAL
Definition: my_base.h:193
@ HA_EXTRA_IS_ATTACHED_CHILDREN
Definition: my_base.h:399
@ HA_EXTRA_NO_AUTOINC_LOCKING
Definition: my_base.h:416
@ HA_EXTRA_WAIT_LOCK
Definition: my_base.h:253
@ HA_EXTRA_WRITE_CAN_REPLACE
Definition: my_base.h:372
@ HA_EXTRA_FLUSH
Definition: my_base.h:274
@ HA_EXTRA_IGNORE_NO_KEY
Definition: my_base.h:358
@ HA_EXTRA_NO_READ_LOCKING
Skip acquiring locks when reading from ACL tables or views on DD tables in order to make such reads n...
Definition: my_base.h:410
@ HA_EXTRA_SECONDARY_SORT_ROWID
Do secondary sort by handler::ref (rowid) after key sort.
Definition: my_base.h:407
@ HA_EXTRA_PREPARE_FOR_UPDATE
Definition: my_base.h:337
@ HA_EXTRA_DETACH_CHILDREN
Definition: my_base.h:400
@ HA_EXTRA_CHANGE_KEY_TO_DUP
Definition: my_base.h:343
@ HA_EXTRA_READCHECK
Definition: my_base.h:225
@ HA_EXTRA_UPDATE_CANNOT_BATCH
Definition: my_base.h:381
@ HA_EXTRA_NO_READCHECK
Definition: my_base.h:224
@ HA_EXTRA_DISABLE_UNIQUE_RECORD_FILTER
Definition: my_base.h:423
@ HA_EXTRA_NO_IGNORE_DUP_KEY
Definition: my_base.h:323
@ HA_EXTRA_CHANGE_KEY_TO_UNIQUE
Definition: my_base.h:342
@ HA_EXTRA_PREPARE_FOR_DROP
Definition: my_base.h:329
@ HA_EXTRA_MARK_AS_LOG_TABLE
Definition: my_base.h:364
@ HA_EXTRA_NO_IGNORE_NO_KEY
Definition: my_base.h:359
@ HA_EXTRA_PREPARE_FOR_RENAME
Definition: my_base.h:393
@ HA_EXTRA_INSERT_WITH_UPDATE
Definition: my_base.h:386
@ HA_EXTRA_KEYREAD
Definition: my_base.h:239
@ HA_EXTRA_KEYREAD_PRESERVE_FIELDS
Definition: my_base.h:350
@ HA_EXTRA_ATTACH_CHILDREN
Definition: my_base.h:398
@ HA_EXTRA_EXPORT
Definition: my_base.h:405
@ HA_EXTRA_NO_KEYS
Definition: my_base.h:259
@ HA_EXTRA_NO_WAIT_LOCK
Definition: my_base.h:254
@ HA_EXTRA_QUICK
Definition: my_base.h:206
@ HA_EXTRA_RESTORE_POS
Definition: my_base.h:263
@ HA_EXTRA_PRELOAD_BUFFER_SIZE
Definition: my_base.h:338
@ HA_EXTRA_NO_ROWS
Definition: my_base.h:279
@ HA_EXTRA_RESET_STATE
Definition: my_base.h:314
@ HA_EXTRA_WRITE_CANNOT_REPLACE
Definition: my_base.h:373
@ HA_EXTRA_BEGIN_ALTER_COPY
Definition: my_base.h:412
@ HA_EXTRA_IGNORE_DUP_KEY
Definition: my_base.h:322
@ HA_EXTRA_NOT_USED
Definition: my_base.h:207
@ HA_EXTRA_END_ALTER_COPY
Definition: my_base.h:414
constexpr const ulong HA_INDEX_USES_SECONDARY_ENGINE_ATTRIBUTE
Definition: my_base.h:557
ha_storage_media
Definition: my_base.h:115
@ HA_SM_MEMORY
Definition: my_base.h:118
@ HA_SM_DISK
Definition: my_base.h:117
@ HA_SM_DEFAULT
Definition: my_base.h:116
en_fieldtype
Definition: my_base.h:1054
@ FIELD_CONSTANT
Definition: my_base.h:1061
@ FIELD_VARCHAR
Definition: my_base.h:1064
@ FIELD_BLOB
Definition: my_base.h:1060
@ FIELD_enum_val_count
Definition: my_base.h:1066
@ FIELD_ZERO
Definition: my_base.h:1063
@ FIELD_SKIP_PRESPACE
Definition: my_base.h:1058
@ FIELD_SKIP_ENDSPACE
Definition: my_base.h:1057
@ FIELD_CHECK
Definition: my_base.h:1065
@ FIELD_SKIP_ZERO
Definition: my_base.h:1059
@ FIELD_INTERVALL
Definition: my_base.h:1062
@ FIELD_LAST
Definition: my_base.h:1055
@ FIELD_NORMAL
Definition: my_base.h:1056
constexpr const ulong HA_INDEX_USES_ENGINE_ATTRIBUTE
Definition: my_base.h:556
Utility functions for converting between ulonglong and double.
Some integer typedefs for easier portability.
ulonglong my_off_t
Definition: my_inttypes.h:72
unsigned char uchar
Definition: my_inttypes.h:52
Definition: my_base.h:1131
uint range_flag
Definition: my_base.h:1135
key_range end_key
Definition: my_base.h:1133
key_range start_key
Definition: my_base.h:1132
char * ptr
Definition: my_base.h:1134
Definition: my_base.h:1124
uint length
Definition: my_base.h:1126
enum ha_rkey_function flag
Definition: my_base.h:1128
key_part_map keypart_map
Definition: my_base.h:1127
const uchar * key
Definition: my_base.h:1125
unsigned int uint
Definition: uca9-dump.cc:75