From 310d70a3e615dbc49d10b99c35b00e1b94c2b735 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 7 Feb 2007 09:49:16 +0100 Subject: [PATCH] bug#25821 Excessive partition pruning for multi-range index scan in NDB API: added original test case --- mysql-test/r/ndb_read_multi_range.result | 15 +++++++++++---- mysql-test/t/ndb_read_multi_range.test | 13 ++++++++++--- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/mysql-test/r/ndb_read_multi_range.result b/mysql-test/r/ndb_read_multi_range.result index 12009d9d080..aef009212a4 100644 --- a/mysql-test/r/ndb_read_multi_range.result +++ b/mysql-test/r/ndb_read_multi_range.result @@ -459,10 +459,17 @@ INSERT INTO t1 VALUES (1,1),(2,2),(3,3); UPDATE t1 SET var2 = 9 WHERE var1 IN(1,2,3); DROP TRIGGER testtrigger; DROP TABLE t1, t2; -create table t2 (a int, b int, primary key (a), key ab (a,b)) engine=ndbcluster; -insert into t2 values (1,1), (10,10); -select * from t2 use index (ab) where a in(1,10) order by a; +create table t1 (a int, b int, primary key (a), key ab (a,b)) engine=ndbcluster; +insert into t1 values (1,1), (10,10); +select * from t1 use index (ab) where a in(1,10) order by a; a b 1 1 10 10 -drop table t2; +create table t2 (a int, b int, primary key (a,b)) engine=ndbcluster +partition by key(a); +insert into t2 values (1,1), (10,10); +select * from t2 where a in (1,10) order by a; +a b +1 1 +10 10 +drop table t1, t2; diff --git a/mysql-test/t/ndb_read_multi_range.test b/mysql-test/t/ndb_read_multi_range.test index 853d8919088..b490eeb68a3 100644 --- a/mysql-test/t/ndb_read_multi_range.test +++ b/mysql-test/t/ndb_read_multi_range.test @@ -303,10 +303,17 @@ DROP TRIGGER testtrigger; DROP TABLE t1, t2; #bug#25821 -create table t2 (a int, b int, primary key (a), key ab (a,b)) engine=ndbcluster; +create table t1 (a int, b int, primary key (a), key ab (a,b)) engine=ndbcluster; + +insert into t1 values (1,1), (10,10); + +select * from t1 use index (ab) where a in(1,10) order by a; + +create table t2 (a int, b int, primary key (a,b)) engine=ndbcluster +partition by key(a); insert into t2 values (1,1), (10,10); -select * from t2 use index (ab) where a in(1,10) order by a; +select * from t2 where a in (1,10) order by a; -drop table t2; +drop table t1, t2;