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

MDEV-25682 Explain shows an execution plan different from actually executed

If a select query contained an ORDER BY clause that followed a LIMIT clause
or an ORDER BY clause or ORDER BY with LIMIT the EXPLAIN output for the
query showed an execution plan different from that was actually executed.

Approved by Roman Nozdrin <roman.nozdrin@mariadb.com>
This commit is contained in:
Igor Babaev
2021-06-07 15:08:18 -07:00
parent b1b4d67bcd
commit 8149e4d0a1
4 changed files with 44 additions and 1 deletions

View File

@ -26370,7 +26370,7 @@ bool mysql_explain_union(THD *thd, SELECT_LEX_UNIT *unit, select_result *result)
sl->options|= SELECT_DESCRIBE;
}
if (unit->is_unit_op())
if (unit->is_unit_op() || unit->fake_select_lex)
{
if (unit->union_needs_tmp_table() && unit->fake_select_lex)
{