From: Ole John Aske Date: March 30 2012 7:31am Subject: bzr push into mysql-5.5-cluster-7.2-spj branch (ole.john.aske:3858 to 3859) List-Archive: http://lists.mysql.com/commits/143372 Message-Id: <20120330073155.7B3B2252@fimafeng09.norway.sun.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3859 Ole John Aske 2012-03-30 We (the SPJ project) has made some hooks to 'EXPLAIN EXTENDED' such that the reason for a table not being 'join pushed' is added to the warnings list. This patch removes the message "Table '%s' not in ndb engine, not pushable" from the EXPLAIN EXTENDED warnings we produce as I belive a user intentionally using MyISAM or InnoDb will only find this annoying. Instead it will become availabe as a DBUG output. modified: mysql-test/suite/ndb/r/ndb_join_pushdown_default.result sql/ha_ndbcluster.cc sql/ha_ndbcluster_push.cc 3858 Maitrayi Sabaratnam 2012-03-28 [merge] merge modified: storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp storage/ndb/src/kernel/blocks/dbspj/DbspjMain.cpp storage/ndb/test/ndbapi/testSpj.cpp === modified file 'mysql-test/suite/ndb/r/ndb_join_pushdown_default.result' --- a/mysql-test/suite/ndb/r/ndb_join_pushdown_default.result 2012-03-22 14:18:01 +0000 +++ b/mysql-test/suite/ndb/r/ndb_join_pushdown_default.result 2012-03-30 07:31:27 +0000 @@ -905,7 +905,6 @@ id select_type table type possible_keys 1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 const,const 1 100.00 Parent of 2 pushed join@1 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 const,test.t2.b 1 100.00 Child of 't2' in pushed join@1; Using where Warnings: -Note 9999 Table 't1' not in ndb engine, not pushable Note 1003 select '2' AS `a`,'2' AS `b`,'1' AS `c`,'1' AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d` from `test`.`t1_myisam` `t1` join `test`.`t1` `t2` join `test`.`t1` `t3` where ((`test`.`t2`.`b` = '1') and (`test`.`t3`.`b` = '1') and (`test`.`t2`.`a` = '1') and (`test`.`t3`.`a` = '1')) select * from t1_myisam as t1 @@ -3260,7 +3259,6 @@ id select_type table type possible_keys 1 SIMPLE t2 ALL PRIMARY NULL NULL NULL 4 75.00 Using where; Using join buffer 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.b 1 100.00 Warnings: -Note 9999 Table 't2' not in ndb engine, not pushable Note 9999 Cannot push table 't3' as child of table 't1'. Doing so would prevent using join buffer for table 't2'. Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b` from `test`.`t1` join `test`.`t2` join `test`.`t1` `t3` where ((`test`.`t3`.`a` = `test`.`t2`.`b`) and (`test`.`t2`.`a` = `test`.`t1`.`b`)) select * from t1, t2, t1 as t3 === modified file 'sql/ha_ndbcluster.cc' --- a/sql/ha_ndbcluster.cc 2012-03-23 07:44:14 +0000 +++ b/sql/ha_ndbcluster.cc 2012-03-30 07:31:27 +0000 @@ -14527,7 +14527,7 @@ ha_ndbcluster::assign_pushed_join(const bool ha_ndbcluster::maybe_pushable_join(const char*& reason) const { - reason= ""; + reason= NULL; if (uses_blob_value(table->read_set)) { reason= "select list can't contain BLOB columns"; === modified file 'sql/ha_ndbcluster_push.cc' --- a/sql/ha_ndbcluster_push.cc 2012-03-22 14:18:01 +0000 +++ b/sql/ha_ndbcluster_push.cc 2012-03-30 07:31:27 +0000 @@ -315,8 +315,8 @@ ndb_pushed_builder_ctx::ndb_pushed_build const AQP::Table_access* const table = m_plan.get_table_access(i); if (table->get_table()->file->ht != ndbcluster_hton) { - EXPLAIN_NO_PUSH("Table '%s' not in ndb engine, not pushable", - table->get_table()->alias); + DBUG_PRINT("info", ("Table '%s' not in ndb engine, not pushable", + table->get_table()->alias)); continue; } @@ -352,7 +352,7 @@ ndb_pushed_builder_ctx::ndb_pushed_build { m_tables[i].m_maybe_pushable= PUSHABLE_AS_CHILD | PUSHABLE_AS_PARENT; } - else + else if (reason != NULL) { EXPLAIN_NO_PUSH("Table '%s' is not pushable: %s", table->get_table()->alias, reason); No bundle (reason: useless for push emails).