Commit 1609fcd3 authored by unknown's avatar unknown

os0file.c More precise error message number

ut0dbg.h	Changed Innobase->InnoDB
os0file.c	InnoDB prints now the number of OS error in a file operation


innobase/include/ut0dbg.h:
  Changed Innobase->InnoDB
innobase/os/os0file.c:
  More precise error message number
parent c23dbe67
......@@ -27,12 +27,12 @@ extern ulint* ut_dbg_null_ptr;
\
if (!((ulint)(EXPR) + ut_dbg_zero)) {\
fprintf(stderr,\
"Innobase: Assertion failure in thread %lu in file %s line %lu\n",\
"InnoDB: Assertion failure in thread %lu in file %s line %lu\n",\
os_thread_get_curr_id(), IB__FILE__, (ulint)__LINE__);\
fprintf(stderr,\
"Innobase: we intentionally generate a memory trap.\n");\
"InnoDB: We intentionally generate a memory trap.\n");\
fprintf(stderr,\
"Innobase: Send a bug report to mysql@lists.mysql.com\n");\
"InnoDB: Send a detailed bug report to mysql@lists.mysql.com\n");\
ut_dbg_stop_threads = TRUE;\
dbg_i = *(ut_dbg_null_ptr);\
if (dbg_i) {\
......
......@@ -120,6 +120,10 @@ os_file_get_last_error(void)
err = (ulint) GetLastError();
fprintf(stderr,
"InnoDB: operating system error number %li in a file operation.\n",
(long) err);
if (err == ERROR_FILE_NOT_FOUND) {
return(OS_FILE_NOT_FOUND);
} else if (err == ERROR_DISK_FULL) {
......@@ -130,6 +134,10 @@ os_file_get_last_error(void)
return(100 + err);
}
#else
fprintf(stderr,
"InnoDB: operating system error number %i in a file operation.\n",
errno);
err = (ulint) errno;
if (err == ENOSPC ) {
......@@ -173,7 +181,7 @@ os_file_handle_error(
"InnoDB: Encountered a problem with file %s.\n",
name);
}
fprintf(stderr,
fprintf(stderr,
"InnoDB: Cannot continue operation.\n"
"InnoDB: Disk is full. Try to clean the disk to free space.\n"
"InnoDB: Delete possible created file and restart.\n");
......@@ -184,7 +192,9 @@ os_file_handle_error(
return(TRUE);
} else {
ut_error;
fprintf(stderr, "InnoDB: Cannot continue operation.\n");
exit(1);
}
return(FALSE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment