• gkodinov/kgeorge@magare.gmz's avatar
    Bug #30377: EXPLAIN loses last_query_cost when used with UNION · cfaa0983
    gkodinov/kgeorge@magare.gmz authored
    Currently the Last_query_cost session status variable shows
    only the cost of a single flat subselect. For complex queries
    (with subselects or unions etc) Last_query_cost is not valid
    as it was showing the cost for the last optimized subselect.
    Fixed by reseting to zero Last_query_cost when the complete
    cost of the query cannot be determined.
    Last_query_cost will be non-zero only for single flat queries.
    cfaa0983
status.test 4.42 KB