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
84b4baef
Commit
84b4baef
authored
May 22, 2017
by
Eugene Kosov
Committed by
Aleksey Midenkov
May 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SQL: SHOW CREATE for GENERATED ALWAYS AS ROW
Test is main.mysqldump
parent
45f6acd2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
mysql-test/suite/versioning/r/ddl.result
mysql-test/suite/versioning/r/ddl.result
+1
-1
sql/sql_show.cc
sql/sql_show.cc
+9
-8
No files found.
mysql-test/suite/versioning/r/ddl.result
View file @
84b4baef
...
...
@@ -167,7 +167,7 @@ show create table mysql.vtmd_template;
Table Create Table
vtmd_template CREATE TABLE `vtmd_template` (
`start` bigint(20) unsigned GENERATED ALWAYS AS ROW START COMMENT 'TRX_ID of table lifetime start',
`end` bigint(20) unsigned
NOT NULL GENERATED ALWAYS AS ROW END
COMMENT 'TRX_ID of table lifetime end',
`end` bigint(20) unsigned
GENERATED ALWAYS AS ROW END NOT NULL
COMMENT 'TRX_ID of table lifetime end',
`name` varchar(64) COLLATE utf8_bin NOT NULL COMMENT 'Table name during period [start, end)',
`frm_image` blob NOT NULL COMMENT 'Table structure during period [start, end)',
`col_renames` blob DEFAULT NULL COMMENT 'Column name mapping from previous lifetime',
...
...
sql/sql_show.cc
View file @
84b4baef
...
...
@@ -2112,6 +2112,15 @@ int show_create_table(THD *thd, TABLE_LIST *table_list, String *packet,
}
else
{
if
(
field
->
flags
&
VERS_SYS_START_FLAG
)
{
packet
->
append
(
STRING_WITH_LEN
(
" GENERATED ALWAYS AS ROW START"
));
}
else
if
(
field
->
flags
&
VERS_SYS_END_FLAG
)
{
packet
->
append
(
STRING_WITH_LEN
(
" GENERATED ALWAYS AS ROW END"
));
}
if
(
flags
&
NOT_NULL_FLAG
)
packet
->
append
(
STRING_WITH_LEN
(
" NOT NULL"
));
else
if
(
field
->
type
()
==
MYSQL_TYPE_TIMESTAMP
&&
!
field
->
vers_sys_field
())
...
...
@@ -2129,14 +2138,6 @@ int show_create_table(THD *thd, TABLE_LIST *table_list, String *packet,
packet
->
append
(
STRING_WITH_LEN
(
" DEFAULT "
));
packet
->
append
(
def_value
.
ptr
(),
def_value
.
length
(),
system_charset_info
);
}
else
if
(
field
->
flags
&
VERS_SYS_START_FLAG
)
{
packet
->
append
(
STRING_WITH_LEN
(
" GENERATED ALWAYS AS ROW START"
));
}
else
if
(
field
->
flags
&
VERS_SYS_END_FLAG
)
{
packet
->
append
(
STRING_WITH_LEN
(
" GENERATED ALWAYS AS ROW END"
));
}
if
(
field
->
flags
&
VERS_OPTIMIZED_UPDATE_FLAG
)
{
...
...
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