mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Tests: vtmd, optimized, partition
This commit is contained in:
@ -17,61 +17,61 @@ a b b+0
|
|||||||
1 NULL NULL
|
1 NULL NULL
|
||||||
3 NULL NULL
|
3 NULL NULL
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 4102 Attempt to read unversioned field `b` in historical query
|
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||||
Warning 4102 Attempt to read unversioned field `b` in historical query
|
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||||
select * from t for system_time as of timestamp now(6);
|
select * from t for system_time as of timestamp now(6);
|
||||||
a b
|
a b
|
||||||
1 NULL
|
1 NULL
|
||||||
3 NULL
|
3 NULL
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 4102 Attempt to read unversioned field `b` in historical query
|
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||||
select count(*) from t group by b system_time as of timestamp now(6);
|
select count(*) from t group by b system_time as of timestamp now(6);
|
||||||
count(*)
|
count(*)
|
||||||
2
|
2
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 4102 Attempt to read unversioned field `b` in historical query
|
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||||
select * from t for system_time as of timestamp now(6) order by b asc;
|
select * from t for system_time as of timestamp now(6) order by b asc;
|
||||||
a b
|
a b
|
||||||
1 NULL
|
1 NULL
|
||||||
3 NULL
|
3 NULL
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 4102 Attempt to read unversioned field `b` in historical query
|
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||||
Warning 4102 Attempt to read unversioned field `b` in historical query
|
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||||
select * from t for system_time as of timestamp now(6) order by b desc;
|
select * from t for system_time as of timestamp now(6) order by b desc;
|
||||||
a b
|
a b
|
||||||
1 NULL
|
1 NULL
|
||||||
3 NULL
|
3 NULL
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 4102 Attempt to read unversioned field `b` in historical query
|
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||||
Warning 4102 Attempt to read unversioned field `b` in historical query
|
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||||
select * from t group by a having a=2 system_time as of timestamp now(6);
|
select * from t group by a having a=2 system_time as of timestamp now(6);
|
||||||
a b
|
a b
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 4102 Attempt to read unversioned field `b` in historical query
|
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||||
select * from t group by b having b=2 system_time as of timestamp now(6);
|
select * from t group by b having b=2 system_time as of timestamp now(6);
|
||||||
a b
|
a b
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 4102 Attempt to read unversioned field `b` in historical query
|
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||||
Warning 4102 Attempt to read unversioned field `b` in historical query
|
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||||
select a from t where b=2 system_time as of timestamp now(6);
|
select a from t where b=2 system_time as of timestamp now(6);
|
||||||
a
|
a
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 4102 Attempt to read unversioned field `b` in historical query
|
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||||
select a from t where b=NULL system_time as of timestamp now(6);
|
select a from t where b=NULL system_time as of timestamp now(6);
|
||||||
a
|
a
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 4102 Attempt to read unversioned field `b` in historical query
|
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||||
select a from t where b is NULL system_time as of timestamp now(6);
|
select a from t where b is NULL system_time as of timestamp now(6);
|
||||||
a
|
a
|
||||||
1
|
1
|
||||||
3
|
3
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 4102 Attempt to read unversioned field `b` in historical query
|
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||||
select count(*), b from t group by b having b=NULL system_time as of timestamp now(6);
|
select count(*), b from t group by b having b=NULL system_time as of timestamp now(6);
|
||||||
count(*) b
|
count(*) b
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 4102 Attempt to read unversioned field `b` in historical query
|
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||||
Warning 4102 Attempt to read unversioned field `b` in historical query
|
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||||
select a, b from t;
|
select a, b from t;
|
||||||
a b
|
a b
|
||||||
1 2
|
1 2
|
||||||
@ -80,31 +80,31 @@ select count(*) from t for system_time as of timestamp now(6) group by b;
|
|||||||
count(*)
|
count(*)
|
||||||
2
|
2
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 4102 Attempt to read unversioned field `b` in historical query
|
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||||
select * from t for system_time as of timestamp now(6) group by b having b=2;
|
select * from t for system_time as of timestamp now(6) group by b having b=2;
|
||||||
a b
|
a b
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 4102 Attempt to read unversioned field `b` in historical query
|
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||||
Warning 4102 Attempt to read unversioned field `b` in historical query
|
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||||
select a from t for system_time as of timestamp now(6) where b=2;
|
select a from t for system_time as of timestamp now(6) where b=2;
|
||||||
a
|
a
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 4102 Attempt to read unversioned field `b` in historical query
|
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||||
select a from t for system_time as of timestamp now(6) where b=NULL;
|
select a from t for system_time as of timestamp now(6) where b=NULL;
|
||||||
a
|
a
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 4102 Attempt to read unversioned field `b` in historical query
|
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||||
select a from t for system_time as of timestamp now(6) where b is NULL;
|
select a from t for system_time as of timestamp now(6) where b is NULL;
|
||||||
a
|
a
|
||||||
1
|
1
|
||||||
3
|
3
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 4102 Attempt to read unversioned field `b` in historical query
|
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||||
select count(*), b from t for system_time as of timestamp now(6) group by b having b=NULL;
|
select count(*), b from t for system_time as of timestamp now(6) group by b having b=NULL;
|
||||||
count(*) b
|
count(*) b
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 4102 Attempt to read unversioned field `b` in historical query
|
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||||
Warning 4102 Attempt to read unversioned field `b` in historical query
|
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||||
create or replace table t (
|
create or replace table t (
|
||||||
a int,
|
a int,
|
||||||
b int not null without system versioning
|
b int not null without system versioning
|
||||||
@ -115,12 +115,12 @@ a b
|
|||||||
1 NULL
|
1 NULL
|
||||||
3 NULL
|
3 NULL
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 4102 Attempt to read unversioned field `b` in historical query
|
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||||
select * from t for system_time as of timestamp now(6) where b is NULL;
|
select * from t for system_time as of timestamp now(6) where b is NULL;
|
||||||
a b
|
a b
|
||||||
1 NULL
|
1 NULL
|
||||||
3 NULL
|
3 NULL
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 4102 Attempt to read unversioned field `b` in historical query
|
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||||
Warning 4102 Attempt to read unversioned field `b` in historical query
|
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||||
drop table t;
|
drop table t;
|
||||||
|
@ -147,7 +147,7 @@ ERROR HY000: Wrong partitions consistency for `t1`: must have at least one 'VERS
|
|||||||
alter table t1 add partition (
|
alter table t1 add partition (
|
||||||
partition p1 versioning);
|
partition p1 versioning);
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 4105 Maybe missing parameters: no rotation condition for multiple `VERSIONING` partitions.
|
Warning 4112 Maybe missing parameters: no rotation condition for multiple `VERSIONING` partitions.
|
||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
@ -290,7 +290,7 @@ x
|
|||||||
2
|
2
|
||||||
delete from t1;
|
delete from t1;
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 4106 Switching from partition `p0` to `p1`
|
Note 4113 Switching from partition `p0` to `p1`
|
||||||
select * from t1 partition (p0) for system_time all;
|
select * from t1 partition (p0) for system_time all;
|
||||||
x
|
x
|
||||||
1
|
1
|
||||||
@ -300,7 +300,7 @@ x
|
|||||||
insert into t1 values (3);
|
insert into t1 values (3);
|
||||||
delete from t1;
|
delete from t1;
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 4104 Using full partition `p1`, need more VERSIONING partitions!
|
Warning 4111 Using full partition `p1`, need more VERSIONING partitions!
|
||||||
select * from t1 partition (p1) for system_time all;
|
select * from t1 partition (p1) for system_time all;
|
||||||
x
|
x
|
||||||
2
|
2
|
||||||
@ -333,7 +333,7 @@ x
|
|||||||
insert into t1 values (4);
|
insert into t1 values (4);
|
||||||
delete from t1;
|
delete from t1;
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 4106 Switching from partition `p0` to `p1`
|
Note 4113 Switching from partition `p0` to `p1`
|
||||||
select * from t1 partition (p1) for system_time all;
|
select * from t1 partition (p1) for system_time all;
|
||||||
x
|
x
|
||||||
4
|
4
|
||||||
@ -355,8 +355,8 @@ x
|
|||||||
2
|
2
|
||||||
delete from t1;
|
delete from t1;
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 4106 Switching from partition `p0` to `p1`
|
Note 4113 Switching from partition `p0` to `p1`
|
||||||
Warning 4104 Using full partition `p1`, need more VERSIONING partitions!
|
Warning 4111 Using full partition `p1`, need more VERSIONING partitions!
|
||||||
select * from t1 partition (p0sp0) for system_time all;
|
select * from t1 partition (p0sp0) for system_time all;
|
||||||
x
|
x
|
||||||
1
|
1
|
||||||
|
@ -48,7 +48,8 @@ create or replace procedure show_tables()
|
|||||||
begin
|
begin
|
||||||
show tables;
|
show tables;
|
||||||
select table_name, table_schema from information_schema.tables
|
select table_name, table_schema from information_schema.tables
|
||||||
where table_schema not in ('mysql', 'performance_schema', 'information_schema', 'mtr');
|
where table_schema not in ('mysql', 'performance_schema', 'information_schema', 'mtr')
|
||||||
|
order by table_name;
|
||||||
end~~
|
end~~
|
||||||
set versioning_alter_history= keep;
|
set versioning_alter_history= keep;
|
||||||
create table t0 (z int) with system versioning;
|
create table t0 (z int) with system versioning;
|
||||||
@ -150,7 +151,7 @@ x0_vtmd
|
|||||||
drop table x0_vtmd;
|
drop table x0_vtmd;
|
||||||
rename table x0 to d0;
|
rename table x0 to d0;
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 4115 `test.d0_vtmd` table already exists!
|
Warning 4122 `test.d0_vtmd` table already exists!
|
||||||
show tables;
|
show tables;
|
||||||
Tables_in_test
|
Tables_in_test
|
||||||
d0
|
d0
|
||||||
@ -331,11 +332,11 @@ t3_TIMESTAMP_SUFFIX
|
|||||||
t3_TIMESTAMP_SUFFIX
|
t3_TIMESTAMP_SUFFIX
|
||||||
t3_vtmd
|
t3_vtmd
|
||||||
table_name table_schema
|
table_name table_schema
|
||||||
|
t0_TIMESTAMP_SUFFIX test
|
||||||
|
t0_TIMESTAMP_SUFFIX test
|
||||||
|
t0_TIMESTAMP_SUFFIX test
|
||||||
|
t0_TIMESTAMP_SUFFIX test
|
||||||
t1_TIMESTAMP_SUFFIX db1
|
t1_TIMESTAMP_SUFFIX db1
|
||||||
t0_TIMESTAMP_SUFFIX test
|
|
||||||
t0_TIMESTAMP_SUFFIX test
|
|
||||||
t0_TIMESTAMP_SUFFIX test
|
|
||||||
t0_TIMESTAMP_SUFFIX test
|
|
||||||
t2 test
|
t2 test
|
||||||
t2_vtmd test
|
t2_vtmd test
|
||||||
t3 test
|
t3 test
|
||||||
@ -353,7 +354,7 @@ t3_vtmd
|
|||||||
u0_vtmd
|
u0_vtmd
|
||||||
u0_vtmd_vtmd
|
u0_vtmd_vtmd
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 4115 Table `test.u0_vtmd` is not a VTMD table
|
Warning 4122 Table `test.u0_vtmd` is not a VTMD table
|
||||||
set versioning_alter_history= survive;
|
set versioning_alter_history= survive;
|
||||||
create or replace table t (x int) with system versioning;
|
create or replace table t (x int) with system versioning;
|
||||||
select * from t for system_time all;
|
select * from t for system_time all;
|
||||||
|
@ -61,7 +61,8 @@ create or replace procedure show_tables()
|
|||||||
begin
|
begin
|
||||||
show tables;
|
show tables;
|
||||||
select table_name, table_schema from information_schema.tables
|
select table_name, table_schema from information_schema.tables
|
||||||
where table_schema not in ('mysql', 'performance_schema', 'information_schema', 'mtr');
|
where table_schema not in ('mysql', 'performance_schema', 'information_schema', 'mtr')
|
||||||
|
order by table_name;
|
||||||
end~~
|
end~~
|
||||||
delimiter ;~~
|
delimiter ;~~
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user