Skip to content

Commit

Permalink
feat(StoneDB 8.0): Query_block->braces is deleted by MySQL 8.0. (#593)
Browse files Browse the repository at this point in the history
[summary]
1 SELECT_LEX->braces is used in MySQL5.7, at optimize part, but deleted in MySQL 8.0
2 in MySQL 8.0, use Query_expression->is_union() instead of SELECT_LEX->braces
  • Loading branch information
DandreChen authored and mergify[bot] committed Sep 28, 2022
1 parent 4769e0f commit e38e73e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion storage/tianmu/core/engine_execute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ int Query_expression::optimize_for_tianmu(THD *thd) {
// When using braces, SQL_CALC_FOUND_ROWS affects the whole query:
// we don't calculate found_rows() per union part.
// Otherwise, SQL_CALC_FOUND_ROWS should be done on all sub parts.
sl->join->select_options = (select_limit_cnt == HA_POS_ERROR /*|| sl->braces*/) // stonedb8 TODO
sl->join->select_options = (select_limit_cnt == HA_POS_ERROR || thd->lex->unit->is_union())
? sl->active_options() & ~OPTION_FOUND_ROWS
: sl->active_options() | found_rows_for_union;
saved_error = sl->join->optimize(1);
Expand Down

0 comments on commit e38e73e

Please sign in to comment.