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
6473641b
Commit
6473641b
authored
Feb 21, 2019
by
Eugene Kosov
Committed by
Alexander Barkov
May 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-18512 using DATETIME(6) as row_start/row_end crashes server
Disallow DATETIME for SYSTEM VERSIONING tables.
parent
b7746050
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
3 deletions
+17
-3
mysql-test/suite/versioning/r/create.result
mysql-test/suite/versioning/r/create.result
+7
-0
mysql-test/suite/versioning/t/create.test
mysql-test/suite/versioning/t/create.test
+9
-0
sql/handler.cc
sql/handler.cc
+1
-2
sql/table.cc
sql/table.cc
+0
-1
No files found.
mysql-test/suite/versioning/r/create.result
View file @
6473641b
...
...
@@ -508,5 +508,12 @@ row_end bigint as row end,
period for system_time (row_start, row_end)
) engine=myisam with system versioning;
ERROR HY000: `row_start` must be of type TIMESTAMP(6) for system-versioned table `t1`
create table t (
a int,
row_start datetime(6) generated always as row start,
row_end datetime(6) generated always as row end,
period for system_time(row_start, row_end)
) with system versioning;
ERROR HY000: `row_start` must be of type TIMESTAMP(6) for system-versioned table `t`
drop database test;
create database test;
mysql-test/suite/versioning/t/create.test
View file @
6473641b
...
...
@@ -387,5 +387,14 @@ create or replace table t1 (
period
for
system_time
(
row_start
,
row_end
)
)
engine
=
myisam
with
system
versioning
;
--
error
ER_VERS_FIELD_WRONG_TYPE
create
table
t
(
a
int
,
row_start
datetime
(
6
)
generated
always
as
row
start
,
row_end
datetime
(
6
)
generated
always
as
row
end
,
period
for
system_time
(
row_start
,
row_end
)
)
with
system
versioning
;
drop
database
test
;
create
database
test
;
sql/handler.cc
View file @
6473641b
...
...
@@ -7433,8 +7433,7 @@ bool Vers_parse_info::check_conditions(const Lex_table_name &table_name,
static
bool
is_versioning_timestamp
(
const
Create_field
*
f
)
{
return
(
f
->
type_handler
()
==
&
type_handler_datetime2
||
f
->
type_handler
()
==
&
type_handler_timestamp2
)
&&
return
f
->
type_handler
()
==
&
type_handler_timestamp2
&&
f
->
length
==
MAX_DATETIME_FULL_WIDTH
;
}
...
...
sql/table.cc
View file @
6473641b
...
...
@@ -2025,7 +2025,6 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
switch
(
field_type
)
{
case
MYSQL_TYPE_TIMESTAMP2
:
case
MYSQL_TYPE_DATETIME2
:
break
;
case
MYSQL_TYPE_LONGLONG
:
if
(
vers_can_native
)
...
...
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