summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2019-04-15 18:16:02 +0300
committerMonty <monty@mariadb.org>2019-05-23 02:28:23 +0300
commitab38b7511bad8cc03a67f0d43e7169e6dfcac9fa (patch)
tree85488af3e151ca542ddc415625d589d3069983ec /include
parent2ca2dcac6ab75b6bda74280dfa9b7a1a2cb069fc (diff)
downloadmariadb-git-ab38b7511bad8cc03a67f0d43e7169e6dfcac9fa.tar.gz
MDEV-17841 S3 storage engine
A read-only storage engine that stores it's data in (aws) S3 To store data in S3 one could use ALTER TABLE: ALTER TABLE table_name ENGINE=S3 libmarias3 integration done by Sergei Golubchik libmarias3 created by Andrew Hutchings
Diffstat (limited to 'include')
-rw-r--r--include/aria_backup.h4
-rw-r--r--include/maria.h5
-rw-r--r--include/my_base.h2
-rw-r--r--include/my_pthread.h22
4 files changed, 26 insertions, 7 deletions
diff --git a/include/aria_backup.h b/include/aria_backup.h
index 1a1c437d0b9..5cc5f43d9b6 100644
--- a/include/aria_backup.h
+++ b/include/aria_backup.h
@@ -23,10 +23,14 @@ typedef struct st_aria_table_capabilities
ulong bitmap_pages_covered;
uint block_size;
uint keypage_header;
+ enum data_file_type data_file_type;
my_bool checksum;
my_bool transactional;
/* This is true if the table can be copied without any locks */
my_bool online_backup_safe;
+ /* s3 capabilities */
+ ulong s3_block_size;
+ uint8 compression;
} ARIA_TABLE_CAPABILITIES;
int aria_get_capabilities(File kfile, ARIA_TABLE_CAPABILITIES *cap);
diff --git a/include/maria.h b/include/maria.h
index 13783426e35..b3d4cedec57 100644
--- a/include/maria.h
+++ b/include/maria.h
@@ -145,9 +145,11 @@ typedef struct st_maria_create_info
ulonglong auto_increment;
ulonglong data_file_length;
ulonglong key_file_length;
+ ulong s3_block_size;
/* Size of null bitmap at start of row */
uint null_bytes;
uint old_options;
+ uint compression_algorithm;
enum data_file_type org_data_file_type;
uint16 language;
my_bool with_auto_increment, transactional;
@@ -229,6 +231,7 @@ typedef struct st_maria_decode_tree /* Decode huff-table */
struct st_maria_bit_buff;
+typedef struct s3_info S3_INFO;
/*
Note that null markers should always be first in a row !
@@ -285,7 +288,7 @@ extern my_bool maria_upgrade(void);
extern int maria_close(MARIA_HA *file);
extern int maria_delete(MARIA_HA *file, const uchar *buff);
extern MARIA_HA *maria_open(const char *name, int mode,
- uint wait_if_locked);
+ uint wait_if_locked, S3_INFO *s3);
extern int maria_panic(enum ha_panic_function function);
extern int maria_rfirst(MARIA_HA *file, uchar *buf, int inx);
extern int maria_rkey(MARIA_HA *file, uchar *buf, int inx,
diff --git a/include/my_base.h b/include/my_base.h
index 8a8237ce8b2..40b852bc6cc 100644
--- a/include/my_base.h
+++ b/include/my_base.h
@@ -53,7 +53,7 @@
Allow opening even if table is incompatible as this is for ALTER TABLE which
will fix the table structure.
*/
-#define HA_OPEN_FOR_ALTER 4096U
+#define HA_OPEN_FOR_ALTER 8192U
/* The following is parameter to ha_rkey() how to use key */
diff --git a/include/my_pthread.h b/include/my_pthread.h
index 4d33d1abdd4..75e016169df 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -717,22 +717,34 @@ extern void my_mutex_end(void);
#define INSTRUMENT_ME 0
+/*
+ Thread specific variables
+
+ Aria key cache is using the following variables for keeping track of
+ state:
+ suspend, next, prev, keycache_link, keycache_file, suspend, lock_type
+
+ MariaDB uses the following to
+ mutex, current_mutex, current_cond, abort
+*/
+
struct st_my_thread_var
{
int thr_errno;
mysql_cond_t suspend;
mysql_mutex_t mutex;
+ struct st_my_thread_var *next,**prev;
mysql_mutex_t * volatile current_mutex;
mysql_cond_t * volatile current_cond;
+ void *keycache_link;
+ void *keycache_file;
+ void *stack_ends_here;
+ safe_mutex_t *mutex_in_use;
pthread_t pthread_self;
my_thread_id id, dbug_id;
int volatile abort;
+ uint lock_type; /* used by conditional release the queue */
my_bool init;
- struct st_my_thread_var *next,**prev;
- void *keycache_link;
- uint lock_type; /* used by conditional release the queue */
- void *stack_ends_here;
- safe_mutex_t *mutex_in_use;
#ifndef DBUG_OFF
void *dbug;
char name[THREAD_NAME_SIZE+1];