diff options
Diffstat (limited to 'storage/maria/maria_def.h')
-rw-r--r-- | storage/maria/maria_def.h | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/storage/maria/maria_def.h b/storage/maria/maria_def.h index dae6aa2cac3..13ae2a6150a 100644 --- a/storage/maria/maria_def.h +++ b/storage/maria/maria_def.h @@ -48,6 +48,9 @@ /* maria_open() flag, specific for maria_pack */ #define HA_OPEN_IGNORE_MOVED_STATE (1U << 30) +typedef struct st_sort_key_blocks MA_SORT_KEY_BLOCKS; +typedef struct st_sort_ftbuf MA_SORT_FT_BUF; + extern PAGECACHE maria_pagecache_var, *maria_pagecache; int maria_assign_to_pagecache(MARIA_HA *info, ulonglong key_map, PAGECACHE *key_cache); @@ -62,8 +65,8 @@ typedef struct st_maria_sort_info MARIA_HA *info, *new_info; HA_CHECK *param; char *buff; - SORT_KEY_BLOCKS *key_block, *key_block_end; - SORT_FT_BUF *ft_buf; + MA_SORT_KEY_BLOCKS *key_block, *key_block_end; + MA_SORT_FT_BUF *ft_buf; my_off_t filelength, dupp, buff_length; pgcache_page_no_t page; ha_rows max_records; @@ -221,6 +224,10 @@ typedef struct st_maria_state_info #define MARIA_FILE_CREATE_RENAME_LSN_OFFSET 4 #define MARIA_FILE_CREATE_TRID_OFFSET (4 + LSN_STORE_SIZE*3 + 11*8) +#define MARIA_MAX_KEY_LENGTH 2000 +#define MARIA_MAX_KEY_BUFF (MARIA_MAX_KEY_LENGTH+HA_MAX_KEY_SEG*6+8+8 + \ + MARIA_MAX_PACK_TRANSID_SIZE) +#define MARIA_MAX_POSSIBLE_KEY_BUFF (MARIA_MAX_KEY_LENGTH + 24+ 6+6) #define MARIA_STATE_KEY_SIZE (8 + 4) #define MARIA_STATE_KEYBLOCK_SIZE 8 #define MARIA_STATE_KEYSEG_SIZE 12 @@ -228,7 +235,6 @@ typedef struct st_maria_state_info #define MARIA_KEYDEF_SIZE (2+ 5*2) #define MARIA_UNIQUEDEF_SIZE (2+1+1) #define HA_KEYSEG_SIZE (6+ 2*2 + 4*2) -#define MARIA_MAX_KEY_BUFF (HA_MAX_KEY_BUFF + MARIA_MAX_PACK_TRANSID_SIZE) #define MARIA_COLUMNDEF_SIZE (2*7+1+1+4) #define MARIA_BASE_INFO_SIZE (MY_UUID_SIZE + 5*8 + 6*4 + 11*2 + 6 + 5*2 + 1 + 16) #define MARIA_INDEX_BLOCK_MARGIN 16 /* Safety margin for .MYI tables */ @@ -245,6 +251,8 @@ typedef struct st_maria_state_info #define MA_EXTRA_OPTIONS_ENCRYPTED (1 << 0) #define MA_EXTRA_OPTIONS_INSERT_ORDER (1 << 1) +#include "ma_check.h" + /* Basic information of the Maria table. This is stored on disk and not changed (unless we do DLL changes). @@ -263,6 +271,7 @@ typedef struct st_ma_base_info ulong min_pack_length; ulong max_pack_length; /* Max possibly length of packed rec */ ulong min_block_length; + ulong s3_block_size; /* Block length for S3 files */ uint fields; /* fields in table */ uint fixed_not_null_fields; uint fixed_not_null_fields_length; @@ -298,6 +307,8 @@ typedef struct st_ma_base_info uint extra_options; /* default language, not really used but displayed by maria_chk */ uint language; + /* Compression library used. 0 for no compression */ + uint compression_algorithm; /* The following are from the header */ uint key_parts, all_key_parts; @@ -362,6 +373,7 @@ typedef struct st_maria_file_bitmap #define MARIA_CHECKPOINT_SEEN_IN_LOOP 4 typedef struct st_maria_crypt_data MARIA_CRYPT_DATA; +struct ms3_st; typedef struct st_maria_share { /* Shared between opens */ @@ -456,6 +468,7 @@ typedef struct st_maria_share uint32 ftkeys; /* Number of distinct full-text keys + 1 */ PAGECACHE_FILE kfile; /* Shared keyfile */ + S3_INFO *s3_path; /* Connection and path in s3 */ File data_file; /* Shared data file */ int mode; /* mode of file on open */ uint reopen; /* How many times opened */ @@ -609,6 +622,8 @@ struct st_maria_handler MARIA_STATUS_INFO *state, state_save; MARIA_STATUS_INFO *state_start; /* State at start of transaction */ MARIA_USED_TABLES *used_tables; + struct ms3_st *s3; + void **stack_end_ptr; MARIA_ROW cur_row; /* The active row that we just read */ MARIA_ROW new_row; /* Storage for a row during update */ MARIA_KEY last_key; /* Last found key */ @@ -715,6 +730,14 @@ struct st_maria_handler void *index_cond_func_arg; /* parameter for the func */ }; +/* Table options for the Aria and S3 storage engine */ + +struct ha_table_option_struct +{ + ulonglong s3_block_size; + uint compression_algorithm; +}; + /* Some defines used by maria-functions */ #define USE_WHOLE_KEY 65535 /* Use whole key in _search() */ |