1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

SQL: missed FOR SYSTEM_TIME ALL for FOR_SYSTEM_TIME_UNSPECIFIED

[fixes #105]
This commit is contained in:
Aleksey Midenkov
2016-12-22 07:34:33 +00:00
parent 27d9e762a9
commit ea60760e47
4 changed files with 16 additions and 2 deletions

View File

@@ -721,6 +721,7 @@ vers_setup_select(THD *thd, TABLE_LIST *tables, COND **where_expr, SELECT_LEX *s
if (query_type == FOR_SYSTEM_TIME_ALL)
{
slex->vers_conditions.unwrapped= true;
DBUG_RETURN(0);
}
}
@@ -928,6 +929,8 @@ vers_setup_select(THD *thd, TABLE_LIST *tables, COND **where_expr, SELECT_LEX *s
thd->restore_active_arena(arena, &backup);
}
slex->vers_conditions.unwrapped= true;
DBUG_RETURN(0);
#undef newx
}
@@ -25548,9 +25551,9 @@ void st_select_lex::print(THD *thd, String *str, enum_query_type query_type)
str->append(having_value != Item::COND_FALSE ? "1" : "0");
}
if (vers_conditions.type != FOR_SYSTEM_TIME_UNSPECIFIED)
if (vers_conditions.unwrapped)
{
// versioning conditions must be already unwrapped to WHERE clause
// versioning conditions are already unwrapped to WHERE clause
str->append(STRING_WITH_LEN(" for system_time all "));
}