diff options
author | Monty <monty@mariadb.org> | 2017-07-01 12:00:02 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2017-07-01 14:26:42 +0300 |
commit | 2e9b55f763441b1879c4d9980d25f73a43949115 (patch) | |
tree | 90ec74ee697a07da623223fde1c877be03c8ae9b | |
parent | c436338d9d535aac7692d27ec1dc068e9ce6c9a9 (diff) | |
download | mariadb-git-2e9b55f763441b1879c4d9980d25f73a43949115.tar.gz |
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.
-rw-r--r-- | sql/sql_select.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 540271bc961..2c7ccbf3e2b 100644 --- a/sql/sql_select.cc +++ b/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; |