Commit b48ed7db authored by heikki@donna.mysql.fi's avatar heikki@donna.mysql.fi
Browse files

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
parent b708df26
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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) {\
+12 −2
Original line number Diff line number Diff line
@@ -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 ) {
@@ -184,7 +192,9 @@ os_file_handle_error(

		return(TRUE);
	} else {
		ut_error;
		fprintf(stderr, "InnoDB: Cannot continue operation.\n");

		exit(1);
	}

	return(FALSE);