1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

SQL: allow FOR SYSTEM_TIME BEFORE for SELECT queries [closes #170]

This commit is contained in:
kevg
2017-04-05 21:37:31 +03:00
committed by Aleksey Midenkov
parent 4af3cb82e6
commit ecd18bc099
3 changed files with 12 additions and 13 deletions

View File

@ -786,14 +786,6 @@ int vers_setup_select(THD *thd, TABLE_LIST *tables, COND **where_expr,
table->vers_conditions.type == FOR_SYSTEM_TIME_UNSPECIFIED ?
slex->vers_conditions : table->vers_conditions;
if (vers_conditions.type == FOR_SYSTEM_TIME_BEFORE &&
thd->lex->sql_command != SQLCOM_TRUNCATE)
{
my_error(ER_VERS_WRONG_QUERY_TYPE, MYF(0), "FOR SYSTEM_TIME BEFORE",
"TRUNCATE");
DBUG_RETURN(-1);
}
if (vers_conditions.type == FOR_SYSTEM_TIME_UNSPECIFIED)
{
if (vers_conditions.init_from_sysvar(thd))