From: Ole John Aske Date: November 16 2011 1:10pm Subject: bzr push into mysql-trunk-cluster branch (ole.john.aske:3410 to 3411) List-Archive: http://lists.mysql.com/commits/141986 Message-Id: <20111116131043.1F4EB1819D@loki43.norway.sun.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3411 Ole John Aske 2011-11-16 Fixed ndb_condition_pushdown.test which started to fail after last merge from 5.5-cluster. modified: mysql-test/suite/ndb/r/ndb_condition_pushdown.result mysql-test/suite/ndb/t/ndb_condition_pushdown.test 3410 magnus.blaudd@stripped 2011-11-16 [merge] Merge 5.5-cluster -> trunk-cluster added: mysql-test/suite/ndb/t/ndb_join_pushdown_default.test mysql-test/suite/rpl/r/rpl_row_basic_allow_batching.result mysql-test/suite/rpl/t/rpl_row_basic_allow_batching.test renamed: mysql-test/suite/ndb/r/ndb_join_pushdown.result => mysql-test/suite/ndb/r/ndb_join_pushdown_default.result mysql-test/suite/ndb/t/ndb_join_pushdown.test => mysql-test/suite/ndb/t/ndb_join_pushdown.inc modified: mysql-test/suite/ndb/r/ndb_condition_pushdown.result mysql-test/suite/ndb/t/ndb_condition_pushdown.test mysql-test/suite/sys_vars/t/slave_allow_batching_basic.test sql/ha_ndbcluster.cc sql/handler.h sql/log_event.cc sql/mysqld.cc sql/mysqld.h sql/rpl_slave.cc sql/rpl_slave.h sql/sys_vars.cc storage/ndb/include/kernel/ndb_limits.h storage/ndb/include/mgmapi/mgmapi_config_parameters.h storage/ndb/include/ndb_version.h.in storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp storage/ndb/src/kernel/blocks/dblqh/DblqhCommon.cpp storage/ndb/src/kernel/blocks/dblqh/DblqhCommon.hpp storage/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp storage/ndb/src/kernel/blocks/dbspj/DbspjMain.cpp storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp storage/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp storage/ndb/src/kernel/blocks/dbtux/Dbtux.hpp storage/ndb/src/kernel/vm/GlobalData.hpp storage/ndb/src/kernel/vm/pc.hpp mysql-test/suite/ndb/t/ndb_join_pushdown.inc === modified file 'mysql-test/suite/ndb/r/ndb_condition_pushdown.result' --- a/mysql-test/suite/ndb/r/ndb_condition_pushdown.result 2011-11-16 09:29:49 +0000 +++ b/mysql-test/suite/ndb/r/ndb_condition_pushdown.result 2011-11-16 13:10:11 +0000 @@ -2271,9 +2271,7 @@ Note 9999 Table 't2' is not pushable: GR Note 9999 Table 'tx' is not pushable: GROUP BY cannot be done using index on grouped columns. Note 1003 /* select#1 */ select `test`.`t2`.`c` AS `c`,count(distinct `test`.`t2`.`a`) AS `count(distinct t2.a)` from `test`.`tx` join `test`.`tx` `t2` where ((`test`.`tx`.`b` = `test`.`t2`.`d`) and (`test`.`tx`.`a` = `test`.`t2`.`c`) and (`test`.`t2`.`a` = 4)) group by `test`.`t2`.`c` drop table tx; -set engine_condition_pushdown = on; -Warnings: -Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead +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); create table subq (pk int, i int) engine = ndb; @@ -2286,7 +2284,7 @@ id select_type table type possible_keys 2 DEPENDENT SUBQUERY subq ALL NULL NULL NULL NULL 4 100.00 Using where with pushed condition: (`test`.`subq`.`i` = 3) Warnings: Note 1276 Field or reference 'test.t.i' of SELECT #2 was resolved in SELECT #1 -Note 1003 select `test`.`t`.`pk` AS `pk`,`test`.`t`.`i` AS `i` from `test`.`t` where exists(select 1 from `test`.`t` `subq` where ((`test`.`subq`.`i` = 3) and (`test`.`t`.`i` = 3))) +Note 1003 /* select#1 */ select `test`.`t`.`pk` AS `pk`,`test`.`t`.`i` AS `i` from `test`.`t` where exists(/* select#2 */ select 1 from `test`.`t` `subq` where ((`test`.`subq`.`i` = 3) and (`test`.`t`.`i` = 3))) explain extended select * from t where exists (select * from subq where subq.i=3 and t.i=3); @@ -2295,7 +2293,7 @@ id select_type table type possible_keys 2 DEPENDENT SUBQUERY subq ALL NULL NULL NULL NULL 4 100.00 Using where with pushed condition: (`test`.`subq`.`i` = 3) Warnings: Note 1276 Field or reference 'test.t.i' of SELECT #2 was resolved in SELECT #1 -Note 1003 select `test`.`t`.`pk` AS `pk`,`test`.`t`.`i` AS `i` from `test`.`t` where exists(select 1 from `test`.`subq` where ((`test`.`subq`.`i` = 3) and (`test`.`t`.`i` = 3))) +Note 1003 /* select#1 */ select `test`.`t`.`pk` AS `pk`,`test`.`t`.`i` AS `i` from `test`.`t` where exists(/* select#2 */ select 1 from `test`.`subq` where ((`test`.`subq`.`i` = 3) and (`test`.`t`.`i` = 3))) select * from t where exists (select * from t as subq where subq.i=3 and t.i=3); pk i @@ -2318,46 +2316,6 @@ pk1 pk1 pk2 pk2 3 3 0 0 4 3 0 0 drop table t; -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); -create table subq (pk int, i int) engine = ndb; -insert into subq values (1,3), (3,6), (6,9), (9,1); -explain extended -select * from t where exists -(select * from t as subq where subq.i=3 and t.i=3); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t ALL NULL NULL NULL NULL 4 100.00 Using where -2 DEPENDENT SUBQUERY subq ALL NULL NULL NULL NULL 4 100.00 Using where with pushed condition: (`test`.`subq`.`i` = 3) -Warnings: -Note 1276 Field or reference 'test.t.i' of SELECT #2 was resolved in SELECT #1 -Note 1003 /* select#1 */ select `test`.`t`.`pk` AS `pk`,`test`.`t`.`i` AS `i` from `test`.`t` where exists(/* select#2 */ select 1 from `test`.`t` `subq` where ((`test`.`subq`.`i` = 3) and (`test`.`t`.`i` = 3))) -explain extended -select * from t where exists -(select * from subq where subq.i=3 and t.i=3); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t ALL NULL NULL NULL NULL 4 100.00 Using where -2 DEPENDENT SUBQUERY subq ALL NULL NULL NULL NULL 4 100.00 Using where with pushed condition: (`test`.`subq`.`i` = 3) -Warnings: -Note 1276 Field or reference 'test.t.i' of SELECT #2 was resolved in SELECT #1 -Note 1003 /* select#1 */ select `test`.`t`.`pk` AS `pk`,`test`.`t`.`i` AS `i` from `test`.`t` where exists(/* select#2 */ select 1 from `test`.`subq` where ((`test`.`subq`.`i` = 3) and (`test`.`t`.`i` = 3))) -select * from t where exists -(select * from t as subq where subq.i=3 and t.i=3); -pk i -1 3 -select * from t where exists -(select * from subq where subq.i=3 and t.i=3); -pk i -1 3 -explain extended -select * from t -where i = (select max(i) from t); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t ALL NULL NULL NULL NULL 4 100.00 Using where -2 SUBQUERY t ALL NULL NULL NULL NULL 4 100.00 -Warnings: -Note 1003 /* select#1 */ select `test`.`t`.`pk` AS `pk`,`test`.`t`.`i` AS `i` from `test`.`t` where (`test`.`t`.`i` = (/* select#2 */ select max(`test`.`t`.`i`) from `test`.`t`)) -drop table t,subq; create table mytable(i int, s varchar(255) ) engine = ndb; insert into mytable values(0,"Text Hej"),(1, "xText aaja"); set @@optimizer_switch = 'engine_condition_pushdown=on'; === modified file 'mysql-test/suite/ndb/t/ndb_condition_pushdown.test' --- a/mysql-test/suite/ndb/t/ndb_condition_pushdown.test 2011-11-16 08:17:17 +0000 +++ b/mysql-test/suite/ndb/t/ndb_condition_pushdown.test 2011-11-16 13:10:11 +0000 @@ -2327,7 +2327,7 @@ group by t2.c; drop table tx; # 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); No bundle (reason: useless for push emails).