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
|
||||
3 NULL NULL
|
||||
Warnings:
|
||||
Warning 4102 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
|
||||
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||
select * from t for system_time as of timestamp now(6);
|
||||
a b
|
||||
1 NULL
|
||||
3 NULL
|
||||
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);
|
||||
count(*)
|
||||
2
|
||||
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;
|
||||
a b
|
||||
1 NULL
|
||||
3 NULL
|
||||
Warnings:
|
||||
Warning 4102 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
|
||||
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;
|
||||
a b
|
||||
1 NULL
|
||||
3 NULL
|
||||
Warnings:
|
||||
Warning 4102 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
|
||||
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);
|
||||
a b
|
||||
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);
|
||||
a b
|
||||
Warnings:
|
||||
Warning 4102 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
|
||||
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);
|
||||
a
|
||||
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);
|
||||
a
|
||||
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);
|
||||
a
|
||||
1
|
||||
3
|
||||
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);
|
||||
count(*) b
|
||||
Warnings:
|
||||
Warning 4102 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
|
||||
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||
select a, b from t;
|
||||
a b
|
||||
1 2
|
||||
@ -80,31 +80,31 @@ select count(*) from t for system_time as of timestamp now(6) group by b;
|
||||
count(*)
|
||||
2
|
||||
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;
|
||||
a b
|
||||
Warnings:
|
||||
Warning 4102 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
|
||||
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;
|
||||
a
|
||||
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;
|
||||
a
|
||||
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;
|
||||
a
|
||||
1
|
||||
3
|
||||
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;
|
||||
count(*) b
|
||||
Warnings:
|
||||
Warning 4102 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
|
||||
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||
create or replace table t (
|
||||
a int,
|
||||
b int not null without system versioning
|
||||
@ -115,12 +115,12 @@ a b
|
||||
1 NULL
|
||||
3 NULL
|
||||
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;
|
||||
a b
|
||||
1 NULL
|
||||
3 NULL
|
||||
Warnings:
|
||||
Warning 4102 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
|
||||
Warning 4109 Attempt to read unversioned field `b` in historical query
|
||||
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 (
|
||||
partition p1 versioning);
|
||||
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;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
@ -290,7 +290,7 @@ x
|
||||
2
|
||||
delete from t1;
|
||||
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;
|
||||
x
|
||||
1
|
||||
@ -300,7 +300,7 @@ x
|
||||
insert into t1 values (3);
|
||||
delete from t1;
|
||||
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;
|
||||
x
|
||||
2
|
||||
@ -333,7 +333,7 @@ x
|
||||
insert into t1 values (4);
|
||||
delete from t1;
|
||||
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;
|
||||
x
|
||||
4
|
||||
@ -355,8 +355,8 @@ x
|
||||
2
|
||||
delete from t1;
|
||||
Warnings:
|
||||
Note 4106 Switching from partition `p0` to `p1`
|
||||
Warning 4104 Using full partition `p1`, need more VERSIONING partitions!
|
||||
Note 4113 Switching from partition `p0` to `p1`
|
||||
Warning 4111 Using full partition `p1`, need more VERSIONING partitions!
|
||||
select * from t1 partition (p0sp0) for system_time all;
|
||||
x
|
||||
1
|
||||
|
@ -48,7 +48,8 @@ create or replace procedure show_tables()
|
||||
begin
|
||||
show 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~~
|
||||
set versioning_alter_history= keep;
|
||||
create table t0 (z int) with system versioning;
|
||||
@ -150,7 +151,7 @@ x0_vtmd
|
||||
drop table x0_vtmd;
|
||||
rename table x0 to d0;
|
||||
Warnings:
|
||||
Warning 4115 `test.d0_vtmd` table already exists!
|
||||
Warning 4122 `test.d0_vtmd` table already exists!
|
||||
show tables;
|
||||
Tables_in_test
|
||||
d0
|
||||
@ -331,11 +332,11 @@ t3_TIMESTAMP_SUFFIX
|
||||
t3_TIMESTAMP_SUFFIX
|
||||
t3_vtmd
|
||||
table_name table_schema
|
||||
t0_TIMESTAMP_SUFFIX test
|
||||
t0_TIMESTAMP_SUFFIX test
|
||||
t0_TIMESTAMP_SUFFIX test
|
||||
t0_TIMESTAMP_SUFFIX test
|
||||
t1_TIMESTAMP_SUFFIX db1
|
||||
t0_TIMESTAMP_SUFFIX test
|
||||
t0_TIMESTAMP_SUFFIX test
|
||||
t0_TIMESTAMP_SUFFIX test
|
||||
t0_TIMESTAMP_SUFFIX test
|
||||
t2 test
|
||||
t2_vtmd test
|
||||
t3 test
|
||||
@ -353,7 +354,7 @@ t3_vtmd
|
||||
u0_vtmd
|
||||
u0_vtmd_vtmd
|
||||
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;
|
||||
create or replace table t (x int) with system versioning;
|
||||
select * from t for system_time all;
|
||||
|
@ -61,7 +61,8 @@ create or replace procedure show_tables()
|
||||
begin
|
||||
show 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~~
|
||||
delimiter ;~~
|
||||
|
||||
|
Reference in New Issue
Block a user