diff options
author | Igor Babaev <igor@askmonty.org> | 2018-01-29 23:51:04 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2018-01-29 23:56:28 -0800 |
commit | 775aa5542d33384665aa788960e078cff526e492 (patch) | |
tree | 72f9a839f0142317691cc1191b6fd858afeb8bc2 /sql/opt_split.cc | |
parent | 4808996b12c534042c357f011af43073299cf3e0 (diff) | |
download | mariadb-git-775aa5542d33384665aa788960e078cff526e492.tar.gz |
Fixed mdev-15017 Server crashes in in st_join_table::fix_splitting
Do not apply splitting for constant tables.
Diffstat (limited to 'sql/opt_split.cc')
-rw-r--r-- | sql/opt_split.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/opt_split.cc b/sql/opt_split.cc index ac2972f4264..efc5a5e5551 100644 --- a/sql/opt_split.cc +++ b/sql/opt_split.cc @@ -1118,11 +1118,11 @@ bool JOIN::fix_all_splittings_in_plan() { table_map prev_tables= 0; table_map all_tables= (1 << table_count) - 1; - for (uint tablenr=0 ; tablenr < table_count ; tablenr++) + for (uint tablenr= 0; tablenr < table_count; tablenr++) { POSITION *cur_pos= &best_positions[tablenr]; JOIN_TAB *tab= cur_pos->table; - if (tab->table->is_splittable()) + if (tablenr >= const_tables && tab->table->is_splittable()) { SplM_plan_info *spl_plan= cur_pos->spl_plan; if (tab->fix_splitting(spl_plan, all_tables & ~prev_tables)) |