summaryrefslogtreecommitdiff
path: root/sql/opt_subselect.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2012-03-23 18:18:16 +0200
committerMichael Widenius <monty@askmonty.org>2012-03-23 18:18:16 +0200
commit8e825a2249440e7df0fce0123f6d543b09b29194 (patch)
treeeb3591d867f6b8fc81a8885c129f8a375af376bf /sql/opt_subselect.cc
parentde1765fb64dda7c610217c27a6012955f01d88e4 (diff)
downloadmariadb-git-8e825a2249440e7df0fce0123f6d543b09b29194.tar.gz
Fixes lp:941889 "JOIN constructors takes a long time in 5.3"
- Remove all references of MAX_TABLES from JOIN struct and make these dynamic - Updated Join_plan_state to allocate just as many elements as it's needed sql/opt_subselect.cc: Optimized version of Join_plan_state sql/sql_select.cc: Set join->positions and join->best_positions dynamicly Don't call update_virtual_fields() if table->vfield is not set. sql/sql_select.h: Remove all references of MAX_TABLES from JOIN struct and Join_plan_state and make these dynamic
Diffstat (limited to 'sql/opt_subselect.cc')
-rw-r--r--sql/opt_subselect.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc
index a65f53a86c2..6dcfff4d609 100644
--- a/sql/opt_subselect.cc
+++ b/sql/opt_subselect.cc
@@ -4961,7 +4961,8 @@ bool JOIN::choose_subquery_plan(table_map join_tables)
DBUG_ASSERT(!in_to_exists_where || in_to_exists_where->fixed);
DBUG_ASSERT(!in_to_exists_having || in_to_exists_having->fixed);
- Join_plan_state save_qep; /* The original QEP of the subquery. */
+ /* The original QEP of the subquery. */
+ Join_plan_state save_qep(table_count);
/*
Compute and compare the costs of materialization and in-exists if both