mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fix for MDEV-8321, MDEV-6223
EXPLAIN INSERT ... SELECT tried to use SELECT's execution path. This caused a collection of problems: - SELECT_DESCRIBE flag was not put into select_lex->options, which means it was not in JOIN::select_options either (except for the first member of the UNION). - This caused UNION members to be executed. They would attempt to write join output rows to the output. - (Actual cause of the crash) second join sibling would call result->send_eof() when finished execution. Then, Explain_query::print_explain would attempt to write to query output again, and cause an assertion due to non-empty query output.
This commit is contained in:
@ -286,8 +286,6 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
|
||||
{
|
||||
if (!(tmp_result= union_result= new select_union))
|
||||
goto err;
|
||||
if (describe)
|
||||
tmp_result= sel_result;
|
||||
}
|
||||
else
|
||||
tmp_result= sel_result;
|
||||
|
Reference in New Issue
Block a user