summaryrefslogtreecommitdiff
path: root/storage/innobase/os
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@sun.com>2009-11-05 16:29:58 +0400
committerSergey Vojtovich <svoj@sun.com>2009-11-05 16:29:58 +0400
commitced8719400333994131aac1662e95590c78271b7 (patch)
tree790d2bb16dfd9d0429e4a6ebd5117195a7c301a8 /storage/innobase/os
parent3e2c9aac11a95d8cbb61e1937e4ebe18c7e86698 (diff)
parent0212e736136432f8d0442703b55220c0bd9c505e (diff)
downloadmariadb-git-ced8719400333994131aac1662e95590c78271b7.tar.gz
Merge of innodb-zip-ss6129 from 5.1 to mysql-trunk.
Diffstat (limited to 'storage/innobase/os')
-rw-r--r--storage/innobase/os/os0file.c17
-rw-r--r--storage/innobase/os/os0proc.c1
2 files changed, 18 insertions, 0 deletions
diff --git a/storage/innobase/os/os0file.c b/storage/innobase/os/os0file.c
index a1d3bad2add..0cb76d1796f 100644
--- a/storage/innobase/os/os0file.c
+++ b/storage/innobase/os/os0file.c
@@ -832,6 +832,23 @@ next_file:
ret = stat(full_path, &statinfo);
if (ret) {
+
+ if (errno == ENOENT) {
+ /* readdir() returned a file that does not exist,
+ it must have been deleted in the meantime. Do what
+ would have happened if the file was deleted before
+ readdir() - ignore and go to the next entry.
+ If this is the last entry then info->name will still
+ contain the name of the deleted file when this
+ function returns, but this is not an issue since the
+ caller shouldn't be looking at info when end of
+ directory is returned. */
+
+ ut_free(full_path);
+
+ goto next_file;
+ }
+
os_file_handle_error_no_exit(full_path, "stat");
ut_free(full_path);
diff --git a/storage/innobase/os/os0proc.c b/storage/innobase/os/os0proc.c
index a0ea9a1b258..48922886f23 100644
--- a/storage/innobase/os/os0proc.c
+++ b/storage/innobase/os/os0proc.c
@@ -97,6 +97,7 @@ os_mem_alloc_large(
fprintf(stderr, "InnoDB: HugeTLB: Warning: Failed to"
" attach shared memory segment, errno %d\n",
errno);
+ ptr = NULL;
}
/* Remove the shared memory segment so that it will be