Browse Source

MDEV-13226 Server crashes when tmpdir runs out of space

There was a missing test in CTE handling if creating a temporary table
failed (in this case as a result of out of space). This caused a table
handler to be used even if it was not allocated.
pull/397/head
Monty 8 years ago
parent
commit
2e9b55f763
  1. 3
      sql/sql_select.cc

3
sql/sql_select.cc

@ -26304,7 +26304,8 @@ AGGR_OP::put_record(bool end_of_records)
{
// Lasy tmp table creation/initialization
if (!join_tab->table->file->inited)
prepare_tmp_table();
if (prepare_tmp_table())
return NESTED_LOOP_ERROR;
enum_nested_loop_state rc= (*write_func)(join_tab->join, join_tab,
end_of_records);
return rc;

Loading…
Cancel
Save