• Igor Babaev's avatar
    Fixed bug mdev-11674. · 348ccb6f
    Igor Babaev authored
    1. The rows of a recursive CTE at some point may overflow
    the HEAP temporary table containing them. At this point
    the table is converted to a MyISAM temporary table and the
    new added rows are placed into this MyISAM table.
    A bug in the of select_union_recursive::send_data prevented
    the server from writing the row that caused the overflow
    into the temporary table used for the result of the iteration
    steps. This could lead, in particular,to a premature end
    of the iterations.
    2. The method TABLE::insert_all_rows_into() that was used
    to copy all rows of one temporary table into another
    did not take into account that the destination temporary
    table must be converted to a MyISAM table at some point.
    This patch fixed this problem. It also renamed the method
    into TABLE::insert_all_rows_into_tmp_table() and added
    an extra parameter needed for the conversion.
    348ccb6f
cte_recursive.test 32.5 KB