bug#25821 Excessive partition pruning for multi-range index scan in NDB API:...

bug#25821  Excessive partition pruning for multi-range index scan in NDB API: added original test case
parent 5d35ff3d
......@@ -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;
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
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;
a b
1 1
10 10
drop table t2;
drop table t1, t2;
......@@ -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;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment