Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
10.8(EOL)
Description
Note: If there is in fact a way to disable auto-partitioning, please make it a documentation request, as at the very least it is not obvious.
I have an auto-partitioned table with some already existing and populated history partitions:
bb-10.6-midenok-MDEV-17554 b96b96f9f3ec |
create or replace table t1 (pk int primary key, a int) engine=MyISAM with system versioning partition by system_time limit 100 auto; |
insert into t1 select seq, seq from seq_1_to_80; |
replace into t1 select seq, seq from seq_1_to_80; |
replace into t1 select seq, seq from seq_1_to_80; |
replace into t1 select seq, seq from seq_1_to_80; |
replace into t1 select seq, seq from seq_1_to_80; |
replace into t1 select seq, seq from seq_1_to_80; |
select partition_name, table_rows from information_schema.partitions where table_name = 't1'; |
+----------------+------------+ |
| partition_name | table_rows |
|
+----------------+------------+ |
| p0 | 160 |
|
| p1 | 160 |
|
| p2 | 80 |
|
| pn | 80 |
|
+----------------+------------+ |
Now I just want to disable further auto-partitioning.
What I tried was:
alter table t1 partition by system_time limit 100; |
but it reorganizes existing partitions into 1+1:
MariaDB [test]> select partition_name, table_rows from information_schema.partitions where table_name = 't1'; |
+----------------+------------+ |
| partition_name | table_rows |
|
+----------------+------------+ |
| p0 | 400 |
|
| pn | 80 |
|
+----------------+------------+ |
2 rows in set (0.003 sec) |
or (back from the original structure with 3+1 partitions):
alter table t1 partition by system_time limit 100 partitions 4; |
but it still reorganizes partitions and puts everything into the first one:
MariaDB [test]> select partition_name, table_rows from information_schema.partitions where table_name = 't1'; |
+----------------+------------+ |
| partition_name | table_rows |
|
+----------------+------------+ |
| p0 | 400 |
|
| p1 | 0 |
|
| p2 | 0 |
|
| pn | 80 |
|
+----------------+------------+ |
(maybe tried something else, but to no avail).
Attachments
Issue Links
- duplicates
-
MDEV-27328 Change of SYSTEM_TIME partitioning options is not possible without data copy
- Closed
- relates to
-
MDEV-17554 Auto-create history partitions for system-versioned tables
- Closed