summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2005-03-03 17:46:56 +0200
committerunknown <heikki@hundin.mysql.fi>2005-03-03 17:46:56 +0200
commitafc8527360149323c2f2d34633ec67d10135b224 (patch)
treef964eb2feec2b684a86a85cf144396035ab8fa54
parent969be90f71894240a048e26c8ea7d0cbbb5d888b (diff)
downloadmariadb-git-afc8527360149323c2f2d34633ec67d10135b224.tar.gz
srv0start.c:
Work around the AIX 5.1 ML7 patch problem in errno at a higher level, in srv0start.c os0file.c: Revert the AIX patch here innobase/os/os0file.c: Revert the AIX patch here innobase/srv/srv0start.c: Work around the AIX 5.1 ML7 patch problem in errno at a higher level, in srv0start.c
-rw-r--r--innobase/os/os0file.c9
-rw-r--r--innobase/srv/srv0start.c19
2 files changed, 17 insertions, 11 deletions
diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c
index 334452e09ae..cadf1c0385f 100644
--- a/innobase/os/os0file.c
+++ b/innobase/os/os0file.c
@@ -291,15 +291,6 @@ 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);
}
diff --git a/innobase/srv/srv0start.c b/innobase/srv/srv0start.c
index 9baa86234a0..53ef97dc42b 100644
--- a/innobase/srv/srv0start.c
+++ b/innobase/srv/srv0start.c
@@ -540,7 +540,14 @@ open_or_create_log_file(
files[i] = os_file_create(name, OS_FILE_CREATE, OS_FILE_NORMAL,
OS_LOG_FILE, &ret);
if (ret == FALSE) {
- if (os_file_get_last_error() != OS_FILE_ALREADY_EXISTS) {
+ if (os_file_get_last_error() != OS_FILE_ALREADY_EXISTS
+#ifdef UNIV_AIX
+ /* AIX 5.1 after security patch ML7 may have errno set
+ to 0 here, which causes our function to return 100;
+ work around that AIX problem */
+ && os_file_get_last_error() != 100
+#endif
+ ) {
fprintf(stderr,
"InnoDB: Error in creating or opening %s\n", name);
@@ -712,7 +719,15 @@ open_or_create_data_files(
if (ret == FALSE) {
if (srv_data_file_is_raw_partition[i] != SRV_OLD_RAW
&& os_file_get_last_error() !=
- OS_FILE_ALREADY_EXISTS) {
+ OS_FILE_ALREADY_EXISTS
+#ifdef UNIV_AIX
+ /* AIX 5.1 after security patch ML7 may have
+ errno set to 0 here, which causes our function
+ to return 100; work around that AIX problem */
+ && os_file_get_last_error() != 100
+#endif
+ ) {
+
fprintf(stderr,
"InnoDB: Error in creating or opening %s\n",
name);