[MDEV-5677] Enhance Support For Partition Truncate Created: 2014-02-14  Updated: 2015-11-17

Status: Open
Project: MariaDB Server
Component/s: None
Fix Version/s: None

Type: Task Priority: Major
Reporter: BELUGABEHR Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Extend current partition truncation to better support rolling dates in tables.

CREATE TABLE members (
    firstname VARCHAR(25) NOT NULL,
    lastname VARCHAR(25) NOT NULL,
    username VARCHAR(16) NOT NULL,
    joined DATETIME NOT NULL
)
PARTITION BY HASH(TO_DAYS(joined))
PARTITIONS 7;

ALTER TABLE t1 TRUNCATE PARTITION WHERE joined='2014-01-01'

The effect would be that the partition that would be mapped from the value '2014-01-01' would be truncated.


Generated at Thu Feb 08 07:06:12 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.