summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2019-11-07 19:21:42 +0300
committerAleksey Midenkov <midenok@gmail.com>2019-11-07 19:24:06 +0300
commit1e73d7d6c658e881ec50d3b968647b2b45605a19 (patch)
tree2d5e7ca68ea2a3dc31fc8e1b79117fec17af0034 /sql/sql_lex.cc
parent77e8a311e1f919f15845c75d08de4340965c0bc4 (diff)
downloadmariadb-git-1e73d7d6c658e881ec50d3b968647b2b45605a19.tar.gz
MDEV-17553 Enable setting start datetime for interval partitioned history of system versioned tables
* Explicit STARTS syntax * SHOW CREATE * Default STARTS rounding depending on INTERVAL type * Warn when STARTS timestamp is later than query time * Fix uninitialized Lex->create_last_non_select_table under mysql_unpack_partition() Default STARTS rounding depending on INTERVAL type If STARTS clause is omitted, default one is assigned with value derived from query timestamp. The rounding is done on STARTS value depending on INTERVAL type: SECOND: no rounding is done; MINUTE: timestamp seconds is set to 0; HOUR: timestamp seconds and minutes are set to 0; DAY, WEEK, MONTH and YEAR: timestamp seconds, minutes and hours are set to 0 (the date of rotation is kept as current date).
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index e5e6b1f3afd..257a36e94c5 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -206,6 +206,7 @@ init_lex_with_single_table(THD *thd, TABLE *table, LEX *lex)
table->map= 1; //To ensure correct calculation of const item
table_list->table= table;
table_list->cacheable_table= false;
+ lex->create_last_non_select_table= table_list;
return FALSE;
}