From: Jonas Oreland Date: June 27 2011 8:05am Subject: bzr push into mysql-5.5-cluster branch (jonas.oreland:3372 to 3373) List-Archive: http://lists.mysql.com/commits/139885 Message-Id: <20110627080521.71BBCAB36A9@perch.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3373 Jonas Oreland 2011-06-27 ndb - use @@optimizer_switch='engine_condition_pushdown=on' instead of engine_condition_pushdown=on modified: mysql-test/suite/ndb/t/ndb_condition_pushdown.test 3372 jonas oreland 2011-06-23 ndb - fix tree name modified: .bzr-mysql/default.conf === modified file 'mysql-test/suite/ndb/t/ndb_condition_pushdown.test' --- a/mysql-test/suite/ndb/t/ndb_condition_pushdown.test 2011-06-23 06:59:40 +0000 +++ b/mysql-test/suite/ndb/t/ndb_condition_pushdown.test 2011-06-27 07:58:59 +0000 @@ -67,8 +67,8 @@ CREATE TABLE t4 (pk1 int unsigned NOT N insert into t4 values (0,0,0,0,"a"),(1,1,9223372036854775803,1,"b"),(2,2,9223372036854775804,2,"c"),(3,3,9223372036854775805,3,"d"),(4,4,9223372036854775806,4,"e"),(5,5,9223372036854775807,5,"f"); -set @old_ecpd = @@session.engine_condition_pushdown; -set engine_condition_pushdown = off; +set @old_ecpd = @@session.optimizer_switch; +set @@optimizer_switch = 'engine_condition_pushdown=off'; # Test all types and compare operators select auto from t1 where @@ -452,7 +452,7 @@ select * from t2,t3 where t2.attr1 < 1 a select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; -set engine_condition_pushdown = on; +set @@optimizer_switch = 'engine_condition_pushdown=on'; # Test all types and compare operators --replace_column 9 # @@ -1673,18 +1673,18 @@ select * from t3 left join t4 on t4.attr create table t5 (a int primary key auto_increment, b tinytext not null) engine = ndb; insert into t5 (b) values ('jonas'), ('jensing'), ('johan'); -set engine_condition_pushdown = off; +set @@optimizer_switch='engine_condition_pushdown=off'; select * from t5 where b like '%jo%' order by a; -set engine_condition_pushdown = on; +set @@optimizer_switch = 'engine_condition_pushdown=on'; --replace_column 9 # explain select * from t5 where b like '%jo%'; select * from t5 where b like '%jo%' order by a; # bug#21056 ndb pushdown equal/setValue error on datetime -set engine_condition_pushdown = off; +set @@optimizer_switch='engine_condition_pushdown=off'; select auto from t1 where date_time like '1902-02-02 %' order by auto; select auto from t1 where date_time not like '1902-02-02 %' order by auto; -set engine_condition_pushdown = on; +set @@optimizer_switch = 'engine_condition_pushdown=on'; --replace_column 9 # explain select auto from t1 where date_time like '1902-02-02 %'; select auto from t1 where date_time like '1902-02-02 %' order by auto; @@ -1700,12 +1700,12 @@ insert into t1 values (1,'a'), (2,'ab'), # in TUP the constants 'ab' 'abc' were expected in varchar format # "like" returned error which became "false" # scan filter negates "or" which exposes the bug -set engine_condition_pushdown = off; +set @@optimizer_switch='engine_condition_pushdown=off'; select * from t1 where b like 'ab'; select * from t1 where b like 'ab' or b like 'ab'; select * from t1 where b like 'abc'; select * from t1 where b like 'abc' or b like 'abc'; -set engine_condition_pushdown = on; +set @@optimizer_switch = 'engine_condition_pushdown=on'; select * from t1 where b like 'ab'; select * from t1 where b like 'ab' or b like 'ab'; select * from t1 where b like 'abc'; @@ -1718,12 +1718,12 @@ engine=ndb; insert into t1 values (1,'a'), (2,'ab'), (3,'abc'); # test that incorrect MySQL behaviour is preserved # 'ab ' LIKE 'ab' is true in MySQL -set engine_condition_pushdown = off; +set @@optimizer_switch='engine_condition_pushdown=off'; select * from t1 where b like 'ab'; select * from t1 where b like 'ab' or b like 'ab'; select * from t1 where b like 'abc'; select * from t1 where b like 'abc' or b like 'abc'; -set engine_condition_pushdown = on; +set @@optimizer_switch = 'engine_condition_pushdown=on'; select * from t1 where b like 'ab'; select * from t1 where b like 'ab' or b like 'ab'; select * from t1 where b like 'abc'; @@ -1735,9 +1735,9 @@ create table t1 ( fname varchar(255), l engine=ndbcluster; insert into t1 values ("Young","Foo"); -set engine_condition_pushdown = 0; +set @@optimizer_switch = 'engine_condition_pushdown=off'; SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); -set engine_condition_pushdown = 1; +set @@optimizer_switch = 'engine_condition_pushdown=on'; SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); # make sure optimizer does not do some crazy shortcut @@ -1746,9 +1746,9 @@ insert into t1 values ("bbb", "bbb"); insert into t1 values ("ccc", "ccc"); insert into t1 values ("ddd", "ddd"); -set engine_condition_pushdown = 0; +set @@optimizer_switch = 'engine_condition_pushdown=off'; SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); -set engine_condition_pushdown = 1; +set @@optimizer_switch = 'engine_condition_pushdown=on'; SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); # bug#29390 (scan filter is too large, discarded) @@ -1796,7 +1796,7 @@ insert into t1 values (30,3,300,0+0x3333 insert into t1 values (40,4,400,0+0x4444); insert into t1 values (50,5,500,0+0x5555); -set engine_condition_pushdown = on; +set @@optimizer_switch = 'engine_condition_pushdown=on'; select a,b,d from t1 where b in (0,1,2,5) @@ -2118,7 +2118,7 @@ insert into balerno values (5, repeat('B # condition at end of candidates. # # Use bounds + ScanFilter to select -set engine_condition_pushdown = on; +set @@optimizer_switch = 'engine_condition_pushdown=on'; select a from balerno where b in ( repeat('10', 1000), @@ -2190,7 +2190,7 @@ select a from balerno ignore index(b) wh show warnings; -set engine_condition_pushdown = off; +set @@optimizer_switch='engine_condition_pushdown=off'; # Just use Index bounds to select select a from balerno where b in ( @@ -2232,7 +2232,7 @@ drop table balerno; # bug#49459 Incorrect handling of too long string in condition pushdown create table t (pk int primary key, x varchar(1)) engine = ndb; insert into t values (0,"a"); -set engine_condition_pushdown = off; +set @@optimizer_switch='engine_condition_pushdown=off'; select * from t where x <> "aa"; select * from t where "aa" <> x; select * from t where x between "" and "bb"; @@ -2240,7 +2240,7 @@ select * from t where x not between "" a select * from t where x in ("","aa","b"); select * from t where x not in ("","aa","b"); select * from t where x like "aa?"; -set engine_condition_pushdown = on; +set @@optimizer_switch = 'engine_condition_pushdown=on'; explain select * from t where x <> "aa"; select * from t where x <> "aa"; explain select * from t where "aa" <> x; @@ -2262,7 +2262,7 @@ drop table t; # Bug#57735 BETWEEN in pushed condition cause garbage to be read in ::unpack_record() create table t (pk int primary key, x int) engine = ndb; insert into t values (0,0),(1,1),(2,2),(3,3),(4,4),(5,5); -set engine_condition_pushdown = on; +set @@optimizer_switch = 'engine_condition_pushdown=on'; explain select * from t where 3 between 1+1 and x order by pk; select * from t where 3 between 1+1 and x order by pk; explain select * from t where 3 between -1 and x order by pk; @@ -2270,7 +2270,7 @@ select * from t where 3 between -1 and x drop table t; # Bug#53360 No result for requests using LIKE condition on ENUM fields -set engine_condition_pushdown = on; +set @@optimizer_switch = 'engine_condition_pushdown=on'; create table t (x enum ('yes','yep','no')) engine = ndb; insert into t values ('yes'),('yep'),('no'); --replace_column 9 # @@ -2285,7 +2285,7 @@ select * from t where x not like 'ye%' o drop table t; # Bug#58134: Incorrectly condition pushdown inside subquery to NDB engine -set engine_condition_pushdown = on; +set @@optimizer_switch = 'engine_condition_pushdown=on'; create table t (pk int, i int) engine = ndb; insert into t values (1,3), (3,6), (6,9), (9,1); @@ -2350,7 +2350,7 @@ drop table tx; create table t (pk1 int, pk2 int, primary key(pk1,pk2)) engine = ndb; insert into t values (1,0), (2,0), (3,0), (4,0); -set engine_condition_pushdown=1; +set @@optimizer_switch='engine_condition_pushdown=on'; # Multiple instances of same table (t as table, ) confused # ha_ndbcluster::cond_push() which accepted @@ -2367,7 +2367,7 @@ select table1.pk1, table2.pk1, table1.pk drop table t; # Bug#58134: Incorrectly condition pushdown inside subquery to NDB engine -set engine_condition_pushdown = on; +set @@optimizer_switch = 'engine_condition_pushdown=on'; create table t (pk int, i int) engine = ndb; insert into t values (1,3), (3,6), (6,9), (9,1); @@ -2391,6 +2391,6 @@ select * from t where exists drop table t,subq; -set engine_condition_pushdown = @old_ecpd; +set @@session.optimizer_switch = @old_ecpd; DROP TABLE t1,t2,t3,t4,t5; No bundle (reason: useless for push emails).