1#ifndef HANDLER_INCLUDED
2#define HANDLER_INCLUDED
142 const char *
file,
size_t file_len,
143 const char *
status,
size_t status_len);
172#define HA_ADMIN_ALREADY_DONE 1
174#define HA_ADMIN_NOT_IMPLEMENTED -1
175#define HA_ADMIN_FAILED -2
176#define HA_ADMIN_CORRUPT -3
177#define HA_ADMIN_INTERNAL_ERROR -4
178#define HA_ADMIN_INVALID -5
179#define HA_ADMIN_REJECT -6
180#define HA_ADMIN_TRY_ALTER -7
181#define HA_ADMIN_WRONG_CHECKSUM -8
182#define HA_ADMIN_NOT_BASE_TABLE -9
183#define HA_ADMIN_NEEDS_UPGRADE -10
184#define HA_ADMIN_NEEDS_ALTER -11
185#define HA_ADMIN_NEEDS_CHECK -12
186#define HA_ADMIN_STATS_UPD_ERR -13
188#define HA_ADMIN_NEEDS_DUMP_UPGRADE -14
209#define HA_NO_TRANSACTIONS (1 << 0)
210#define HA_PARTIAL_COLUMN_READ (1 << 1)
217#define HA_TABLE_SCAN_ON_INDEX (1 << 2)
220#define HA_UNUSED3 (1 << 3)
227#define HA_CAN_GEOMETRY (1 << 4)
233#define HA_FAST_KEY_READ (1 << 5)
238#define HA_REQUIRES_KEY_COLUMNS_FOR_DELETE (1 << 6)
244#define HA_NULL_IN_KEY (1 << 7)
250#define HA_DUPLICATE_POS (1 << 8)
251#define HA_NO_BLOBS (1 << 9)
256#define HA_CAN_INDEX_BLOBS (1 << 10)
261#define HA_AUTO_PART_KEY (1 << 11)
266#define HA_REQUIRE_PRIMARY_KEY (1 << 12)
271#define HA_STATS_RECORDS_IS_EXACT (1 << 13)
273#define HA_UNUSED14 (1 << 14)
280#define HA_PRIMARY_KEY_IN_READ_INDEX (1 << 15)
288#define HA_PRIMARY_KEY_REQUIRED_FOR_POSITION (1 << 16)
289#define HA_CAN_RTREEKEYS (1 << 17)
296#define HA_PRIMARY_KEY_REQUIRED_FOR_DELETE (1 << 19)
300#define HA_NO_PREFIX_CHAR_KEYS (1 << 20)
304#define HA_CAN_FULLTEXT (1 << 21)
309#define HA_CAN_SQL_HANDLER (1 << 22)
313#define HA_NO_AUTO_INCREMENT (1 << 23)
317#define HA_HAS_CHECKSUM (1 << 24)
323#define HA_FILE_BASED (1 << 26)
324#define HA_NO_VARCHAR (1 << 27)
328#define HA_CAN_BIT_FIELD (1 << 28)
329#define HA_ANY_INDEX_MAY_BE_UNIQUE (1 << 30)
330#define HA_NO_COPY_ON_ALTER (1LL << 31)
331#define HA_COUNT_ROWS_INSTANT (1LL << 32)
333#define HA_HAS_OWN_BINLOGGING (1LL << 33)
338#define HA_BINLOG_ROW_CAPABLE (1LL << 34)
339#define HA_BINLOG_STMT_CAPABLE (1LL << 35)
362#define HA_DUPLICATE_KEY_NOT_IN_ORDER (1LL << 36)
368#define HA_CAN_REPAIR (1LL << 37)
374#define HA_BINLOG_FLAGS (HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE)
410#define HA_READ_BEFORE_WRITE_REMOVAL (1LL << 38)
415#define HA_CAN_FULLTEXT_EXT (1LL << 39)
423#define HA_READ_OUT_OF_SYNC (1LL << 40)
429#define HA_CAN_EXPORT (1LL << 41)
435#define HA_BLOCK_CONST_TABLE (1LL << 42)
440#define HA_CAN_FULLTEXT_HINTS (1LL << 43)
448#define HA_NO_READ_LOCAL_LOCK (1LL << 44)
461#define HA_ATTACHABLE_TRX_COMPATIBLE (1LL << 45)
466#define HA_GENERATED_COLUMNS (1LL << 46)
471#define HA_CAN_INDEX_VIRTUAL_GENERATED_COLUMN (1LL << 47)
476#define HA_DESCENDING_INDEX (1LL << 48)
481#define HA_BLOB_PARTIAL_UPDATE (1LL << 49)
488#define HA_SUPPORTS_GEOGRAPHIC_GEOMETRY_COLUMN (1LL << 50)
493#define HA_SUPPORTS_DEFAULT_EXPRESSION (1LL << 51)
498#define HA_UPDATE_NOT_SUPPORTED (1LL << 52)
503#define HA_DELETE_NOT_SUPPORTED (1LL << 53)
509#define HA_NO_INDEX_ACCESS (1LL << 54)
514#define HA_MULTI_VALUED_KEY_SUPPORT (1LL << 55)
525#define HA_READ_NEXT 1
529#define HA_READ_PREV 2
541#define HA_READ_ORDER 4
548#define HA_READ_RANGE 8
553#define HA_ONLY_WHOLE_INDEX 16
560#define HA_TABLE_SCAN_ON_NULL 32
570#define HA_KEYREAD_ONLY 64
575#define HA_KEY_SCAN_NOT_ROR 128
576#define HA_DO_INDEX_COND_PUSHDOWN 256
579#define HA_KEY_SWITCH_NONUNIQ 0
580#define HA_KEY_SWITCH_ALL 1
581#define HA_KEY_SWITCH_NONUNIQ_SAVE 2
582#define HA_KEY_SWITCH_ALL_SAVE 3
589#define HA_SLOT_UNDEF ((uint)-1)
596#define HA_OPEN_KEYFILE 1
597#define HA_OPEN_RNDFILE 2
598#define HA_GET_INDEX 4
600#define HA_READ_ONLY 16
602#define HA_TRY_READ_ONLY 32
603#define HA_WAIT_IF_LOCKED 64
604#define HA_ABORT_IF_LOCKED 128
605#define HA_BLOCK_LOCK 256
606#define HA_OPEN_TEMPORARY 512
609#define HA_KEY_NULL_LENGTH 1
610#define HA_KEY_BLOB_LENGTH 2
612#define HA_LEX_CREATE_TMP_TABLE 1
613#define HA_LEX_CREATE_IF_NOT_EXISTS 2
614#define HA_LEX_CREATE_TABLE_LIKE 4
615#define HA_LEX_CREATE_INTERNAL_TMP_TABLE 8
616#define HA_MAX_REC_LENGTH 65535U
708#define HA_CREATE_USED_AUTO (1L << 0)
709#define HA_CREATE_USED_RAID (1L << 1)
710#define HA_CREATE_USED_UNION (1L << 2)
711#define HA_CREATE_USED_INSERT_METHOD (1L << 3)
712#define HA_CREATE_USED_MIN_ROWS (1L << 4)
713#define HA_CREATE_USED_MAX_ROWS (1L << 5)
714#define HA_CREATE_USED_AVG_ROW_LENGTH (1L << 6)
715#define HA_CREATE_USED_PACK_KEYS (1L << 7)
716#define HA_CREATE_USED_CHARSET (1L << 8)
717#define HA_CREATE_USED_DEFAULT_CHARSET (1L << 9)
718#define HA_CREATE_USED_DATADIR (1L << 10)
719#define HA_CREATE_USED_INDEXDIR (1L << 11)
720#define HA_CREATE_USED_ENGINE (1L << 12)
721#define HA_CREATE_USED_CHECKSUM (1L << 13)
722#define HA_CREATE_USED_DELAY_KEY_WRITE (1L << 14)
723#define HA_CREATE_USED_ROW_FORMAT (1L << 15)
724#define HA_CREATE_USED_COMMENT (1L << 16)
725#define HA_CREATE_USED_PASSWORD (1L << 17)
726#define HA_CREATE_USED_CONNECTION (1L << 18)
727#define HA_CREATE_USED_KEY_BLOCK_SIZE (1L << 19)
729#define HA_CREATE_USED_TRANSACTIONAL (1L << 20)
731#define HA_CREATE_USED_PAGE_CHECKSUM (1L << 21)
737#define HA_CREATE_USED_STATS_PERSISTENT (1L << 22)
744#define HA_CREATE_USED_STATS_AUTO_RECALC (1L << 23)
751#define HA_CREATE_USED_STATS_SAMPLE_PAGES (1L << 24)
756#define HA_CREATE_USED_TABLESPACE (1L << 25)
759#define HA_CREATE_USED_COMPRESS (1L << 26)
762#define HA_CREATE_USED_ENCRYPT (1L << 27)
769#define HA_CREATE_USED_DEFAULT_COLLATE (1L << 28)
772#define HA_CREATE_USED_SECONDARY_ENGINE (1L << 29)
779#define HA_CREATE_USED_DEFAULT_ENCRYPTION (1L << 30)
816#define MAXGTRIDSIZE 64
817#define MAXBQUALSIZE 64
819#define COMPATIBLE_DATA_YES 0
820#define COMPATIBLE_DATA_NO 1
826#define UNDEF_NODEGROUP 65535
905 const char *datafile,
const char *undofile,
1086 if (lenp !=
nullptr) {
1385 const char *tablespace_name);
1430typedef const char *(*get_tablespace_filename_ext_t)();
1528 const char *
name,
uchar **frmblob,
size_t *frmlen);
1531 const char *
path,
const char *wild,
bool dir,
1535 const char *
db,
const char *
name);
1573 bool is_sql_layer_system_table);
1645 const void *sdi,
uint64 sdi_len);
1723 void **ptr_trx_arg);
1971 uint index_ordinal_position,
uint column_ordinal_position,
1990 const char *tablespace_name,
const char *file_name,
2033 uint loc_len,
uint task_id,
int in_err,
2045 uint loc_len,
uint task_id,
int in_err);
2059 const char *data_dir);
2071 uint loc_len,
uint task_id,
int in_err,
2083 uint loc_len,
uint task_id,
int in_err);
2207 double optimizer_cost,
2208 bool *use_best_so_far,
2210 double *secondary_engine_cost);
2281template <
typename... Args>
2284 return (uint64_t{1} <<
static_cast<int>(flag1)) |
2363 void *cbk_ctx, uint64_t *start_id,
2387 uint64_t *num_pages);
2393 void (*)(std::vector<std::pair<uint64_t, bool>> &
status);
2635#define HTON_NO_FLAGS 0
2636#define HTON_CLOSE_CURSORS_AT_COMMIT (1 << 0)
2637#define HTON_ALTER_NOT_SUPPORTED (1 << 1)
2638#define HTON_CAN_RECREATE (1 << 2)
2639#define HTON_HIDDEN (1 << 3)
2644#define HTON_NOT_USER_SELECTABLE (1 << 5)
2645#define HTON_TEMPORARY_NOT_SUPPORTED \
2647#define HTON_SUPPORT_LOG_TABLES (1 << 7)
2648#define HTON_NO_PARTITION (1 << 8)
2663#define HTON_NO_BINLOG_ROW_OPT (1 << 9)
2673#define HTON_SUPPORTS_EXTENDED_KEYS (1 << 10)
2677#define HTON_SUPPORTS_FOREIGN_KEYS (1 << 11)
2685#define HTON_SUPPORTS_ATOMIC_DDL (1 << 12)
2688#define HTON_SUPPORTS_PACKED_KEYS (1 << 13)
2691#define HTON_IS_SECONDARY_ENGINE (1 << 14)
2694#define HTON_SUPPORTS_SECONDARY_ENGINE (1 << 15)
2697#define HTON_SUPPORTS_TABLE_ENCRYPTION (1 << 16)
2927 [[maybe_unused]]) {}
3295 Alter_info *alter_info_arg,
bool error_if_not_empty_arg,
3296 KEY *key_info_arg,
uint key_count_arg,
3332 const char *try_instead);
3340 (
"index renamed: '%s' to '%s'", old_key->
name, new_key->
name));
3348 DBUG_PRINT(
"info", (
"index had visibility altered: %i to %i",
3533 return other > *
this ? true :
false;
3569#define HA_MRR_SINGLE_POINT 1
3570#define HA_MRR_FIXED_KEY 2
3576#define HA_MRR_NO_ASSOCIATION 4
3586#define HA_MRR_SORTED 8
3589#define HA_MRR_INDEX_ONLY 16
3595#define HA_MRR_LIMITS 32
3603#define HA_MRR_USE_DEFAULT_IMPL 64
3610#define HA_MRR_NO_NULL_ENDPOINTS 128
3618#define HA_MRR_SUPPORT_SORTED 256
3691#define make_keypart_map(N) (((key_part_map)2 << (N)) - 1)
3696#define make_prev_keypart_map(N) (((key_part_map)1 << (N)) - 1)
4413 DBUG_PRINT(
"info", (
"handler created F_UNLCK %d F_RDLCK %d F_WRLCK %d",
4414 F_UNLCK, F_RDLCK, F_WRLCK));
4418 assert(
m_psi ==
nullptr);
4530 uint *dup_key_found);
4550 bool error_if_not_loaded);
4566 size_t *num_threads [[maybe_unused]],
4567 bool use_reserved_threads [[maybe_unused]]) {
4591 void *cookie, ulong ncols, ulong row_len,
const ulong *col_offsets,
4592 const ulong *null_byte_offsets,
const ulong *null_bitmasks)>;
4606 using Load_cbk = std::function<bool(
void *cookie,
uint nrows,
void *rowdata,
4607 uint64_t partition_id)>;
4630 void **thread_ctxs [[maybe_unused]],
4685 uint child_table_name_len,
4686 char *child_key_name,
4687 uint child_key_name_len);
4887 const bool tablesample);
4925 void *seq_init_param,