diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2015-03-09 18:21:48 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2015-03-09 18:33:25 +0200 |
commit | a7fd11b31d52b62ef7b61783bb83a5e62271307b (patch) | |
tree | 979131c0d6ce96f32c4d56f87008d54e1bdeef42 /storage/xtradb/os | |
parent | ec16d1b62fb08b4dd3aa415a9bf717b5039a56cc (diff) | |
download | mariadb-git-a7fd11b31d52b62ef7b61783bb83a5e62271307b.tar.gz |
MDEV-7685: MariaDB - server crashes when inserting more rows than
available space on disk
Add error handling when disk full situation happens and
intentionally bring server down with stacktrace because
on all cases InnoDB can't continue anyway.
Diffstat (limited to 'storage/xtradb/os')
-rw-r--r-- | storage/xtradb/os/os0file.cc | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/storage/xtradb/os/os0file.cc b/storage/xtradb/os/os0file.cc index 112581442ab..a88c344a6ee 100644 --- a/storage/xtradb/os/os0file.cc +++ b/storage/xtradb/os/os0file.cc @@ -716,6 +716,7 @@ os_file_handle_error_cond_exit( fflush(stderr); + ut_error; return(FALSE); case OS_FILE_AIO_RESOURCES_RESERVED: @@ -4735,7 +4736,7 @@ os_aio_func( mode = mode & (~OS_AIO_SIMULATED_WAKE_LATER); DBUG_EXECUTE_IF("ib_os_aio_func_io_failure_28", - mode = OS_AIO_SYNC; os_has_said_disk_full = TRUE;); + mode = OS_AIO_SYNC; os_has_said_disk_full = FALSE;); if (mode == OS_AIO_SYNC) { ibool ret; @@ -4751,7 +4752,11 @@ os_aio_func( ret = os_file_write(name, file, buf, offset, n); DBUG_EXECUTE_IF("ib_os_aio_func_io_failure_28", - os_has_said_disk_full = TRUE; ret = 0; errno = 28;); + os_has_said_disk_full = FALSE; ret = 0; errno = 28;); + + if (!ret) { + os_file_handle_error_cond_exit(name, "os_file_write_func", TRUE, FALSE); + } } if (!ret) { @@ -5582,7 +5587,12 @@ consecutive_loop: aio_slot->offset, total_len); DBUG_EXECUTE_IF("ib_os_aio_func_io_failure_28", - os_has_said_disk_full = TRUE; ret = 0; errno = 28;); + os_has_said_disk_full = FALSE; ret = 0; errno = 28;); + + if (!ret) { + os_file_handle_error_cond_exit(aio_slot->name, "os_file_write_func", TRUE, FALSE); + } + } else { ret = os_file_read( aio_slot->file, combined_buf, |