• Oleg Smirnov's avatar
    MDEV-27699 ANALYZE FORMAT=JSON fields are incorrect for UNION ALL queries · 7498978e
    Oleg Smirnov authored
    UNION ALL queries are a subject of optimization introduced in MDEV-334
    when creation of a temporary table is skipped.
    While there is a check for this optimization in Explain_union::print_explain()
    there was no such in Explain_union::print_explain_json(). This resulted in
    printing irrelevant data like:
      "union_result": {
        "table_name": "<union2,3>",
        "access_type": "ALL",
        "r_loops": 0,
        "r_rows": null
    in case when creation of the temporary table was actually optimized out.
    This commits adds a check whether the temporary table was actually created
    during the UNION ALL processing and eliminates printing of the irrelevant data.
    7498978e
derived_cond_pushdown.result 551 KB