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
7320c683
Commit
7320c683
authored
Nov 24, 2017
by
Aleksey Midenkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Parser: disable SV for tmp tables [closes #344]
parent
86e57eaa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
9 deletions
+19
-9
mysql-test/suite/versioning/r/create.result
mysql-test/suite/versioning/r/create.result
+2
-2
mysql-test/suite/versioning/t/create.test
mysql-test/suite/versioning/t/create.test
+3
-5
sql/sql_yacc.yy
sql/sql_yacc.yy
+14
-2
No files found.
mysql-test/suite/versioning/r/create.result
View file @
7320c683
...
...
@@ -271,8 +271,6 @@ A8 int without system versioning
) with system versioning;
ERROR HY000: Wrong parameters for `t1`: no columns defined 'WITH SYSTEM VERSIONING'
create or replace table t1 (a int) with system versioning;
create temporary table tmp with system versioning select * from t1;
create or replace table t1 (a int) with system versioning;
create table tt1 like t1;
show create table tt1;
Table Create Table
...
...
@@ -368,5 +366,7 @@ ERROR 42S21: Duplicate column name 'sys_trx_start'
create or replace table t (sys_trx_end int);
alter table t with system versioning;
ERROR 42S21: Duplicate column name 'sys_trx_end'
create or replace temporary table t (x int) with system versioning;
ERROR HY000: Incorrect usage of TEMPORARY and WITH SYSTEM VERSIONING
drop database test;
create database test;
mysql-test/suite/versioning/t/create.test
View file @
7320c683
...
...
@@ -192,11 +192,6 @@ create or replace table t1 (
A8
int
without
system
versioning
)
with
system
versioning
;
# table with/without system versioning
create
or
replace
table
t1
(
a
int
)
with
system
versioning
;
create
temporary
table
tmp
with
system
versioning
select
*
from
t1
;
# CREATE TABLE ... LIKE
create
or
replace
table
t1
(
a
int
)
with
system
versioning
;
create
table
tt1
like
t1
;
...
...
@@ -286,5 +281,8 @@ create or replace table t (sys_trx_end int);
--
error
ER_DUP_FIELDNAME
alter
table
t
with
system
versioning
;
--
error
ER_WRONG_USAGE
create
or
replace
temporary
table
t
(
x
int
)
with
system
versioning
;
drop
database
test
;
create
database
test
;
sql/sql_yacc.yy
View file @
7320c683
...
...
@@ -6045,8 +6045,20 @@ opt_versioning_option:
versioning_option:
WITH_SYSTEM_SYM VERSIONING_SYM
{
Lex->vers_get_info().with_system_versioning= true;
Lex->create_info.options|= HA_VERSIONED_TABLE;
if (Lex->create_info.options & HA_LEX_CREATE_TMP_TABLE)
{
if (!thd->variables.vers_force)
{
my_error(ER_WRONG_USAGE, MYF(0),
"TEMPORARY", "WITH SYSTEM VERSIONING");
MYSQL_YYABORT;
}
}
else
{
Lex->vers_get_info().with_system_versioning= true;
Lex->create_info.options|= HA_VERSIONED_TABLE;
}
}
;
...
...
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