lp:~prafulla-t/drizzle/dr-bug-592444

Created by PrafullaT and last modified
Get this branch:
bzr branch lp:~prafulla-t/drizzle/dr-bug-592444
Only PrafullaT can upload to this branch. If you are PrafullaT please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
PrafullaT
Project:
Drizzle
Status:
Merged

Recent revisions

1648. By PrafullaT

Removing debug method.

1647. By PrafullaT

Adding test for Bug #592444

1646. By PrafullaT

Fix for Bug 592444

There were two problems:
o. In greedy_search optimizer method, best_extension_by_limited search
   maintains join embedding(nestedness) of tables added so far, so that
   correct(valid) join order is selected
   These are requirements from nested outer join executioner.
   The problem was, embedding_map was not correctly updated when a table
   is added to optimal plan outside best_extension_by_limited search,
   by greedy_search method. We need to update join->cur_embedding_map
   correctly here so that execution plan for other tables get
   generated.
   Invoked checked_interleaving_with_nj from greedy_search on the
   best_table selected. Fixed its prototype to take only one JoinTab
   This is same as mysql 5.1 source tree.
o. The other problem was, join->cur_embedding_map was not restored correctly
   when a table is added to the optimal plan to reflect the current embedding
   map.
   Taken good documented method restore_prev_nj_state which restores
   cur_embedding_map from mysql 5.1 source tree and modified it for drizzled
   code.

1645. By PrafullaT

Adding test for Bug 595305

1644. By PrafullaT

Merge from trunk

1643. By PrafullaT

This bug is simillar to mysql bug 36133
http://bugs.mysql.com/bug.php?id=36133

Taking changes from that fix.

  - The problem was that the range optimizer evaluated constant expressions,
    and among them it would try to evaluate IN-subquery predicates slated for
    handling with materialization strategy. However, these predicates require
    that parent_join->setup_subquery_materialization() is invoked before one
    attempts to evaluate them.

  - Fixed by making the range optimizer not to evaluate expressions that have
    item->is_expensive() == TRUE (these are materialization subqueries and
    stored function calls). This should also resolve the problem that EXPLAIN
    may be too long.
    This change cuts off some opportunities for range optimizer, but this is
    the price we're willing to pay for separation of query optimization and
    execution.

1642. By PrafullaT

Merger from main branch

1641. By PrafullaT

Reverting some un-necessary changes.

1640. By PrafullaT

Reverting the fix for 592473

I checked with mysql source code.
In Join::Optimize code, whenever where condition is optimized, number of
tables to be read this->table needs to be set to zero. This avoided
later code to go over join->join_tab and creating problem such as the bug.

1639. By PrafullaT

Refreshing from mainline branch.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:~drizzle-trunk/drizzle/development
This branch contains Public information 
Everyone can see this information.

Subscribers