Commit 204b54d2 authored by kevg's avatar kevg Committed by Aleksey Midenkov

SQL: create versioned tmp table from query [fixes #144]

parent b8bfc06b
......@@ -223,4 +223,6 @@ create or replace table t1 (
A int
) without system versioning without system versioning;
ERROR HY000: Wrong parameters for `t1`: Versioning specified more than once for the same table
create or replace table t1 (a int) with system versioning;
create temporary table tmp with system versioning select * from t1;
drop table t1;
......@@ -204,4 +204,7 @@ create or replace table t1 (
A int
) without system versioning without system versioning;
create or replace table t1 (a int) with system versioning;
create temporary table tmp with system versioning select * from t1;
drop table t1;
......@@ -6724,7 +6724,8 @@ bool Vers_parse_info::check_and_fix_implicit(
generated_as_row.start || generated_as_row.end ||
period_for_system_time.start || period_for_system_time.end;
if (with == 0 && (not_set == 0 || !table_with_system_versioning))
if (!thd->lex->tmp_table() && with == 0 &&
(not_set == 0 || !table_with_system_versioning))
{
my_error(ER_VERS_WRONG_PARAMS, MYF(0), table_name,
"versioned fields missing");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment