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:
@ -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");
|
||||
|
Reference in New Issue
Block a user