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:
@ -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:
|
||||
|
Reference in New Issue
Block a user