You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returndbterror.ErrGeneralUnsupportedDDL.GenWithStackByArgs("INTERVAL partitioning, only supports YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, MINUTE and SECOND as time unit")
Copy file name to clipboardExpand all lines: tests/integrationtest/r/ddl/partition.result
+42Lines changed: 42 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -401,3 +401,45 @@ ALTER TABLE tp1 PARTITION BY RANGE (id) (PARTITION `P_LT_200` VALUES LESS THAN (
401
401
PARTITION `P_LT_500` VALUES LESS THAN (500),
402
402
PARTITION `P_LT_600` VALUES LESS THAN (600));
403
403
drop table tp1;
404
+
DROP TABLE IF EXISTS t;
405
+
CREATE TABLE t (a int NOT NULL, b varchar(20) NOT NULL, c datetime NOT NULL ) PARTITION BY RANGE COLUMNS (c) INTERVAL (1 MINUTE) FIRST PARTITION LESS THAN ('2024-01-01') LAST PARTITION LESS THAN ('2024-01-01 00:10:00');
Copy file name to clipboardExpand all lines: tests/integrationtest/t/ddl/partition.test
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -198,3 +198,11 @@ create table tp1(id int);
198
198
ALTER TABLE tp1 PARTITION BY RANGE (id) INTERVAL (100) FIRST PARTITION LESS THAN (200) LAST PARTITION LESS THAN (600);
199
199
select QUERY from information_schema.ddl_jobs limit 1;
200
200
drop table tp1;
201
+
202
+
# Minute interval partitioning, #57698
203
+
DROP TABLE IF EXISTS t;
204
+
CREATE TABLE t (a int NOT NULL, b varchar(20) NOT NULL, c datetime NOT NULL ) PARTITION BY RANGE COLUMNS (c) INTERVAL (1 MINUTE) FIRST PARTITION LESS THAN ('2024-01-01') LAST PARTITION LESS THAN ('2024-01-01 00:10:00');
205
+
SHOW CREATE TABLE t;
206
+
ALTER TABLE t FIRST PARTITION LESS THAN ('2024-01-01 00:02:00');
207
+
ALTER TABLE t LAST PARTITION LESS THAN ('2024-01-01 00:12:00');
0 commit comments