mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-33165 Incorrect result interceptor passed to mysql_explain_union()
Statements affect by this bug are all SQL statements that 1) prefixed with "EXPLAIN" 2) have a lower level join structure created for a union subquery. A bug in select_describe() passed an incorrect "result" object to mysql_explain_union(), resulting in unpredictable behaviour and out of context calls. Reviewed by: Oleksandr Byelkin, sanja@mariadb.com
This commit is contained in:
@ -27953,7 +27953,6 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order,
|
||||
bool distinct,const char *message)
|
||||
{
|
||||
THD *thd=join->thd;
|
||||
select_result *result=join->result;
|
||||
DBUG_ENTER("select_describe");
|
||||
|
||||
if (join->select_lex->pushdown_select)
|
||||
@ -27988,7 +27987,7 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order,
|
||||
|
||||
if (unit->explainable())
|
||||
{
|
||||
if (mysql_explain_union(thd, unit, result))
|
||||
if (mysql_explain_union(thd, unit, unit->result))
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user