summaryrefslogtreecommitdiff
path: root/sql/opt_split.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2018-04-17 23:39:40 -0700
committerIgor Babaev <igor@askmonty.org>2018-04-17 23:39:40 -0700
commitcff60be7fe159fdcb2517ce8441610ad512aa7d0 (patch)
treefdc0be8e7d3d8371021c196f439f3aeb21bdb8e8 /sql/opt_split.cc
parentbb5f4967f54d3f458bec86fb1845405a0a88bc0f (diff)
downloadmariadb-git-cff60be7fe159fdcb2517ce8441610ad512aa7d0.tar.gz
MDEV-15899 Server crashes in st_join_table::is_inner_table_of_outer_join
The crash happened because JOIN::check_for_splittable_materialized() called by mistake the function JOIN_TAB::is_inner_table_of_outer_join() instead of the function TABLE_LIST::is_inner_table_of_outer_join(). The former cannot be called before the call of make_outerjoin_info().
Diffstat (limited to 'sql/opt_split.cc')
-rw-r--r--sql/opt_split.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/opt_split.cc b/sql/opt_split.cc
index 063ca9fd940..b81556e56a2 100644
--- a/sql/opt_split.cc
+++ b/sql/opt_split.cc
@@ -352,8 +352,9 @@ bool JOIN::check_for_splittable_materialized()
Field *ord_field= ((Item_field *) (ord_item->real_item()))->field;
- JOIN_TAB *tab= ord_field->table->reginfo.join_tab;
- if (tab->is_inner_table_of_outer_join())
+ /* Ignore fields from of inner tables of outer joins */
+ TABLE_LIST *tbl= ord_field->table->pos_in_table_list;
+ if (tbl->is_inner_table_of_outer_join())
continue;
List_iterator<Item> li(fields_list);