1# 2# Simple tests to verify truncate partition syntax 3# 4--source include/have_partition.inc 5--disable_warnings 6drop table if exists t1, t2, t3, t4; 7--enable_warnings 8 9create table t1 (a int) 10partition by list (a) 11(partition p1 values in (0)); 12--error ER_WRONG_PARTITION_NAME 13alter table t1 truncate partition p1,p1; 14--error ER_UNKNOWN_PARTITION 15alter table t1 truncate partition p0; 16drop table t1; 17 18create table t1 (a int) 19partition by list (a) 20subpartition by hash (a) 21subpartitions 1 22(partition p1 values in (1) 23 (subpartition sp1)); 24--error ER_WRONG_PARTITION_NAME 25alter table t1 truncate partition sp1; 26drop table t1; 27 28create table t1 (a int); 29insert into t1 values (1), (3), (8); 30--error ER_PARTITION_MGMT_ON_NONPARTITIONED 31alter table t1 truncate partition p0; 32select count(*) from t1; 33drop table t1; 34