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
c0745e37
Commit
c0745e37
authored
Feb 13, 2019
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix: CREATE...SELECT lost COMMENT and VERSIONING
parent
1d8b5524
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
0 deletions
+38
-0
mysql-test/main/create_select_tmp.result
mysql-test/main/create_select_tmp.result
+21
-0
mysql-test/main/create_select_tmp.test
mysql-test/main/create_select_tmp.test
+14
-0
sql/field.cc
sql/field.cc
+3
-0
No files found.
mysql-test/main/create_select_tmp.result
View file @
c0745e37
...
...
@@ -18,3 +18,24 @@ ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
select * from t2;
ERROR 42S02: Table 'test.t2' doesn't exist
drop table t1;
set sql_mode='ignore_bad_table_options';
create table t1 (
f1 int invisible,
f2 int comment 'a comment',
f3 int foo="bar",
f4 int check(f4 < 10),
f5 int without system versioning
) with system versioning as select 1 as f1,2 as f2,3 as f3,4 as f4,5 as f5;
Warnings:
Warning 1911 Unknown option 'foo'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f1` int(11) INVISIBLE DEFAULT NULL,
`f2` int(11) DEFAULT NULL COMMENT 'a comment',
`f3` int(11) DEFAULT NULL `foo`='bar',
`f4` int(11) DEFAULT NULL CHECK (`f4` < 10),
`f5` int(11) DEFAULT NULL WITHOUT SYSTEM VERSIONING
) ENGINE=MyISAM DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
drop table t1;
set sql_mode=default;
mysql-test/main/create_select_tmp.test
View file @
c0745e37
...
...
@@ -37,3 +37,17 @@ select * from t2;
drop
table
t1
;
# End of 4.1 tests
set
sql_mode
=
'ignore_bad_table_options'
;
create
table
t1
(
f1
int
invisible
,
f2
int
comment
'a comment'
,
f3
int
foo
=
"bar"
,
f4
int
check
(
f4
<
10
),
f5
int
without
system
versioning
)
with
system
versioning
as
select
1
as
f1
,
2
as
f2
,
3
as
f3
,
4
as
f4
,
5
as
f5
;
show
create
table
t1
;
drop
table
t1
;
set
sql_mode
=
default
;
# End of 10.4 tests
sql/field.cc
View file @
c0745e37
...
...
@@ -10768,6 +10768,9 @@ Column_definition::redefine_stage1_common(const Column_definition *dup_field,
vcol_info
=
dup_field
->
vcol_info
;
invisible
=
dup_field
->
invisible
;
check_constraint
=
dup_field
->
check_constraint
;
comment
=
dup_field
->
comment
;
option_list
=
dup_field
->
option_list
;
versioning
=
dup_field
->
versioning
;
}
...
...
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