Skip to content

Commit

Permalink
fix(core): union crashed #1690
Browse files Browse the repository at this point in the history
[summary]
when adapting from 5.7 to 8.0:
we made a mistake on `unit_for_union->item_list` to `unit_for_union->get_fields_list()`
  • Loading branch information
hustjieke committed May 17, 2023
1 parent 08745a5 commit fbae81f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions storage/tianmu/core/engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2417,11 +2417,12 @@ QueryRouteTo Engine::Execute(THD *thd, LEX *lex, Query_result *result_output, Qu
}
// stonedb8 start
if (export_file_name)
sender.reset(new ResultExportSender(thd, result_output, *unit_for_union->get_field_list()));
sender.reset(new ResultExportSender(thd, result_output, unit_for_union->item_list));
else
sender.reset(new ResultSender(thd, result_output, *unit_for_union->get_field_list()));
sender.reset(new ResultSender(thd, result_output, unit_for_union->item_list));
} else {
if (export_file_name)
// in 5.7, selects_list->item_list, in 8.0, we use selects_list->get_fields_list()?
sender.reset(new ResultExportSender(thd, result_output, *selects_list->get_fields_list()));
else
sender.reset(new ResultSender(thd, result_output, *selects_list->get_fields_list()));
Expand Down

0 comments on commit fbae81f

Please sign in to comment.