1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

System Versioning 1.0 pre6

Merge remote-tracking branch 'mariadb/bb-10.3-temporal-serg' into trunk
This commit is contained in:
Aleksey Midenkov
2017-12-15 18:12:18 +03:00
47 changed files with 528 additions and 541 deletions

View File

@ -827,6 +827,27 @@ int SELECT_LEX::vers_setup_conds(THD *thd, TABLE_LIST *tables, COND **where_expr
vers_select_conds_t &vers_conditions= table->vers_conditions;
#ifdef WITH_PARTITION_STORAGE_ENGINE
/*
if the history is stored in partitions, then partitions
themselves are not versioned
*/
if (table->partition_names && table->table->part_info->vers_info)
{
if (vers_conditions)
{
#define PART_VERS_ERR_MSG "%s PARTITION (%s)"
char buf[NAME_LEN*2 + sizeof(PART_VERS_ERR_MSG)];
my_snprintf(buf, sizeof(buf), PART_VERS_ERR_MSG, table->alias,
table->partition_names->head()->c_ptr());
my_error(ER_VERSIONING_REQUIRED, MYF(0), buf);
DBUG_RETURN(-1);
}
else
vers_conditions.init(FOR_SYSTEM_TIME_ALL);
}
#endif
if (outer_table && table != outer_table) // inner table may be outer in recursive CTE
{
if (vers_conditions)