diff options
author | Sergei Golubchik <serg@mariadb.org> | 2020-02-27 10:28:49 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2020-02-27 10:30:21 +0100 |
commit | 98adcffe460447c43a86afdf6588e31379b7f52d (patch) | |
tree | 0c0cf97a066b2449f99b3bc8be3cf85c8866fa4e /sql/partition_info.h | |
parent | 9894751a2a61ef952ac6ac556fd683e53fc150e2 (diff) | |
download | mariadb-git-98adcffe460447c43a86afdf6588e31379b7f52d.tar.gz |
Revert "MDEV-17554 Auto-create new partition for system versioned tables with history partitioned by INTERVAL/LIMIT"
This reverts commit 9894751a2a61ef952ac6ac556fd683e53fc150e2.
This reverts commit f707c83fff4fa3f5291684e6226542fdb75bbdeb.
Diffstat (limited to 'sql/partition_info.h')
-rw-r--r-- | sql/partition_info.h | 41 |
1 files changed, 3 insertions, 38 deletions
diff --git a/sql/partition_info.h b/sql/partition_info.h index 1534189af2a..eb8e53a381a 100644 --- a/sql/partition_info.h +++ b/sql/partition_info.h @@ -38,7 +38,6 @@ struct Vers_part_info : public Sql_alloc { Vers_part_info() : limit(0), - auto_inc(false), now_part(NULL), hist_part(NULL) { @@ -47,7 +46,6 @@ struct Vers_part_info : public Sql_alloc Vers_part_info(Vers_part_info &src) : interval(src.interval), limit(src.limit), - auto_inc(src.auto_inc), now_part(NULL), hist_part(NULL) { @@ -71,30 +69,9 @@ struct Vers_part_info : public Sql_alloc my_time_t start; INTERVAL step; enum interval_type type; - bool is_set() const { return type < INTERVAL_LAST; } - bool lt(size_t seconds) const - { - if (step.second) - return step.second < seconds; - if (step.minute) - return step.minute * 60 < seconds; - if (step.hour) - return step.hour * 3600 < seconds; - if (step.day) - return step.day * 3600 * 24 < seconds; - // comparison is used in rough estimates, it doesn't need to be calendar-correct - if (step.month) - return step.month * 3600 * 24 * 30 < seconds; - DBUG_ASSERT(step.year); - return step.year * 86400 * 30 * 365 < seconds; - } - bool ge(size_t seconds) const - { - return !(this->lt(seconds)); - } + bool is_set() { return type < INTERVAL_LAST; } } interval; ulonglong limit; - bool auto_inc; partition_element *now_part; partition_element *hist_part; }; @@ -417,16 +394,14 @@ public: bool vers_init_info(THD *thd); bool vers_set_interval(THD *thd, Item *interval, interval_type int_type, Item *starts, - bool auto_inc, const char *table_name); - bool vers_set_limit(ulonglong limit, bool auto_inc) + const char *table_name); + bool vers_set_limit(ulonglong limit) { DBUG_ASSERT(part_type == VERSIONING_PARTITION); vers_info->limit= limit; - vers_info->auto_inc= auto_inc; return !limit; } void vers_set_hist_part(THD *thd); - void vers_add_hist_part(THD *thd); bool vers_fix_field_list(THD *thd); void vers_update_el_ids(); partition_element *get_partition(uint part_id) @@ -525,14 +500,4 @@ void partition_info::vers_update_el_ids() } } - -#define MAX_PART_NAME_SIZE 8 - -inline -bool make_partition_name(char *move_ptr, uint i) -{ - int res= snprintf(move_ptr, MAX_PART_NAME_SIZE + 1, "p%u", i); - return res < 0 || res > MAX_PART_NAME_SIZE; -} - #endif /* PARTITION_INFO_INCLUDED */ |