List:Commits« Previous MessageNext Message »
From:Mikael Ronstrom Date:July 23 2009 1:01pm
Subject:bzr push into mysql-5.4 branch (mikael:2827 to 2828)
View as plain text  
 2828 Mikael Ronstrom	2009-07-23
      Added new test case for truncate partition
      added:
        mysql-test/r/partition_truncate.result
        mysql-test/t/partition_truncate.test

 2827 Mikael Ronstrom	2009-07-23
      Wrong error reported when using non-existent partitions
      modified:
        sql/ha_partition.cc
        sql/handler.cc

=== added file 'mysql-test/r/partition_truncate.result'
--- a/mysql-test/r/partition_truncate.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/partition_truncate.result	2009-07-23 13:01:09 +0000
@@ -0,0 +1,18 @@
+drop table if exists t1, t2, t3, t4;
+create table t1 (a int)
+partition by list (a)
+(partition p1 values in (0));
+alter table t1 truncate partition p1,p1;
+ERROR HY000: Incorrect partition name
+alter table t1 truncate partition p0;
+ERROR HY000: Incorrect partition name
+drop table t1;
+create table t1 (a int)
+partition by list (a)
+subpartition by hash (a)
+subpartitions 1
+(partition p1 values in (1)
+(subpartition sp1));
+alter table t1 truncate partition sp1;
+ERROR HY000: Incorrect partition name
+drop table t1;

=== added file 'mysql-test/t/partition_truncate.test'
--- a/mysql-test/t/partition_truncate.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/partition_truncate.test	2009-07-23 13:01:09 +0000
@@ -0,0 +1,26 @@
+#
+# Simple tests to verify truncate partition syntax
+#
+--source include/have_partition.inc
+--disable_warnings
+drop table if exists t1, t2, t3, t4;
+--enable_warnings
+
+create table t1 (a int)
+partition by list (a)
+(partition p1 values in (0));
+--error ER_WRONG_PARTITION_NAME
+alter table t1 truncate partition p1,p1;
+--error ER_WRONG_PARTITION_NAME
+alter table t1 truncate partition p0;
+drop table t1;
+
+create table t1 (a int)
+partition by list (a)
+subpartition by hash (a)
+subpartitions 1
+(partition p1 values in (1)
+ (subpartition sp1));
+--error ER_WRONG_PARTITION_NAME
+alter table t1 truncate partition sp1;
+drop table t1;

Thread
bzr push into mysql-5.4 branch (mikael:2827 to 2828) Mikael Ronstrom23 Jul