summaryrefslogtreecommitdiff
path: root/storage/xtradb/os
diff options
context:
space:
mode:
authorJan Lindström <jplindst@mariadb.org>2015-02-13 11:49:31 +0200
committerJan Lindström <jplindst@mariadb.org>2015-02-13 11:49:31 +0200
commit454beee5fbd9da8e87a54b46ea716679693361bd (patch)
tree9ef1493fdb62e1526189624051b93b332ae92113 /storage/xtradb/os
parent356ae629f0b8ecd5e4b277bdaedf6d55ce09a603 (diff)
downloadmariadb-git-454beee5fbd9da8e87a54b46ea716679693361bd.tar.gz
MDEV-6288 :Innodb causes server crash after disk full, then can't ALTER TABLE any more
Fix try to avoid unnecessary crashes when disk full situation is reached on alter table.
Diffstat (limited to 'storage/xtradb/os')
-rw-r--r--storage/xtradb/os/os0file.cc23
1 files changed, 8 insertions, 15 deletions
diff --git a/storage/xtradb/os/os0file.cc b/storage/xtradb/os/os0file.cc
index 691054a7e47..112581442ab 100644
--- a/storage/xtradb/os/os0file.cc
+++ b/storage/xtradb/os/os0file.cc
@@ -4735,7 +4735,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;);
+ mode = OS_AIO_SYNC; os_has_said_disk_full = TRUE;);
if (mode == OS_AIO_SYNC) {
ibool ret;
@@ -4744,20 +4744,15 @@ os_aio_func(
if (type == OS_FILE_READ) {
ret = os_file_read_func(file, buf, offset, n, trx);
- }
- else {
+ } else {
ut_ad(!srv_read_only_mode);
ut_a(type == OS_FILE_WRITE);
ret = os_file_write(name, file, buf, offset, n);
- }
- DBUG_EXECUTE_IF("ib_os_aio_func_io_failure_28",
- os_has_said_disk_full = FALSE;);
- DBUG_EXECUTE_IF("ib_os_aio_func_io_failure_28",
- ret = 0;);
- DBUG_EXECUTE_IF("ib_os_aio_func_io_failure_28",
- errno = 28;);
+ DBUG_EXECUTE_IF("ib_os_aio_func_io_failure_28",
+ os_has_said_disk_full = TRUE; ret = 0; errno = 28;);
+ }
if (!ret) {
fprintf(stderr, "FAIL");
@@ -5585,17 +5580,15 @@ consecutive_loop:
ret = os_file_write(
aio_slot->name, aio_slot->file, combined_buf,
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;);
} else {
ret = os_file_read(
aio_slot->file, combined_buf,
aio_slot->offset, total_len);
}
- if (aio_slot->type == OS_FILE_WRITE) {
- DBUG_EXECUTE_IF("ib_os_aio_func_io_failure_28_2",
- os_has_said_disk_full = FALSE; ret = 0; errno = 28;);
- }
-
srv_set_io_thread_op_info(global_segment, "file i/o done");
if (aio_slot->type == OS_FILE_READ && n_consecutive > 1) {