mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Fixed bug mdev-11674.
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.
This commit is contained in:
@ -969,7 +969,10 @@ bool TABLE_LIST::fill_recursive(THD *thd)
|
||||
if (!rc)
|
||||
{
|
||||
TABLE *src= with->rec_result->table;
|
||||
rc =src->insert_all_rows_into(thd, table, true);
|
||||
rc =src->insert_all_rows_into_tmp_table(thd,
|
||||
table,
|
||||
&with->rec_result->tmp_table_param,
|
||||
true);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
Reference in New Issue
Block a user