diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2023-01-15 11:05:26 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2023-01-15 11:05:26 +0200 |
commit | 1b671ae3137944ac3e93e83edd744ac9cacb732f (patch) | |
tree | dcbaca23b5feef89aa2f1ce9c1e1b0bc0c8fb058 /sql/sql_select.cc | |
parent | 3386b309756adba6b9633ad18c4e0575c7304cfe (diff) | |
parent | 179c2833721292a918280b7d114d94d81020105b (diff) | |
download | mariadb-git-bb-10.6-merge-galera.tar.gz |
Merge 10.5 into 10.6bb-10.6-merge-galera
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 3c2be0b1c8b..c6253614889 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -2476,7 +2476,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) { @@ -5864,7 +5864,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, |