3880 Ole John Aske 2012-04-25
Updated WL#5940 with latest findings from main cluster branch (mysql-5.5-cluster-7.2)
Only try to 'make_pushed_join()' if there are multiple tables in query.
We want to keep a 'fast track' through the optimizer for simple, single table queries.
Thus we should avoid possible overhead from finding join-pushable parts of the query
if there are only a single table.
3879 Ole John Aske 2012-04-25
WL#5940 update: When applying the WL#5940 patchset to this branch on top of a fresh trunk pull,
I didn't realize that Cluster specific components was recently merged into trunk - including
ha_ndbcluster implementing the pushed join extension ha_ndbcluster::test_push_flag().
This reintroduced a previous version of that method handling the now obsolete
HA_PUSH_NO_ORDERED_INDEX. This is removed by this fix.
=== modified file 'sql/sql_optimizer.cc'
--- a/sql/sql_optimizer.cc 2012-03-30 06:52:25 +0000
+++ b/sql/sql_optimizer.cc 2012-04-25 11:52:33 +0000
@@ -953,7 +953,9 @@ JOIN::optimize()
* information it need for later execution of pushed queries.
* Currently pushed joins are only implemented by NDB.
+ * It only make sense to try pushing if > 1 tables.
+ if ((tables-const_tables) > 1)
const AQP::Join_plan plan(this);
if (ha_make_pushed_joins(thd, &plan))
No bundle (reason: useless for push emails).
|• bzr push into mysql-trunk branch (ole.john.aske:3879 to 3880) WL#5940||Ole John Aske||25 Apr|