32
32
create or replace table t1 (i int) engine=DEFAULT_ENGINE with system versioning partition by hash(i);
33
33
alter table t1 engine=NON_DEFAULT_ENGINE;
34
34
ERROR HY000: Not allowed for system-versioned `test`.`t1`. Change to/from native system versioning engine is prohibited.
35
- # Check server-level partitioning
36
- ## create errors
35
+ ## CREATE TABLE
37
36
create or replace table t1 (x int)
38
37
partition by system_time (
39
38
partition p0 history,
@@ -49,34 +48,40 @@ create or replace table t1 (x int)
49
48
with system versioning
50
49
partition by system_time (
51
50
partition p0 current);
52
- ERROR HY000: Wrong partitions consistency for `t1`: must have at least one HISTORY and exactly one last CURRENT
51
+ ERROR HY000: Wrong partitions for `t1`: must have at least one HISTORY and exactly one last CURRENT
53
52
create or replace table t1 (x int)
54
53
with system versioning
55
54
partition by system_time (
56
55
partition p0 current,
57
56
partition p1 current);
58
- ERROR HY000: Wrong partitions consistency for `t1`: must have at least one HISTORY and exactly one last CURRENT
57
+ ERROR HY000: Wrong partitions for `t1`: must have at least one HISTORY and exactly one last CURRENT
59
58
create or replace table t1 (x int)
60
59
with system versioning
61
60
partition by system_time (
62
61
partition p0 history,
63
62
partition p1 history);
64
- ERROR HY000: Wrong partitions consistency for `t1`: must have at least one HISTORY and exactly one last CURRENT
63
+ ERROR HY000: Wrong partitions for `t1`: must have at least one HISTORY and exactly one last CURRENT
65
64
create or replace table t1 (x int)
66
65
with system versioning
67
66
partition by system_time (
68
67
partition pn current,
69
68
partition p0 history);
70
- ERROR HY000: Wrong partitions consistency for `t1`: must have at least one HISTORY and exactly one last CURRENT
69
+ ERROR HY000: Wrong partitions for `t1`: must have at least one HISTORY and exactly one last CURRENT
70
+ create or replace table t1 (x int)
71
+ with system versioning
72
+ partition by system_time (
73
+ partition p0,
74
+ partition pn current);
75
+ ERROR HY000: Wrong partitions for `t1`: must have at least one HISTORY and exactly one last CURRENT
71
76
create or replace table t1 (x int)
72
77
with system versioning
73
78
partition by system_time (
74
79
partition p0 history,
75
80
partition pn current);
76
- ## alter table
81
+ ## ALTER TABLE
77
82
alter table t1 add partition (
78
83
partition p1 current);
79
- ERROR HY000: Wrong partitions consistency for `t1`: must have at least one HISTORY and exactly one last CURRENT
84
+ ERROR HY000: Wrong partitions for `t1`: must have at least one HISTORY and exactly one last CURRENT
80
85
alter table t1 add partition (
81
86
partition p1 history);
82
87
Warnings:
@@ -95,10 +100,10 @@ t1 CREATE TABLE `t1` (
95
100
PARTITION `pn` CURRENT ENGINE = DEFAULT_ENGINE)
96
101
insert into t1 values (1), (2);
97
102
alter table t1 drop partition pn;
98
- ERROR HY000: Wrong partitions consistency for `t1`: must have at least one HISTORY and exactly one last CURRENT
103
+ ERROR HY000: Wrong partitions for `t1`: must have at least one HISTORY and exactly one last CURRENT
99
104
alter table t1 drop partition p1;
100
105
alter table t1 drop partition p0;
101
- ERROR HY000: Wrong partitions consistency for `t1`: must have at least one HISTORY and exactly one last CURRENT
106
+ ERROR HY000: Wrong partitions for `t1`: must have at least one HISTORY and exactly one last CURRENT
102
107
select x from t1;
103
108
x
104
109
1
@@ -110,7 +115,10 @@ partition by system_time limit 1 (
110
115
partition p0 history,
111
116
partition pn current);
112
117
alter table t1 change x big int;
113
- ## insert, delete, update
118
+ create or replace table t1 (i int) engine myisam partition by hash(i) partitions 2;
119
+ alter table t1 add partition (partition px history);
120
+ ERROR HY000: Wrong partitioning type, expected type: `SYSTEM_TIME`
121
+ ## INSERT, UPDATE, DELETE
114
122
create or replace table t1 (x int)
115
123
with system versioning
116
124
partition by system_time (
0 commit comments