summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/ndb_basic.test38
1 files changed, 38 insertions, 0 deletions
diff --git a/mysql-test/t/ndb_basic.test b/mysql-test/t/ndb_basic.test
index 2671223ada8..f460c573a9d 100644
--- a/mysql-test/t/ndb_basic.test
+++ b/mysql-test/t/ndb_basic.test
@@ -539,3 +539,41 @@ insert into t1 values (1,1),(2,1),(3,1),(4,1),(5,2),(6,1),(7,1);
explain select * from t1 where a12345678901234567890123456789a1234567890=2;
select * from t1 where a12345678901234567890123456789a1234567890=2;
drop table t1;
+
+#
+# test fragment creation
+#
+# first a table with _many_ fragments per node group
+# then a table with just one fragment per node group
+#
+create table t1
+ (a bigint, b bigint, c bigint, d bigint,
+ primary key (a,b,c,d))
+ engine=ndb
+ max_rows=200000000;
+insert into t1 values
+ (1,2,3,4),(2,3,4,5),(3,4,5,6),
+ (3,2,3,4),(1,3,4,5),(2,4,5,6),
+ (1,2,3,5),(2,3,4,8),(3,4,5,9),
+ (3,2,3,5),(1,3,4,8),(2,4,5,9),
+ (1,2,3,6),(2,3,4,6),(3,4,5,7),
+ (3,2,3,6),(1,3,4,6),(2,4,5,7),
+ (1,2,3,7),(2,3,4,7),(3,4,5,8),
+ (3,2,3,7),(1,3,4,7),(2,4,5,8),
+ (1,3,3,4),(2,4,4,5),(3,5,5,6),
+ (3,3,3,4),(1,4,4,5),(2,5,5,6),
+ (1,3,3,5),(2,4,4,8),(3,5,5,9),
+ (3,3,3,5),(1,4,4,8),(2,5,5,9),
+ (1,3,3,6),(2,4,4,6),(3,5,5,7),
+ (3,3,3,6),(1,4,4,6),(2,5,5,7),
+ (1,3,3,7),(2,4,4,7),(3,5,5,8),
+ (3,3,3,7),(1,4,4,7),(2,5,5,8);
+select count(*) from t1;
+drop table t1;
+
+create table t1
+ (a bigint, b bigint, c bigint, d bigint,
+ primary key (a))
+ engine=ndb
+ max_rows=1;
+drop table t1;