1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

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

This commit is contained in:
kevg
2017-03-04 23:05:45 +03:00
committed by Aleksey Midenkov
parent b8bfc06b26
commit 204b54d2d9
3 changed files with 7 additions and 1 deletions

View File

@ -223,4 +223,6 @@ create or replace table t1 (
A int A int
) without system versioning without system versioning; ) without system versioning without system versioning;
ERROR HY000: Wrong parameters for `t1`: Versioning specified more than once for the same table 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; drop table t1;

View File

@ -204,4 +204,7 @@ create or replace table t1 (
A int A int
) without system versioning without system versioning; ) 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; drop table t1;

View File

@ -6724,7 +6724,8 @@ bool Vers_parse_info::check_and_fix_implicit(
generated_as_row.start || generated_as_row.end || generated_as_row.start || generated_as_row.end ||
period_for_system_time.start || period_for_system_time.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, my_error(ER_VERS_WRONG_PARAMS, MYF(0), table_name,
"versioned fields missing"); "versioned fields missing");