MDEV-10045: Server crashes in Time_and_counter_tracker::incr_loops

Do not set 'optimized' flag until whole optimization procedure is finished.
This commit is contained in:
Oleksandr Byelkin 2016-06-22 11:17:44 +02:00
parent 7d115e73b8
commit 00d84eada2

View file

@ -1073,6 +1073,7 @@ JOIN::optimize_inner()
DBUG_ENTER("JOIN::optimize");
do_send_rows = (unit->select_limit_cnt) ? 1 : 0;
DEBUG_SYNC(thd, "before_join_optimize");
THD_STAGE_INFO(thd, stage_optimizing);