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; ...@@ -27,12 +27,12 @@ extern ulint* ut_dbg_null_ptr;
\ \
if (!((ulint)(EXPR) + ut_dbg_zero)) {\ if (!((ulint)(EXPR) + ut_dbg_zero)) {\
fprintf(stderr,\ 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__);\ os_thread_get_curr_id(), IB__FILE__, (ulint)__LINE__);\
fprintf(stderr,\ fprintf(stderr,\
"Innobase: we intentionally generate a memory trap.\n");\ "InnoDB: We intentionally generate a memory trap.\n");\
fprintf(stderr,\ 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;\ ut_dbg_stop_threads = TRUE;\
dbg_i = *(ut_dbg_null_ptr);\ dbg_i = *(ut_dbg_null_ptr);\
if (dbg_i) {\ if (dbg_i) {\
......
...@@ -120,6 +120,10 @@ os_file_get_last_error(void) ...@@ -120,6 +120,10 @@ os_file_get_last_error(void)
err = (ulint) GetLastError(); err = (ulint) GetLastError();
fprintf(stderr,
"InnoDB: operating system error number %li in a file operation.\n",
(long) err);
if (err == ERROR_FILE_NOT_FOUND) { if (err == ERROR_FILE_NOT_FOUND) {
return(OS_FILE_NOT_FOUND); return(OS_FILE_NOT_FOUND);
} else if (err == ERROR_DISK_FULL) { } else if (err == ERROR_DISK_FULL) {
...@@ -130,6 +134,10 @@ os_file_get_last_error(void) ...@@ -130,6 +134,10 @@ os_file_get_last_error(void)
return(100 + err); return(100 + err);
} }
#else #else
fprintf(stderr,
"InnoDB: operating system error number %i in a file operation.\n",
errno);
err = (ulint) errno; err = (ulint) errno;
if (err == ENOSPC ) { if (err == ENOSPC ) {
...@@ -184,7 +192,9 @@ os_file_handle_error( ...@@ -184,7 +192,9 @@ os_file_handle_error(
return(TRUE); return(TRUE);
} else { } else {
ut_error; fprintf(stderr, "InnoDB: Cannot continue operation.\n");
exit(1);
} }
return(FALSE); 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