MySQL 5.6.14 Source Code Document
|
Contains error information. More...
#include <NdbError.hpp>
Public Types | |
enum | Status { Success = ndberror_st_success, TemporaryError = ndberror_st_temporary, PermanentError = ndberror_st_permanent, UnknownResult = ndberror_st_unknown } |
enum | Classification { NoError = ndberror_cl_none, ApplicationError = ndberror_cl_application, NoDataFound = ndberror_cl_no_data_found, ConstraintViolation = ndberror_cl_constraint_violation, SchemaError = ndberror_cl_schema_error, UserDefinedError = ndberror_cl_user_defined, InsufficientSpace = ndberror_cl_insufficient_space, TemporaryResourceError = ndberror_cl_temporary_resource, NodeRecoveryError = ndberror_cl_node_recovery, OverloadError = ndberror_cl_overload, TimeoutExpired = ndberror_cl_timeout_expired, UnknownResultError = ndberror_cl_unknown_result, InternalError = ndberror_cl_internal_error, FunctionNotImplemented = ndberror_cl_function_not_implemented, UnknownErrorCode = ndberror_cl_unknown_error_code, NodeShutdown = ndberror_cl_node_shutdown, SchemaObjectExists = ndberror_cl_schema_object_already_exists, InternalTemporary = ndberror_cl_internal_temporary } |
Public Member Functions | |
NdbError (const ndberror_struct &ndberror) | |
operator ndberror_struct () const |
Public Attributes | |
Status | status |
Classification | classification |
int | code |
int | mysql_code |
const char * | message |
char * | details |
Contains error information.
A NdbError consists of five parts:
Error status is usually used for programming against errors. If more detailed error control is needed, it is possible to use the error classification.
It is not recommended to write application programs dependent on specific error codes.
The error messages and error details may change without notice.
For example of use, see ndbapi_retries.cpp.
Definition at line 48 of file NdbError.hpp.
Type of error
NoError |
Success. No error occurred. |
ApplicationError |
Error in application program. |
NoDataFound |
Read operation failed due to missing record. |
ConstraintViolation |
E.g. inserting a tuple with a primary key already existing in the table. |
SchemaError |
Error in creating table or usage of table. |
UserDefinedError |
Error occurred in interpreted program. |
InsufficientSpace |
E.g. insufficient memory for data or indexes. |
TemporaryResourceError |
E.g. too many active transactions. |
NodeRecoveryError |
Temporary failures which are probably inflicted by a node recovery in progress. Examples: information sent between application and NDB lost, distribution change. |
OverloadError |
E.g. out of log file space. |
TimeoutExpired |
Timeouts, often inflicted by deadlocks in NDB. |
UnknownResultError |
Is is unknown whether the transaction was committed or not. |
InternalError |
A serious error in NDB has occurred. |
FunctionNotImplemented |
A function used is not yet implemented. |
UnknownErrorCode |
Error handler could not determine correct error code. |
NodeShutdown |
Node shutdown |
SchemaObjectExists |
Schema object already exists |
InternalTemporary |
Request sent to non master |
Definition at line 91 of file NdbError.hpp.
enum NdbError::Status |
Status categorizes error codes into status values reflecting what the application should do when encountering errors
Success |
The error code indicate success |
TemporaryError |
The error code indicates a temporary error. The application should typically retry. |
PermanentError |
The error code indicates a permanent error. |
UnknownResult |
The result/status is unknown. |
Definition at line 53 of file NdbError.hpp.
Classification NdbError::classification |
Error type
Definition at line 194 of file NdbError.hpp.
int NdbError::code |
Error code
Definition at line 199 of file NdbError.hpp.
char* NdbError::details |
The detailed description. This is extra information regarding the error which is not included in the error message.
Definition at line 218 of file NdbError.hpp.
const char* NdbError::message |
Error message
Definition at line 209 of file NdbError.hpp.
int NdbError::mysql_code |
Mysql error code
Definition at line 204 of file NdbError.hpp.
Status NdbError::status |
Error status.
Definition at line 189 of file NdbError.hpp.