1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Added HA_ERR_DISK_FULL handler error

Original code by Zardosht Kasheff

sql/handler.cc:
  Added HA_ERR_DISK_FULL and ENOSPC (for handler that uses normal errno).
  This sets 'fatal_error' to ensure that the error is logged to err file (which hopefully is on another disk...)
This commit is contained in:
Michael Widenius
2011-05-18 13:36:12 +03:00
parent 0da2df248b
commit 5c70f813f3
3 changed files with 10 additions and 2 deletions

View File

@ -345,6 +345,7 @@ int ha_init_errors(void)
SETMSG(HA_ERR_AUTOINC_READ_FAILED, ER(ER_AUTOINC_READ_FAILED));
SETMSG(HA_ERR_AUTOINC_ERANGE, ER(ER_WARN_DATA_OUT_OF_RANGE));
SETMSG(HA_ERR_TOO_MANY_CONCURRENT_TRXS, ER(ER_TOO_MANY_CONCURRENT_TRXS));
SETMSG(HA_ERR_DISK_FULL, ER(ER_DISK_FULL));
/* Register the error messages for use with my_error(). */
return my_error_register(errmsgs, HA_ERR_FIRST, HA_ERR_LAST);
@ -2759,6 +2760,11 @@ void handler::print_error(int error, myf errflag)
case ENOENT:
textno=ER_FILE_NOT_FOUND;
break;
case ENOSPC:
case HA_ERR_DISK_FULL:
textno= ER_DISK_FULL;
SET_FATAL_ERROR; // Ensure error is logged
break;
case HA_ERR_KEY_NOT_FOUND:
case HA_ERR_NO_ACTIVE_RECORD:
case HA_ERR_END_OF_FILE: