diff options
author | Nikita Malyavin <nikitamalyavin@gmail.com> | 2019-02-07 23:16:30 +1000 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2019-02-21 14:48:04 +0100 |
commit | 073c93b194d9035482a531eeff5da129f792ad70 (patch) | |
tree | d325081ffcd2b886248bcfbce25848eff2d8322a /sql/sql_table.cc | |
parent | b63604612e69f2d5b897da828eac182351c09f54 (diff) | |
download | mariadb-git-073c93b194d9035482a531eeff5da129f792ad70.tar.gz |
MDEV-17082 Application-time periods: CREATE
* add syntax `CREATE TABLE ... PERIOD FOR <apptime>`
* add table period entity
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index a3f1f616edd..13674392bb0 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -2998,7 +2998,8 @@ CHARSET_INFO* get_sql_field_charset(Column_definition *sql_field, by adding the features DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP. If the first TIMESTAMP column appears to be nullable, or to have an - explicit default, or to be a virtual column, then no promition is done. + explicit default, or to be a virtual column, or to be part of table period, + then no promotion is done. @param column_definitions The list of column definitions, in the physical order in which they appear in the table. @@ -3019,6 +3020,7 @@ void promote_first_timestamp_column(List<Create_field> *column_definitions) column_definition->default_value == NULL && // no constant default, column_definition->unireg_check == Field::NONE && // no function default column_definition->vcol_info == NULL && + column_definition->period == NULL && !(column_definition->flags & VERS_SYSTEM_FIELD)) // column isn't generated { DBUG_PRINT("info", ("First TIMESTAMP column '%s' was promoted to " |