mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-16975 Application-time periods: ALTER TABLE
* implicit period constraint is hidden and cannot be dropped independently * create...like and create...select support
This commit is contained in:
committed by
Sergei Golubchik
parent
b2bd52290a
commit
6294516a56
@ -1968,11 +1968,15 @@ enum vers_sys_type_t
|
||||
VERS_TRX_ID
|
||||
};
|
||||
|
||||
struct Table_period_info
|
||||
struct Table_period_info: Sql_alloc
|
||||
{
|
||||
Table_period_info() {}
|
||||
Table_period_info() :
|
||||
create_if_not_exists(false),
|
||||
constr(NULL) {}
|
||||
Table_period_info(const char *name_arg, size_t size) :
|
||||
name(name_arg, size) {}
|
||||
name(name_arg, size),
|
||||
create_if_not_exists(false),
|
||||
constr(NULL) {}
|
||||
|
||||
Lex_ident name;
|
||||
|
||||
@ -1986,6 +1990,8 @@ struct Table_period_info
|
||||
Lex_ident end;
|
||||
};
|
||||
start_end_t period;
|
||||
bool create_if_not_exists;
|
||||
Virtual_column_info *constr;
|
||||
|
||||
bool is_set() const
|
||||
{
|
||||
@ -1998,6 +2004,7 @@ struct Table_period_info
|
||||
period.start= start;
|
||||
period.end= end;
|
||||
}
|
||||
bool check_field(const Create_field* f, const Lex_ident& f_name) const;
|
||||
};
|
||||
|
||||
struct Vers_parse_info: public Table_period_info
|
||||
@ -2168,7 +2175,9 @@ struct Table_scope_and_contents_source_st:
|
||||
bool fix_create_fields(THD *thd, Alter_info *alter_info,
|
||||
const TABLE_LIST &create_table,
|
||||
bool create_select= false);
|
||||
bool fix_period_fields(THD *thd, Alter_info *alter_info);
|
||||
bool check_fields(THD *thd, Alter_info *alter_info, TABLE_LIST &create_table);
|
||||
bool check_period_fields(THD *thd, Alter_info *alter_info);
|
||||
|
||||
bool vers_fix_system_fields(THD *thd, Alter_info *alter_info,
|
||||
const TABLE_LIST &create_table,
|
||||
|
Reference in New Issue
Block a user