Skip to content

Commit

Permalink
fix(tianmu): fix mysqld crash when query where JOIN::propagate_depen…
Browse files Browse the repository at this point in the history
…dencies (#1628)
  • Loading branch information
adofsauron authored and mergify[bot] committed Apr 28, 2023
1 parent 70f15f1 commit 587d276
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion storage/tianmu/core/query_compile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,9 @@ QueryRouteTo Query::Compile(CompiledQuery *compiled_query, SELECT_LEX *selects_l
List_iterator_fast<Item> li(*fields);
for (Item *item = li++; item; item = li++) {
if ((item->type() == Item::Type::FUNC_ITEM) &&
(down_cast<Item_func *>(item)->functype() == Item_func::Functype::FUNC_SP) && (!sl->is_distinct())) {
((down_cast<Item_func *>(item)->functype() == Item_func::Functype::FUNC_SP) ||
(down_cast<Item_func *>(item)->functype() == Item_func::Functype::SUSERVAR_FUNC)) &&
(!sl->is_distinct())) {
sl->add_active_options(SELECT_DISTINCT);
sl->join->select_distinct = TRUE;
use_tmp_when_no_join = true;
Expand Down

0 comments on commit 587d276

Please sign in to comment.