Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
204b54d2
Commit
204b54d2
authored
Mar 04, 2017
by
kevg
Committed by
Aleksey Midenkov
May 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SQL: create versioned tmp table from query [fixes #144]
parent
b8bfc06b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
1 deletion
+7
-1
mysql-test/suite/versioning/r/create.result
mysql-test/suite/versioning/r/create.result
+2
-0
mysql-test/suite/versioning/t/create.test
mysql-test/suite/versioning/t/create.test
+3
-0
sql/handler.cc
sql/handler.cc
+2
-1
No files found.
mysql-test/suite/versioning/r/create.result
View file @
204b54d2
...
@@ -223,4 +223,6 @@ create or replace table t1 (
...
@@ -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;
mysql-test/suite/versioning/t/create.test
View file @
204b54d2
...
@@ -204,4 +204,7 @@ create or replace table t1 (
...
@@ -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
;
sql/handler.cc
View file @
204b54d2
...
@@ -6724,7 +6724,8 @@ bool Vers_parse_info::check_and_fix_implicit(
...
@@ -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"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment