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
4372 Jonas Oreland 2011-05-12
ndb - bug#61147 - fix stop of other ndb_mgmd incorrectly reporting failure
modified:
storage/ndb/src/mgmsrv/MgmtSrvr.cpp
=== 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
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.1-telco-7.0 branch (jonas:4372 to 4373) | Jonas Oreland | 12 May |