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
5fb08323
Commit
5fb08323
authored
Feb 16, 2018
by
Aleksey Midenkov
Committed by
Sergei Golubchik
Feb 24, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests: versioning.foreign check row_end after constraint execution
parent
052668f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
mysql-test/suite/versioning/r/foreign.result
mysql-test/suite/versioning/r/foreign.result
+6
-3
mysql-test/suite/versioning/t/foreign.test
mysql-test/suite/versioning/t/foreign.test
+7
-2
No files found.
mysql-test/suite/versioning/r/foreign.result
View file @
5fb08323
...
...
@@ -121,6 +121,9 @@ engine innodb;
create or replace table child (
id int primary key,
parent_id int not null,
row_start SYS_DATATYPE as row start invisible,
row_end SYS_DATATYPE as row end invisible,
period for system_time(row_start, row_end),
constraint `parent-fk`
foreign key (parent_id) references parent (id)
on delete cascade
...
...
@@ -135,9 +138,9 @@ delete from child;
delete from parent;
select * from child;
id parent_id
select * from child for system_time all;
id parent_id
3 3
select *
, row_start < row_end, row_end < MAXVAL
from child for system_time all;
id parent_id
row_start < row_end row_end < MAXVAL
3 3
1 1
drop table child;
drop table parent;
#################
...
...
mysql-test/suite/versioning/t/foreign.test
View file @
5fb08323
...
...
@@ -137,9 +137,13 @@ create or replace table parent (
)
engine
innodb
;
create
or
replace
table
child
(
--
replace_result
$sys_datatype_expl
SYS_DATATYPE
eval
create
or
replace
table
child
(
id
int
primary
key
,
parent_id
int
not
null
,
row_start
$sys_datatype_expl
as
row
start
invisible
,
row_end
$sys_datatype_expl
as
row
end
invisible
,
period
for
system_time
(
row_start
,
row_end
),
constraint
`parent-fk`
foreign
key
(
parent_id
)
references
parent
(
id
)
on
delete
cascade
...
...
@@ -154,7 +158,8 @@ delete from child;
--
echo
## FIXME END
delete
from
parent
;
select
*
from
child
;
select
*
from
child
for
system_time
all
;
--
replace_result
$sys_datatype_max
MAXVAL
eval
select
*
,
row_start
<
row_end
,
row_end
<
$sys_datatype_max
from
child
for
system_time
all
;
drop
table
child
;
drop
table
parent
;
...
...
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