[MDEV-20951] Documentation does not mention TRUNCATE PARTITION syntax Created: 2019-11-03  Updated: 2023-12-15

Status: Open
Project: MariaDB Server
Component/s: Documentation, Partitioning
Affects Version/s: N/A
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Valerii Kravchuk Assignee: Joe Cotellese
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
PartOf

 Description   

KB pages:

https://mariadb.com/kb/en/library/alter-table/
https://mariadb.com/kb/en/library/partitioning-overview/

do not mention truncating partitions or TRUNCATE PARTITION syntax, even though it surely works:

C:\Program Files\MariaDB 10.3\bin>mysql -uroot -proot -P3316 test
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 9
Server version: 10.3.7-MariaDB-log mariadb.org binary distribution
 
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
MariaDB [test]> CREATE TABLE t1 (
    ->     id INT,
    ->     year_col INT
    -> )
    -> PARTITION BY RANGE (year_col) (
    ->     PARTITION p0 VALUES LESS THAN (1991),
    ->     PARTITION p1 VALUES LESS THAN (1995),
    ->     PARTITION p2 VALUES LESS THAN (1999),
    ->     PARTITION p3 VALUES LESS THAN (2003),
    ->     PARTITION p4 VALUES LESS THAN (2007)
    -> );
Query OK, 0 rows affected (2.994 sec)
 
MariaDB [test]> insert into t1 values (1, 1990), (2, 200), (3, 2001), (4, 2005);
Query OK, 4 rows affected (0.158 sec)
Records: 4  Duplicates: 0  Warnings: 0
 
MariaDB [test]> select * from t1;
+------+----------+
| id   | year_col |
+------+----------+
|    1 |     1990 |
|    2 |      200 |
|    3 |     2001 |
|    4 |     2005 |
+------+----------+
4 rows in set (0.001 sec)

Please, fix this and provide examples of TRUNCATE PARTITION among other p[artition maintenance commands.



 Comments   
Comment by Julien Fritsch [ 2021-09-22 ]

jacob.moorman from our discussion, I decided to reassign Kenneth's ticket to you?

Generated at Thu Feb 08 09:03:28 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.