1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Merge 10.4 into 10.5

This commit is contained in:
Marko Mäkelä
2022-04-06 10:06:39 +03:00
66 changed files with 680 additions and 556 deletions

View File

@ -27533,8 +27533,11 @@ bool mysql_explain_union(THD *thd, SELECT_LEX_UNIT *unit, select_result *result)
if (unit->is_unit_op() || unit->fake_select_lex)
{
ulonglong save_options= 0;
if (unit->union_needs_tmp_table() && unit->fake_select_lex)
{
save_options= unit->fake_select_lex->options;
unit->fake_select_lex->select_number= FAKE_SELECT_LEX_ID; // just for initialization
unit->fake_select_lex->type= unit_operation_text[unit->common_op()];
unit->fake_select_lex->options|= SELECT_DESCRIBE;
@ -27545,6 +27548,9 @@ bool mysql_explain_union(THD *thd, SELECT_LEX_UNIT *unit, select_result *result)
if (!is_pushed_union)
res= unit->exec();
}
if (unit->union_needs_tmp_table() && unit->fake_select_lex)
unit->fake_select_lex->options= save_options;
}
else
{