diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2016-06-22 11:17:44 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2016-07-22 17:35:39 +0200 |
commit | a52d3aa831454aa2e7dd4dfde9c65d4b87532caa (patch) | |
tree | 3f6d0dcc44e5e0d31b96b98780abd49fcaf5da70 /sql/sql_select.h | |
parent | e6a64e8f0ea36f12bd24ba906aa1f4e2e367a8e0 (diff) | |
download | mariadb-git-a52d3aa831454aa2e7dd4dfde9c65d4b87532caa.tar.gz |
MDEV-10045: Server crashes in Time_and_counter_tracker::incr_loops
Do not set 'optimized' flag until whole optimization procedure is finished.
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r-- | sql/sql_select.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h index 89ee63e87b0..dfa96f1c81c 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -1290,7 +1290,8 @@ public: enum join_optimization_state { NOT_OPTIMIZED=0, OPTIMIZATION_IN_PROGRESS=1, OPTIMIZATION_DONE=2}; - bool optimized; ///< flag to avoid double optimization in EXPLAIN + // state of JOIN optimization + enum join_optimization_state optimization_state; bool initialized; ///< flag to avoid double init_execution calls Explain_select *explain; @@ -1378,7 +1379,7 @@ public: ref_pointer_array= items0= items1= items2= items3= 0; ref_pointer_array_size= 0; zero_result_cause= 0; - optimized= 0; + optimization_state= JOIN::NOT_OPTIMIZED; have_query_plan= QEP_NOT_PRESENT_YET; initialized= 0; cleaned= 0; |