Commit 00d84ead authored by Oleksandr Byelkin's avatar Oleksandr Byelkin

MDEV-10045: Server crashes in Time_and_counter_tracker::incr_loops

Do not set 'optimized' flag until whole optimization procedure is finished.
parent 7d115e73
...@@ -1073,6 +1073,7 @@ JOIN::optimize_inner() ...@@ -1073,6 +1073,7 @@ JOIN::optimize_inner()
DBUG_ENTER("JOIN::optimize"); DBUG_ENTER("JOIN::optimize");
do_send_rows = (unit->select_limit_cnt) ? 1 : 0; do_send_rows = (unit->select_limit_cnt) ? 1 : 0;
DEBUG_SYNC(thd, "before_join_optimize"); DEBUG_SYNC(thd, "before_join_optimize");
THD_STAGE_INFO(thd, stage_optimizing); THD_STAGE_INFO(thd, stage_optimizing);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment