List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:May 12 2011 11:31am
Subject:bzr commit into mysql-5.1-telco-7.0 branch (jonas:4373)
View as plain text  
#At file:///home/jonas/src/telco-7.0/ based on revid:jonas@stripped

 4373 Jonas Oreland	2011-05-12
      ndb - use new information_schema.partitions support to really verify that fragment count changes

    modified:
      mysql-test/suite/ndb/r/ndb_add_partition.result
      mysql-test/suite/ndb/t/ndb_add_partition.test
=== modified file 'mysql-test/suite/ndb/r/ndb_add_partition.result'
--- a/mysql-test/suite/ndb/r/ndb_add_partition.result	2009-05-09 15:49:27 +0000
+++ b/mysql-test/suite/ndb/r/ndb_add_partition.result	2011-05-12 11:31:21 +0000
@@ -144,8 +144,20 @@ a	b	c
 50	50	50
 alter online table t1 reorganize partition;
 alter online table t2 reorganize partition;
+partitions added to t1
+t1_added
+0
+partitions added to t2
+t2_added
+0
 alter online table t1 add partition partitions 1;
 alter online table t2 add partition partitions 4;
+partitions added to t1
+t1_added
+1
+partitions added to t2
+t2_added
+4
 alter online table t1 reorganize partition;
 ERROR HY000: REORGANIZE PARTITION without parameters can only be used on auto-partitioned tables using HASH PARTITIONs
 select count(*) from t1;
@@ -246,6 +258,12 @@ a	b	c
 50	50	50
 alter online table t1 add partition partitions 2;
 alter online table t2 add partition partitions 1;
+partitions added to t1
+t1_added
+3
+partitions added to t2
+t2_added
+5
 select count(*) from t1;
 count(*)
 100

=== modified file 'mysql-test/suite/ndb/t/ndb_add_partition.test'
--- a/mysql-test/suite/ndb/t/ndb_add_partition.test	2009-02-12 15:21:46 +0000
+++ b/mysql-test/suite/ndb/t/ndb_add_partition.test	2011-05-12 11:31:21 +0000
@@ -33,6 +33,10 @@ STORAGE DISK
 TABLESPACE ts1
 partition by key(a);
 
+let $t1_part_count_start = query_get_value(select count(*) as Value from information_schema.partitions where table_schema = 'test' and table_name = 't1', Value, 1);
+
+let $t2_part_count_start = query_get_value(select count(*) as Value from information_schema.partitions where table_schema = 'test' and table_name = 't2', Value, 1);
+
 INSERT INTO t1 VALUES
 (1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),
 (6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10),
@@ -91,9 +95,31 @@ select * from t2 where b = 50;
 alter online table t1 reorganize partition;
 alter online table t2 reorganize partition;
 
+let $t1_part_count_now = query_get_value(select count(*) as Value from information_schema.partitions where table_schema = 'test' and table_name = 't1', Value, 1);
+
+let $t2_part_count_now = query_get_value(select count(*) as Value from information_schema.partitions where table_schema = 'test' and table_name = 't2', Value, 1);
+
+--disable_query_log
+--echo partitions added to t1
+eval select $t1_part_count_now - $t1_part_count_start as t1_added;
+--echo partitions added to t2
+eval select $t2_part_count_now - $t2_part_count_start as t2_added;
+--enable_query_log
+
 alter online table t1 add partition partitions 1;
 alter online table t2 add partition partitions 4;
 
+let $t1_part_count_now = query_get_value(select count(*) as Value from information_schema.partitions where table_schema = 'test' and table_name = 't1', Value, 1);
+
+let $t2_part_count_now = query_get_value(select count(*) as Value from information_schema.partitions where table_schema = 'test' and table_name = 't2', Value, 1);
+
+--disable_query_log
+--echo partitions added to t1
+eval select $t1_part_count_now - $t1_part_count_start as t1_added;
+--echo partitions added to t2
+eval select $t2_part_count_now - $t2_part_count_start as t2_added;
+--enable_query_log
+
 # reorganize partition not support if not default partitioning
 # and after a add partition it's no longer default
 --error ER_REORG_NO_PARAM_ERROR
@@ -134,6 +160,17 @@ select * from t2 where b = 50;
 alter online table t1 add partition partitions 2;
 alter online table t2 add partition partitions 1;
 
+let $t1_part_count_now = query_get_value(select count(*) as Value from information_schema.partitions where table_schema = 'test' and table_name = 't1', Value, 1);
+
+let $t2_part_count_now = query_get_value(select count(*) as Value from information_schema.partitions where table_schema = 'test' and table_name = 't2', Value, 1);
+
+--disable_query_log
+--echo partitions added to t1
+eval select $t1_part_count_now - $t1_part_count_start as t1_added;
+--echo partitions added to t2
+eval select $t2_part_count_now - $t2_part_count_start as t2_added;
+--enable_query_log
+
 select count(*) from t1;
 select count(*) from t2;
 --sorted_result


Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20110512113121-qetjzcei409ehoqo.bundle
Thread
bzr commit into mysql-5.1-telco-7.0 branch (jonas:4373) Jonas Oreland12 May