summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2023-01-18 16:45:59 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2023-01-18 16:45:59 +0100
commit45087dd0b349062d4924ef932696dc674f10c396 (patch)
tree83f557ba3c386aae6c59992e1587315eb7a61660 /sql/sql_select.cc
parent6ffe9ad0d4244a86476fab1485145c0c91871579 (diff)
parent08d4968404689331f8b89c185b92603dca044661 (diff)
downloadmariadb-git-45087dd0b349062d4924ef932696dc674f10c396.tar.gz
Merge branch '10.9' into 10.10
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 5b3d65d8315..ae200d924bd 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -435,7 +435,7 @@ void JOIN::init(THD *thd_arg, List<Item> &fields_arg,
table_count= 0;
top_join_tab_count= 0;
const_tables= 0;
- const_table_map= found_const_table_map= 0;
+ const_table_map= found_const_table_map= not_usable_rowid_map= 0;
aggr_tables= 0;
eliminated_tables= 0;
join_list= 0;
@@ -2506,7 +2506,7 @@ JOIN::optimize_inner()
/*
We have to remove constants and duplicates from group_list before
calling make_join_statistics() as this may call get_best_group_min_max()
- which needs a simplfied group_list.
+ which needs a simplified group_list.
*/
if (group_list && table_count == 1)
{
@@ -5915,7 +5915,7 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list,
caller to abort with a zero row result.
*/
TABLE_LIST *emb= s->table->pos_in_table_list->embedding;
- if (emb && !emb->sj_on_expr)
+ if (emb && !emb->sj_on_expr && !*s->on_expr_ref)
{
/* Mark all tables in a multi-table join nest as const */
mark_join_nest_as_const(join, emb, &found_const_table_map,