diff options
author | heikki@hundin.mysql.fi <> | 2005-03-03 18:00:34 +0200 |
---|---|---|
committer | heikki@hundin.mysql.fi <> | 2005-03-03 18:00:34 +0200 |
commit | 07a0fdeb248667f8685705dea6bc8d96e9022a9b (patch) | |
tree | 6b4ec9267f0cdc1428f11a512f47b25817767e05 /innobase | |
parent | c93fcd19a5bc8eb2b34f19dd4c2b457fb9edaf94 (diff) | |
download | mariadb-git-07a0fdeb248667f8685705dea6bc8d96e9022a9b.tar.gz |
srv0start.c:
Work around the AIX 5.1 security patch ML7 problem in errno when it should be EEXIST
Diffstat (limited to 'innobase')
-rw-r--r-- | innobase/srv/srv0start.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/innobase/srv/srv0start.c b/innobase/srv/srv0start.c index fe05f07df21..44cf645f170 100644 --- a/innobase/srv/srv0start.c +++ b/innobase/srv/srv0start.c @@ -568,7 +568,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(FALSE) != OS_FILE_ALREADY_EXISTS) { + if (os_file_get_last_error(FALSE) != 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(FALSE) != 100 +#endif + ) { fprintf(stderr, "InnoDB: Error in creating or opening %s\n", name); @@ -728,7 +735,14 @@ open_or_create_data_files( OS_FILE_NORMAL, OS_DATA_FILE, &ret); if (ret == FALSE && os_file_get_last_error(FALSE) != - 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(FALSE) != 100 +#endif + ) { fprintf(stderr, "InnoDB: Error in creating or opening %s\n", name); |