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
428#define HA_EXTRA_PREPARE_FOR_DELETE HA_EXTRA_PREPARE_FOR_DROP
465#define HA_MAX_KEYTYPE 31
477#define HA_PACK_KEY (1 << 1)
484#define HA_SPACE_PACK_USED (1 << 2)
486#define HA_VAR_LENGTH_KEY (1 << 3)
493#define HA_AUTO_KEY (1 << 4)
495#define HA_BINARY_PACK_KEY (1 << 5)
497#define HA_NULL_PART_KEY (1 << 6)
499#define HA_FULLTEXT (1 << 7)
505#define HA_UNIQUE_CHECK (1 << 8)
507#define HA_SORT_ALLOWS_SAME (1 << 9)
509#define HA_SPATIAL (1 << 10)
515#define HA_NULL_ARE_EQUAL (1 << 11)
517#define HA_USES_COMMENT (1 << 12)
519#define HA_GENERATED_KEY (1 << 13)
522#define HA_KEYFLAG_MASK \
523 (HA_NOSAME | HA_PACK_KEY | HA_AUTO_KEY | HA_BINARY_PACK_KEY | HA_FULLTEXT | \
524 HA_UNIQUE_CHECK | HA_SPATIAL | HA_NULL_ARE_EQUAL | HA_GENERATED_KEY)
527#define HA_USES_PARSER (1 << 14)
529#define HA_USES_BLOCK_SIZE (1 << 15)
539#define HA_KEY_HAS_PART_KEY_SEG (1 << 16)
551#define HA_KEY_RENAMED (1 << 17)
553#define HA_VIRTUAL_GEN_KEY (1 << 18)
555#define HA_MULTI_VALUED_KEY (1 << 19)
562#define HA_SPACE_PACK 1
563#define HA_PART_KEY_SEG 4
564#define HA_VAR_LENGTH_PART 8
565#define HA_NULL_PART 16
566#define HA_BLOB_PART 32
567#define HA_SWAP_KEY 64
568#define HA_REVERSE_SORT 128
569#define HA_NO_SORT 256
574#define HA_END_SPACE_ARE_EQUAL 512
575#define HA_BIT_PART 1024
603#define HA_OPTION_PACK_RECORD 1
616#define HA_OPTION_PACK_KEYS 2
629#define HA_OPTION_COMPRESS_RECORD 4
634#define HA_OPTION_UNUSED1 8
641#define HA_OPTION_TMP_TABLE 16
648#define HA_OPTION_CHECKSUM 32
656#define HA_OPTION_DELAY_KEY_WRITE 64
663#define HA_OPTION_NO_PACK_KEYS 128
671#define HA_OPTION_CREATE_FROM_ENGINE 256
679#define HA_OPTION_RELIES_ON_SQL_LAYER 512
681#define HA_OPTION_UNUSED2 1024
683#define HA_OPTION_UNUSED3 2048
688#define HA_OPTION_STATS_PERSISTENT 4096
695#define HA_OPTION_NO_STATS_PERSISTENT 8192
702#define HA_OPTION_TEMP_COMPRESS_RECORD 16384
710#define HA_OPTION_READ_ONLY_DATA 32768
715#define HA_OPTION_NO_CHECKSUM (1L << 17)
720#define HA_OPTION_NO_DELAY_KEY_WRITE (1L << 18)
724#define HA_DONT_TOUCH_DATA 1
725#define HA_PACK_RECORD 2
726#define HA_CREATE_TMP_TABLE 4
727#define HA_CREATE_CHECKSUM 8
728#define HA_CREATE_KEEP_FILES 16
729#define HA_CREATE_PAGE_CHECKSUM 32
730#define HA_CREATE_DELAY_KEY_WRITE 64
731#define HA_CREATE_RELIES_ON_SQL_LAYER 128
732#define HA_CREATE_INTERNAL_TABLE 256
743#define HA_STATUS_POS 1
750#define HA_STATUS_NO_LOCK 2
752#define HA_STATUS_TIME 4
788#define HA_STATUS_CONST 8
794#define HA_STATUS_VARIABLE 16
801#define HA_STATUS_ERRKEY 32
805#define HA_STATUS_AUTO 64
810#define HA_STATUS_VARIABLE_EXTRA 128
819#define HA_ERR_FIRST 120
821#define HA_ERR_KEY_NOT_FOUND 120
823#define HA_ERR_FOUND_DUPP_KEY 121
825#define HA_ERR_INTERNAL_ERROR 122
827#define HA_ERR_RECORD_CHANGED 123
829#define HA_ERR_WRONG_INDEX 124
831#define HA_ERR_ROLLED_BACK 125
833#define HA_ERR_CRASHED 126
835#define HA_ERR_WRONG_IN_RECORD 127
837#define HA_ERR_OUT_OF_MEM 128
839#define HA_ERR_NOT_A_TABLE 130
841#define HA_ERR_WRONG_COMMAND 131
843#define HA_ERR_OLD_FILE 132
845#define HA_ERR_NO_ACTIVE_RECORD 133
847#define HA_ERR_RECORD_DELETED 134
849#define HA_ERR_RECORD_FILE_FULL 135
851#define HA_ERR_INDEX_FILE_FULL 136
853#define HA_ERR_END_OF_FILE 137
855#define HA_ERR_UNSUPPORTED 138
857#define HA_ERR_TOO_BIG_ROW 139
859#define HA_WRONG_CREATE_OPTION 140
861#define HA_ERR_FOUND_DUPP_UNIQUE 141
863#define HA_ERR_UNKNOWN_CHARSET 142
865#define HA_ERR_WRONG_MRG_TABLE_DEF 143
867#define HA_ERR_CRASHED_ON_REPAIR 144
869#define HA_ERR_CRASHED_ON_USAGE 145
870#define HA_ERR_LOCK_WAIT_TIMEOUT 146
871#define HA_ERR_LOCK_TABLE_FULL 147
873#define HA_ERR_READ_ONLY_TRANSACTION 148
874#define HA_ERR_LOCK_DEADLOCK 149
876#define HA_ERR_CANNOT_ADD_FOREIGN 150
878#define HA_ERR_NO_REFERENCED_ROW 151
880#define HA_ERR_ROW_IS_REFERENCED 152
882#define HA_ERR_NO_SAVEPOINT 153
884#define HA_ERR_NON_UNIQUE_BLOCK_SIZE 154
886#define HA_ERR_NO_SUCH_TABLE 155
888#define HA_ERR_TABLE_EXIST 156
890#define HA_ERR_NO_CONNECTION 157
892#define HA_ERR_NULL_IN_SPATIAL 158
894#define HA_ERR_TABLE_DEF_CHANGED 159
896#define HA_ERR_NO_PARTITION_FOUND 160
898#define HA_ERR_RBR_LOGGING_FAILED 161
900#define HA_ERR_DROP_INDEX_FK 162
903#define HA_ERR_FOREIGN_DUPLICATE_KEY 163
905#define HA_ERR_TABLE_NEEDS_UPGRADE 164
907#define HA_ERR_TABLE_READONLY 165
909#define HA_ERR_AUTOINC_READ_FAILED 166
911#define HA_ERR_AUTOINC_ERANGE 167
913#define HA_ERR_GENERIC 168
915#define HA_ERR_RECORD_IS_THE_SAME 169
917#define HA_ERR_LOGGING_IMPOSSIBLE 170
919#define HA_ERR_CORRUPT_EVENT 171
921#define HA_ERR_NEW_FILE 172
923#define HA_ERR_ROWS_EVENT_APPLY 173
925#define HA_ERR_INITIALIZATION 174
927#define HA_ERR_FILE_TOO_SHORT 175
929#define HA_ERR_WRONG_CRC 176
931#define HA_ERR_TOO_MANY_CONCURRENT_TRXS 177
933#define HA_ERR_NOT_IN_LOCK_PARTITIONS 178
935#define HA_ERR_INDEX_COL_TOO_LONG 179
937#define HA_ERR_INDEX_CORRUPT 180
939#define HA_ERR_UNDO_REC_TOO_BIG 181
941#define HA_FTS_INVALID_DOCID 182
943#define HA_ERR_TABLE_IN_FK_CHECK 183
945#define HA_ERR_TABLESPACE_EXISTS 184
947#define HA_ERR_TOO_MANY_FIELDS 185
949#define HA_ERR_ROW_IN_WRONG_PARTITION 186
951#define HA_ERR_INNODB_READ_ONLY 187
953#define HA_ERR_FTS_EXCEED_RESULT_CACHE_LIMIT 188
955#define HA_ERR_TEMP_FILE_WRITE_FAILURE 189
957#define HA_ERR_INNODB_FORCED_RECOVERY 190
959#define HA_ERR_FTS_TOO_MANY_WORDS_IN_PHRASE 191
961#define HA_ERR_FK_DEPTH_EXCEEDED 192
963#define HA_MISSING_CREATE_OPTION 193
965#define HA_ERR_SE_OUT_OF_MEMORY 194
967#define HA_ERR_TABLE_CORRUPT 195
969#define HA_ERR_QUERY_INTERRUPTED 196
971#define HA_ERR_TABLESPACE_MISSING 197
973#define HA_ERR_TABLESPACE_IS_NOT_EMPTY 198
975#define HA_ERR_WRONG_FILE_NAME 199
977#define HA_ERR_NOT_ALLOWED_COMMAND 200
979#define HA_ERR_COMPUTE_FAILED 201
982#define HA_ERR_ROW_FORMAT_CHANGED 202
984#define HA_ERR_NO_WAIT_LOCK 203
986#define HA_ERR_DISK_FULL_NOWAIT 204
988#define HA_ERR_NO_SESSION_TEMP 205
990#define HA_ERR_WRONG_TABLE_NAME 206
992#define HA_ERR_TOO_LONG_PATH 207
994#define HA_ERR_SAMPLING_INIT_FAILED 208
996#define HA_ERR_FTS_TOO_MANY_NESTED_EXP 209
998#define HA_ERR_LAST 209
1001#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)
1005#define HA_NAMELEN 64
1006#define NO_SUCH_KEY (~(uint)0)
1009#define HA_WHOLE_KEY (~(key_part_map)0)
1014#define SEARCH_FIND 1
1015#define SEARCH_NO_FIND 2
1016#define SEARCH_SAME 4
1017#define SEARCH_BIGGER 8
1018#define SEARCH_SMALLER 16
1019#define SEARCH_SAVE_BUFF 32
1020#define SEARCH_UPDATE 64
1021#define SEARCH_PREFIX 128
1022#define SEARCH_LAST 256
1023#define MBR_CONTAIN 512
1024#define MBR_INTERSECT 1024
1025#define MBR_WITHIN 2048
1026#define MBR_DISJOINT 4096
1027#define MBR_EQUAL 8192
1028#define MBR_DATA 16384
1029#define SEARCH_NULL_ARE_EQUAL 32768
1030#define SEARCH_NULL_ARE_NOT_EQUAL 65536
1034#define READ_CACHE_USED 2
1035#define READ_CHECK_USED 4
1036#define KEY_READ_USED 8
1037#define WRITE_CACHE_USED 16
1038#define OPT_NO_ROWS 32
1041#define HA_STATE_CHANGED 1
1042#define HA_STATE_AKTIV 2
1043#define HA_STATE_WRITTEN 4
1044#define HA_STATE_DELETED 8
1045#define HA_STATE_NEXT_FOUND 16
1046#define HA_STATE_PREV_FOUND 32
1047#define HA_STATE_NO_KEY 64
1048#define HA_STATE_KEY_CHANGED 128
1049#define HA_STATE_WRITE_AT_END 256
1050#define HA_STATE_BUFF_SAVED 512
1051#define HA_STATE_ROW_CHANGED 1024
1052#define HA_STATE_EXTEND_BLOCK 2048
1140#define rows2double(A) ulonglong2double(A)
1143#define HA_POS_ERROR (~(ha_rows)0)
1144#define HA_OFFSET_ERROR (~(my_off_t)0)
1146#define MAX_FILE_SIZE LLONG_MAX
1148#define HA_VARCHAR_PACKLENGTH(field_length) ((field_length) < 256 ? 1 : 2)
ha_base_keytype
Definition: my_base.h:440
@ HA_KEYTYPE_VARBINARY2
Definition: my_base.h:461
@ HA_KEYTYPE_BINARY
Definition: my_base.h:443
@ HA_KEYTYPE_USHORT_INT
Definition: my_base.h:449
@ HA_KEYTYPE_ULONGLONG
Definition: my_base.h:452
@ HA_KEYTYPE_UINT24
Definition: my_base.h:454
@ HA_KEYTYPE_VARTEXT2
Definition: my_base.h:460
@ HA_KEYTYPE_FLOAT
Definition: my_base.h:446
@ HA_KEYTYPE_BIT
Definition: my_base.h:462
@ HA_KEYTYPE_END
Definition: my_base.h:441
@ HA_KEYTYPE_ULONG_INT
Definition: my_base.h:450
@ HA_KEYTYPE_SHORT_INT
Definition: my_base.h:444
@ HA_KEYTYPE_NUM
Definition: my_base.h:448
@ HA_KEYTYPE_DOUBLE
Definition: my_base.h:447
@ HA_KEYTYPE_LONG_INT
Definition: my_base.h:445
@ HA_KEYTYPE_INT8
Definition: my_base.h:455
@ HA_KEYTYPE_INT24
Definition: my_base.h:453
@ HA_KEYTYPE_VARTEXT1
Definition: my_base.h:457
@ HA_KEYTYPE_VARBINARY1
Definition: my_base.h:458
@ HA_KEYTYPE_TEXT
Definition: my_base.h:442
@ HA_KEYTYPE_LONGLONG
Definition: my_base.h:451
ha_panic_function
Definition: my_base.h:432
@ HA_PANIC_WRITE
Definition: my_base.h:434
@ HA_PANIC_CLOSE
Definition: my_base.h:433
@ HA_PANIC_READ
Definition: my_base.h:435
data_file_type
Definition: my_base.h:1070
@ COMPRESSED_RECORD
Definition: my_base.h:1073
@ DYNAMIC_RECORD
Definition: my_base.h:1072
@ BLOCK_RECORD
Definition: my_base.h:1074
@ STATIC_RECORD
Definition: my_base.h:1071
ha_key_alg
Definition: my_base.h:98
@ HA_KEY_ALG_RTREE
Definition: my_base.h:109
@ HA_KEY_ALG_HASH
Definition: my_base.h:110
@ 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:107
@ HA_KEY_ALG_BTREE
Definition: my_base.h:108
@ HA_KEY_ALG_FULLTEXT
Definition: my_base.h:111
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_NEAREST_NEIGHBOR
Definition: my_base.h:92
@ 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:93
@ 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:1079
@ UNIQUE_RANGE
Definition: my_base.h:1091
@ SKIP_RANGE
Definition: my_base.h:1110
@ NEAR_MIN
Definition: my_base.h:1083
@ DESC_FLAG
Definition: my_base.h:1122
@ NO_MIN_RANGE
from -inf
Definition: my_base.h:1080
@ NO_MAX_RANGE
to +inf
Definition: my_base.h:1081
@ EQ_RANGE
Definition: my_base.h:1097
@ SKIP_RECORDS_IN_RANGE
Definition: my_base.h:1117
@ NEAR_MAX
Definition: my_base.h:1085
@ NULL_RANGE
Definition: my_base.h:1102
@ 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:1107
ulong key_part_map
Definition: my_base.h:1008
my_off_t ha_rows
Definition: my_base.h:1141
ha_extra_function
Definition: my_base.h:185
@ HA_EXTRA_NO_USER_CHANGE
Definition: my_base.h:246
@ HA_EXTRA_ENABLE_UNIQUE_RECORD_FILTER
Definition: my_base.h:422
@ HA_EXTRA_NO_KEYREAD
Definition: my_base.h:241
@ HA_EXTRA_KEYREAD_CHANGE_POS
Definition: my_base.h:261
@ HA_EXTRA_ADD_CHILDREN_LIST
Definition: my_base.h:398
@ HA_EXTRA_REMEMBER_POS
Definition: my_base.h:263
@ HA_EXTRA_FORCE_REOPEN
Definition: my_base.h:269
@ HA_EXTRA_DELETE_CANNOT_BATCH
Definition: my_base.h:381
@ HA_EXTRA_NORMAL
Definition: my_base.h:194
@ HA_EXTRA_IS_ATTACHED_CHILDREN
Definition: my_base.h:400
@ HA_EXTRA_NO_AUTOINC_LOCKING
Definition: my_base.h:417
@ HA_EXTRA_WAIT_LOCK
Definition: my_base.h:254
@ HA_EXTRA_WRITE_CAN_REPLACE
Definition: my_base.h:373
@ HA_EXTRA_FLUSH
Definition: my_base.h:275
@ HA_EXTRA_IGNORE_NO_KEY
Definition: my_base.h:359
@ 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:411
@ HA_EXTRA_SECONDARY_SORT_ROWID
Do secondary sort by handler::ref (rowid) after key sort.
Definition: my_base.h:408
@ HA_EXTRA_PREPARE_FOR_UPDATE
Definition: my_base.h:338
@ HA_EXTRA_DETACH_CHILDREN
Definition: my_base.h:401
@ HA_EXTRA_CHANGE_KEY_TO_DUP
Definition: my_base.h:344
@ HA_EXTRA_READCHECK
Definition: my_base.h:226
@ HA_EXTRA_UPDATE_CANNOT_BATCH
Definition: my_base.h:382
@ HA_EXTRA_NO_READCHECK
Definition: my_base.h:225
@ HA_EXTRA_DISABLE_UNIQUE_RECORD_FILTER
Definition: my_base.h:424
@ HA_EXTRA_NO_IGNORE_DUP_KEY
Definition: my_base.h:324
@ HA_EXTRA_CHANGE_KEY_TO_UNIQUE
Definition: my_base.h:343
@ HA_EXTRA_PREPARE_FOR_DROP
Definition: my_base.h:330
@ HA_EXTRA_MARK_AS_LOG_TABLE
Definition: my_base.h:365
@ HA_EXTRA_NO_IGNORE_NO_KEY
Definition: my_base.h:360
@ HA_EXTRA_PREPARE_FOR_RENAME
Definition: my_base.h:394
@ HA_EXTRA_INSERT_WITH_UPDATE
Definition: my_base.h:387
@ HA_EXTRA_KEYREAD
Definition: my_base.h:240
@ HA_EXTRA_KEYREAD_PRESERVE_FIELDS
Definition: my_base.h:351
@ HA_EXTRA_ATTACH_CHILDREN
Definition: my_base.h:399
@ HA_EXTRA_EXPORT
Definition: my_base.h:406
@ HA_EXTRA_NO_KEYS
Definition: my_base.h:260
@ HA_EXTRA_NO_WAIT_LOCK
Definition: my_base.h:255
@ HA_EXTRA_QUICK
Definition: my_base.h:207
@ HA_EXTRA_RESTORE_POS
Definition: my_base.h:264
@ HA_EXTRA_PRELOAD_BUFFER_SIZE
Definition: my_base.h:339
@ HA_EXTRA_NO_ROWS
Definition: my_base.h:280
@ HA_EXTRA_RESET_STATE
Definition: my_base.h:315
@ HA_EXTRA_WRITE_CANNOT_REPLACE
Definition: my_base.h:374
@ HA_EXTRA_BEGIN_ALTER_COPY
Definition: my_base.h:413
@ HA_EXTRA_IGNORE_DUP_KEY
Definition: my_base.h:323
@ HA_EXTRA_NOT_USED
Definition: my_base.h:208
@ HA_EXTRA_END_ALTER_COPY
Definition: my_base.h:415
constexpr const ulong HA_INDEX_USES_SECONDARY_ENGINE_ATTRIBUTE
Definition: my_base.h:558
ha_storage_media
Definition: my_base.h:116
@ HA_SM_MEMORY
Definition: my_base.h:119
@ HA_SM_DISK
Definition: my_base.h:118
@ HA_SM_DEFAULT
Definition: my_base.h:117
en_fieldtype
Definition: my_base.h:1055
@ FIELD_CONSTANT
Definition: my_base.h:1062
@ FIELD_VARCHAR
Definition: my_base.h:1065
@ FIELD_BLOB
Definition: my_base.h:1061
@ FIELD_enum_val_count
Definition: my_base.h:1067
@ FIELD_ZERO
Definition: my_base.h:1064
@ FIELD_SKIP_PRESPACE
Definition: my_base.h:1059
@ FIELD_SKIP_ENDSPACE
Definition: my_base.h:1058
@ FIELD_CHECK
Definition: my_base.h:1066
@ FIELD_SKIP_ZERO
Definition: my_base.h:1060
@ FIELD_INTERVALL
Definition: my_base.h:1063
@ FIELD_LAST
Definition: my_base.h:1056
@ FIELD_NORMAL
Definition: my_base.h:1057
constexpr const ulong HA_INDEX_USES_ENGINE_ATTRIBUTE
Definition: my_base.h:557
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:1132
uint range_flag
Definition: my_base.h:1136
key_range end_key
Definition: my_base.h:1134
key_range start_key
Definition: my_base.h:1133
char * ptr
Definition: my_base.h:1135
Definition: my_base.h:1125
uint length
Definition: my_base.h:1127
enum ha_rkey_function flag
Definition: my_base.h:1129
key_part_map keypart_map
Definition: my_base.h:1128
const uchar * key
Definition: my_base.h:1126