1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-34150 Assertion failure in Diagnostics_area::set_error_status upon binary logging hitting tmp space limit

- Moved writing to binlog_cache from close_thread_tables() to
  binlog_commit().
- In select_create() delete cached row events instead of flushing them
  to disk. This was done to avoid possible disk write error in this code.
This commit is contained in:
Monty
2024-05-17 13:42:55 +03:00
committed by Sergei Golubchik
parent fcb3183479
commit 381e9adb6c
8 changed files with 81 additions and 45 deletions

View File

@ -5342,14 +5342,15 @@ void select_create::abort_result_set()
thd->transaction->stmt.modified_non_trans_table= FALSE;
thd->variables.option_bits= save_option_bits;
/* possible error of writing binary log is ignored deliberately */
(void) thd->binlog_flush_pending_rows_event(TRUE, TRUE);
if (table)
{
bool tmp_table= table->s->tmp_table;
bool table_creation_was_logged= (!tmp_table ||
table->s->table_creation_was_logged);
/* CREATE SELECT failed. Remove all row events and clear caches */
thd->binlog_remove_rows_events();
if (tmp_table)
{
DBUG_ASSERT(saved_tmp_table_share);