• sergefp@mysql.com's avatar
    BUG#29582: huge memory consumption with union, subselect, joins: · c37f9b9e
    sergefp@mysql.com authored
    - Don't call mysql_select() several times for the select that enumerates
      a temporary table with the results of the UNION. Making this call for
      every subquery execution caused O(#enumerated-rows-in-the-outer-query) 
      memory allocations.
    - Instead, call join->reinit() and join->exec(), and
      = disable constant table detection for such joins,  
      = provide special handling for table-less constant subqueries.
    c37f9b9e
sql_select.h 21.6 KB