diff options
author | unknown <heikki@hundin.mysql.fi> | 2005-03-03 17:20:05 +0200 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2005-03-03 17:20:05 +0200 |
commit | 969be90f71894240a048e26c8ea7d0cbbb5d888b (patch) | |
tree | 64a2b84a3e58cfe4a273619bb72c1c969e80f5af /innobase | |
parent | 61ffbc31ae2172d3282288bc8c4520ea493c92ae (diff) | |
download | mariadb-git-969be90f71894240a048e26c8ea7d0cbbb5d888b.tar.gz |
os0file.c:
AIX 5.1 after security patch ML7 seems to contain a bug that instead of EEXIST it sets errno to 0 if a file creation fails because the file already exists. Work around that bug by interpreting errno 0 in AIX as EEXIST.
innobase/os/os0file.c:
AIX 5.1 after security patch ML7 seems to contain a bug that instead of EEXIST it sets errno to 0 if a file creation fails because the file already exists. Work around that bug by interpreting errno 0 in AIX as EEXIST.
Diffstat (limited to 'innobase')
-rw-r--r-- | innobase/os/os0file.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c index cadf1c0385f..334452e09ae 100644 --- a/innobase/os/os0file.c +++ b/innobase/os/os0file.c @@ -291,6 +291,15 @@ os_file_get_last_error(void) return(OS_FILE_NOT_FOUND); } else if (err == EEXIST) { return(OS_FILE_ALREADY_EXISTS); +#ifdef UNIV_AIX + } else if (err == 0) { + fprintf(stderr, +"InnoDB: errno is 0. Since AIX 5.1 after security patch ML7 erroneously\n" +"InnoDB: sets errno to 0 when it should be EEXIST, we assume that the real\n" +"InnoDB: error here was EEXIST.\n"); + + return(OS_FILE_ALREADY_EXISTS); +#endif } else { return(100 + err); } |