#At file:///C:/mysql/5.5-cluster-read-multi-range/ based on revid:magnus.blaudd@strippedov93skkk
3340 Magnus Blåudd 2011-05-19
ndb
- 5.5 checks that the total length of the partitioning key does not exceed MAX_KEY_LENGTH (which is 3072), for
varchar columns the length is 2 bytes additionally. This means that the test case which creates a table with two
varchar(1536) columns violates this rule. 2*(1536+2) =- 3076.
- reduce the length to 1532 for the second column. in the testcase.
- Also fix the output of EXPLAIN in same testcase which has different "rows" count. It changed from 6 to 4.
modified:
mysql-test/suite/ndb/r/ndb_read_multi_range.result
mysql-test/suite/ndb/t/disabled.def
mysql-test/suite/ndb/t/ndb_read_multi_range.test
=== modified file 'mysql-test/suite/ndb/r/ndb_read_multi_range.result'
--- a/mysql-test/suite/ndb/r/ndb_read_multi_range.result 2011-02-28 10:42:04 +0000
+++ b/mysql-test/suite/ndb/r/ndb_read_multi_range.result 2011-05-19 10:25:14 +0000
@@ -559,7 +559,7 @@ a
4
drop table t1;
create table t1 (a varchar(1536) not null,
-b varchar(1536) not null,
+b varchar(1532) not null,
c int, primary key (a,b)) engine=ndb;
insert into t1 values ('a', 'a', 1), ('b', 'b', 2), ('c', 'c', 3),
('d', 'd', 4), ('e', 'e', 5), ('f', 'f', 6),
@@ -605,7 +605,7 @@ SELECT DISTINCT STRAIGHT_JOIN t1.pk FROM
t1 LEFT JOIN t2 ON t2.a = t1.a AND t2.pk != 6;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3000 Using temporary
-1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 6 Using where; Distinct
+1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 4 Using where; Distinct
SELECT DISTINCT STRAIGHT_JOIN t1.pk FROM
t1 LEFT JOIN t2 ON t2.a = t1.a AND t2.pk != 6;
drop table t1, t2;
=== modified file 'mysql-test/suite/ndb/t/disabled.def'
--- a/mysql-test/suite/ndb/t/disabled.def 2011-05-09 08:49:19 +0000
+++ b/mysql-test/suite/ndb/t/disabled.def 2011-05-19 10:25:14 +0000
@@ -29,8 +29,6 @@ ndb_index_ordered : SEAGULL alter in se
ndb_index_unique : SEAGULL different error with copying alter
ndb_alter_table3 : SEAGULL different error with copying alter
-ndb_read_multi_range : SEAGULL "total length of the partitioning fields is too large"
-
ndb_multi : SEAGULL schema distribution
ndb_sql_allow_batching : SEAGULL WL3733 xxx_allow_batching
=== modified file 'mysql-test/suite/ndb/t/ndb_read_multi_range.test'
--- a/mysql-test/suite/ndb/t/ndb_read_multi_range.test 2010-11-24 17:45:27 +0000
+++ b/mysql-test/suite/ndb/t/ndb_read_multi_range.test 2011-05-19 10:25:14 +0000
@@ -407,7 +407,7 @@ order by a;
drop table t1;
create table t1 (a varchar(1536) not null,
- b varchar(1536) not null,
+ b varchar(1532) not null,
c int, primary key (a,b)) engine=ndb;
insert into t1 values ('a', 'a', 1), ('b', 'b', 2), ('c', 'c', 3),
('d', 'd', 4), ('e', 'e', 5), ('f', 'f', 6),
Attachment: [text/bzr-bundle] bzr/magnus.blaudd@sun.com-20110519102514-hxvave4h4w9pxl3a.bundle
| Thread |
|---|
| • bzr commit into mysql-5.5-cluster branch (magnus.blaudd:3340) | Magnus Blåudd | 19 May |