diff options
author | Monty <monty@mariadb.org> | 2020-03-30 14:50:03 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2020-04-19 17:33:51 +0300 |
commit | eca5c2c67ff1854b186b0e1b8dd342cb988e94d2 (patch) | |
tree | 7a6f35362dfc38469f0842cc98c0c28fd02236e4 /sql/ha_partition.h | |
parent | 78357796e8069f8cd041ea0bb0f5802234bdd2bc (diff) | |
download | mariadb-git-eca5c2c67ff1854b186b0e1b8dd342cb988e94d2.tar.gz |
Added support for more functions when using partitioned S3 tables
MDEV-22088 S3 partitioning support
All ALTER PARTITION commands should now work on S3 tables except
REBUILD PARTITION
TRUNCATE PARTITION
REORGANIZE PARTITION
In addition, PARTIONED S3 TABLES can also be replicated.
This is achived by storing the partition tables .frm and .par file on S3
for partitioned shared (S3) tables.
The discovery methods are enchanced by allowing engines that supports
discovery to also support of the partitioned tables .frm and .par file
Things in more detail
- The .frm and .par files of partitioned tables are stored in S3 and kept
in sync.
- Added hton callback create_partitioning_metadata to inform handler
that metadata for a partitoned file has changed
- Added back handler::discover_check_version() to be able to check if
a table's or a part table's definition has changed.
- Added handler::check_if_updates_are_ignored(). Needed for partitioning.
- Renamed rebind() -> rebind_psi(), as it was before.
- Changed CHF_xxx hadnler flags to an enum
- Changed some checks from using table->file->ht to use
table->file->partition_ht() to get discovery to work with partitioning.
- If TABLE_SHARE::init_from_binary_frm_image() fails, ensure that we
don't leave any .frm or .par files around.
- Fixed that writefrm() doesn't leave unusable .frm files around
- Appended extension to path for writefrm() to be able to reuse to function
for creating .par files.
- Added DBUG_PUSH("") to a a few functions that caused a lot of not
critical tracing.
Diffstat (limited to 'sql/ha_partition.h')
-rw-r--r-- | sql/ha_partition.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/ha_partition.h b/sql/ha_partition.h index eb10cf84e76..225d69b1a56 100644 --- a/sql/ha_partition.h +++ b/sql/ha_partition.h @@ -22,7 +22,7 @@ #include "queues.h" /* QUEUE */ #define PARTITION_BYTES_IN_POS 2 - +#define PAR_EXT ".par" /** Struct used for partition_name_hash */ typedef struct st_part_name_def @@ -555,8 +555,10 @@ public: int create(const char *name, TABLE *form, HA_CREATE_INFO *create_info) override; int create_partitioning_metadata(const char *name, - const char *old_name, int action_flag) + const char *old_name, + chf_create_flags action_flag) override; + bool check_if_updates_are_ignored(const char *op) const override; void update_create_info(HA_CREATE_INFO *create_info) override; char *update_table_comment(const char *comment) override; int change_partitions(HA_CREATE_INFO *create_info, const char *path, @@ -686,6 +688,7 @@ public: virtual void unbind_psi(); virtual int rebind(); #endif + int discover_check_version() override; /* ------------------------------------------------------------------------- MODULE change record |