mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 04:22:27 +01:00
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
This commit is contained in:
parent
969be90f71
commit
afc8527360
2 changed files with 17 additions and 11 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue