Loading sql/sp_head.cc +0 −11 Original line number Diff line number Diff line Loading @@ -1827,17 +1827,6 @@ sp_lex_keeper::reset_lex_and_exec_core(THD *thd, uint *nextp, thd->query_id= next_query_id(); VOID(pthread_mutex_unlock(&LOCK_thread_count)); /* FIXME. Resetting statement (and using it) is not reentrant, thus recursive functions which try to use the same LEX twice will crash server. We should prevent such situations by tracking if LEX is already in use and throwing error about unallowed recursion if needed. OTOH it is nice to allow recursion in cases when LEX is not really used (e.g. in mathematical functions), so such tracking should be implemented at the same time as ability not to store LEX for instruction if it is not really used. */ if (thd->prelocked_mode == NON_PRELOCKED) { /* Loading sql/sql_select.h +1 −3 Original line number Diff line number Diff line Loading @@ -230,7 +230,7 @@ class JOIN :public Sql_alloc /* Is set if we have a GROUP BY and we have ORDER BY on a constant. */ bool skip_sort_order; bool need_tmp, hidden_group_fields, buffer_result; bool need_tmp, hidden_group_fields; DYNAMIC_ARRAY keyuse; Item::cond_result cond_value; List<Item> all_fields; // to store all fields that used in query Loading Loading @@ -299,8 +299,6 @@ class JOIN :public Sql_alloc skip_sort_order= 0; need_tmp= 0; hidden_group_fields= 0; /*safety*/ buffer_result= test(select_options & OPTION_BUFFER_RESULT) && !test(select_options & OPTION_FOUND_ROWS); error= 0; select= 0; return_tab= 0; Loading Loading
sql/sp_head.cc +0 −11 Original line number Diff line number Diff line Loading @@ -1827,17 +1827,6 @@ sp_lex_keeper::reset_lex_and_exec_core(THD *thd, uint *nextp, thd->query_id= next_query_id(); VOID(pthread_mutex_unlock(&LOCK_thread_count)); /* FIXME. Resetting statement (and using it) is not reentrant, thus recursive functions which try to use the same LEX twice will crash server. We should prevent such situations by tracking if LEX is already in use and throwing error about unallowed recursion if needed. OTOH it is nice to allow recursion in cases when LEX is not really used (e.g. in mathematical functions), so such tracking should be implemented at the same time as ability not to store LEX for instruction if it is not really used. */ if (thd->prelocked_mode == NON_PRELOCKED) { /* Loading
sql/sql_select.h +1 −3 Original line number Diff line number Diff line Loading @@ -230,7 +230,7 @@ class JOIN :public Sql_alloc /* Is set if we have a GROUP BY and we have ORDER BY on a constant. */ bool skip_sort_order; bool need_tmp, hidden_group_fields, buffer_result; bool need_tmp, hidden_group_fields; DYNAMIC_ARRAY keyuse; Item::cond_result cond_value; List<Item> all_fields; // to store all fields that used in query Loading Loading @@ -299,8 +299,6 @@ class JOIN :public Sql_alloc skip_sort_order= 0; need_tmp= 0; hidden_group_fields= 0; /*safety*/ buffer_result= test(select_options & OPTION_BUFFER_RESULT) && !test(select_options & OPTION_FOUND_ROWS); error= 0; select= 0; return_tab= 0; Loading