1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-05 12:42:17 +03:00

SQL: derived SYSTEM_TIME clash detection [closes #371]

This commit is contained in:
Aleksey Midenkov
2017-12-06 06:14:22 +03:00
parent d04063c5b9
commit 84b718ae70
9 changed files with 145 additions and 75 deletions

View File

@ -773,7 +773,15 @@ int vers_setup_select(THD *thd, TABLE_LIST *tables, COND **where_expr,
{
for (table= outer_slex->table_list.first; table; table= table->next_local)
{
if (!table->vers_conditions)
if (table->vers_conditions)
{
if (!slex->is_linkage_set() && !table->vers_conditions.from_inner)
{
my_error(ER_VERS_SYSTEM_TIME_CLASH, MYF(0), table->alias);
DBUG_RETURN(-1);
}
}
else
{
table->vers_conditions= slex->vers_export_outer;
table->vers_conditions.from_inner= true;