TRUNCATE sub partition?

Hi,

The following command will truncate a partition :

ALTER TABLE subpartionedtable TRUNCATE PARTITION p002;

But when I try it with a sub partition ...

ALTER TABLE subpartionedtable TRUNCATE PARTITION p002sp3;

it fails with

Error 1567 Incorrect partition name.

The subpartition name is correct, if I try with a non-existent one the error is different :

ALTER TABLE subpartionedtable TRUNCATE PARTITION whatever;

Error 1735 Unknown partition 'whatever' in table 'subpartionedtable'

"TRUNCATE TABLE" does not seem to take a PARTITION specifier.

I can do this of course :

DELETE FROM subpartionedtable PARTITION (p002sp3);

But I wonder if truncate subpartition is available some other way?

version 10.2.9-MariaDB

Thanks!

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.