summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2009-12-27 23:24:22 +0300
committerSergey Petrunya <psergey@askmonty.org>2009-12-27 23:24:22 +0300
commit1a490f2da492f2e5698b244341696c6dd9d8db4c (patch)
treea009a5bba2fef670151ddb17028b4933c844efba
parent18fc4a77531a06c68ac325a53f1ad09bb1e68957 (diff)
downloadmariadb-git-1a490f2da492f2e5698b244341696c6dd9d8db4c.tar.gz
DS-MRR backport: fix buildbot valgrind failures:
- Do call update_used_tables() for new conditions obtained when adding outer join's triggered conditions. Correct values of used_tables() are now needed for condition pushdown. - Update test results mysql-test/suite/pbxt/r/join_outer.result: DS-MRR backport: - Update test results sql/sql_select.cc: DS-MRR backport: fix buildbot valgrind failures: - Do call update_used_tables() for new conditions obtained when adding outer join's triggered conditions. Correct values of used_tables() are now needed for condition pushdown.
-rw-r--r--mysql-test/suite/pbxt/r/join_outer.result2
-rw-r--r--sql/sql_select.cc3
2 files changed, 4 insertions, 1 deletions
diff --git a/mysql-test/suite/pbxt/r/join_outer.result b/mysql-test/suite/pbxt/r/join_outer.result
index e08c3b2a2e2..e6ae055d811 100644
--- a/mysql-test/suite/pbxt/r/join_outer.result
+++ b/mysql-test/suite/pbxt/r/join_outer.result
@@ -886,7 +886,7 @@ EXPLAIN SELECT * FROM t0, t1 LEFT JOIN (t2,t3) ON a1=5 WHERE a0=a1 AND a0=1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t0 const PRIMARY PRIMARY 4 const 1 Using index
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 Using index
-1 SIMPLE t2 ALL NULL NULL NULL NULL 2
+1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using where
1 SIMPLE t3 ALL NULL NULL NULL NULL 2
drop table t1,t2;
create table t1 (a int, b int);
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 302a2cf0cc6..9dff93c584c 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -6201,6 +6201,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
cond_tab->set_select_cond(new_cond, __LINE__);
if (!cond_tab->select_cond)
DBUG_RETURN(1);
+ cond_tab->select_cond->update_used_tables();
cond_tab->select_cond->quick_fix_field();
}
}
@@ -6482,6 +6483,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
if (!cond_tab->select_cond)
DBUG_RETURN(1);
cond_tab->select_cond->quick_fix_field();
+ cond_tab->select_cond->update_used_tables();
if (cond_tab->select)
cond_tab->select->cond= cond_tab->select_cond;
}
@@ -6537,6 +6539,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
(ulong)cond_tab->select_cond));
if (!cond_tab->select_cond)
DBUG_RETURN(1);
+ cond_tab->select_cond->update_used_tables();
cond_tab->select_cond->quick_fix_field();
if (cond_tab->select)
cond_tab->select->cond= cond_tab->select_cond;