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
486682b1
Commit
486682b1
authored
May 22, 2018
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: vers tests, remove create_table procedure
parent
898a8c3c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
32 deletions
+48
-32
mysql-test/suite/versioning/key_type.combinations
mysql-test/suite/versioning/key_type.combinations
+0
-2
mysql-test/suite/versioning/key_type.inc
mysql-test/suite/versioning/key_type.inc
+0
-23
mysql-test/suite/versioning/r/replace.result
mysql-test/suite/versioning/r/replace.result
+23
-3
mysql-test/suite/versioning/t/replace.test
mysql-test/suite/versioning/t/replace.test
+25
-4
No files found.
mysql-test/suite/versioning/key_type.combinations
deleted
100644 → 0
View file @
898a8c3c
[unique]
[pk]
mysql-test/suite/versioning/key_type.inc
deleted
100644 → 0
View file @
898a8c3c
--
disable_query_log
if
(
$MTR_COMBINATION_UNIQUE
)
{
set
@
KEY_TYPE
=
'unique'
;
}
if
(
$MTR_COMBINATION_PK
)
{
set
@
KEY_TYPE
=
'primary key'
;
}
delimiter
~~
;
create
procedure
create_table
(
name
varchar
(
255
),
cols
varchar
(
255
))
begin
if
(
cols
is
null
or
cols
=
''
)
then
set
cols
=
''
;
else
set
cols
=
concat
(
', '
,
cols
);
end
if
;
set
@
str
=
concat
(
'create or replace table '
,
name
,
'(id int '
,
@
KEY_TYPE
,
cols
,
') with system versioning'
);
prepare
stmt
from
@
str
;
execute
stmt
;
drop
prepare
stmt
;
end
~~
delimiter
;
~~
--
enable_query_log
mysql-test/suite/versioning/r/replace.result
View file @
486682b1
call create_table('t', 'x int');
create table t (
id int primary key,
x int,
row_start SYS_DATATYPE as row start invisible,
row_end SYS_DATATYPE as row end invisible,
period for system_time (row_start, row_end)
) with system versioning;
insert t values (1, 2);
insert t values (1, 2);
replace t values (1, 3);
replace t values (1, 3);
select *, row_end>TIMESTAMP'2038-01-01 00:00:00' as current from t for system_time all
select *, row_end>TIMESTAMP'2038-01-01 00:00:00' as current from t for system_time all
...
@@ -6,5 +12,19 @@ order by x;
...
@@ -6,5 +12,19 @@ order by x;
id x current
id x current
1 2 0
1 2 0
1 3 1
1 3 1
drop database test;
drop table t;
create database test;
create table t (
id int unique,
x int,
row_start SYS_DATATYPE as row start invisible,
row_end SYS_DATATYPE as row end invisible,
period for system_time (row_start, row_end)
) with system versioning;
insert t values (1, 2);
replace t values (1, 3);
select *, row_end>TIMESTAMP'2038-01-01 00:00:00' as current from t for system_time all
order by x;
id x current
1 2 0
1 3 1
drop table t;
mysql-test/suite/versioning/t/replace.test
View file @
486682b1
--
source
suite
/
versioning
/
common
.
inc
--
source
suite
/
versioning
/
common
.
inc
--
source
suite
/
versioning
/
key_type
.
inc
--
source
suite
/
versioning
/
engines
.
inc
--
source
suite
/
versioning
/
engines
.
inc
call
create_table
(
't'
,
'x int'
);
--
replace_result
$sys_datatype_expl
SYS_DATATYPE
eval
create
table
t
(
id
int
primary
key
,
x
int
,
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
)
)
with
system
versioning
;
insert
t
values
(
1
,
2
);
insert
t
values
(
1
,
2
);
replace
t
values
(
1
,
3
);
replace
t
values
(
1
,
3
);
select
*
,
row_end
>
TIMESTAMP
'2038-01-01 00:00:00'
as
current
from
t
for
system_time
all
select
*
,
row_end
>
TIMESTAMP
'2038-01-01 00:00:00'
as
current
from
t
for
system_time
all
order
by
x
;
order
by
x
;
drop
table
t
;
drop
database
test
;
--
replace_result
$sys_datatype_expl
SYS_DATATYPE
create
database
test
;
eval
create
table
t
(
id
int
unique
,
x
int
,
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
)
)
with
system
versioning
;
insert
t
values
(
1
,
2
);
replace
t
values
(
1
,
3
);
select
*
,
row_end
>
TIMESTAMP
'2038-01-01 00:00:00'
as
current
from
t
for
system_time
all
order
by
x
;
drop
table
t
;
--
source
suite
/
versioning
/
common_finish
.
inc
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