3
Errors a handler can give you
6
static const char *handler_error_messages[]=
8
/* HA_ERR_KEY_NOT_FOUND */
9
"Didn't find key on read or update",
10
/* HA_ERR_FOUND_DUPP_KEY */
11
"Duplicate key on write or update",
12
/* HA_ERR_INTERNAL_ERROR */
13
"Internal (unspecified) error in handler",
14
/* HA_ERR_RECORD_CHANGED */
15
"Someone has changed the row since it was read (while the table was locked to prevent it)",
16
/* HA_ERR_WRONG_INDEX */
17
"Wrong index given to function",
19
"Undefined handler error 125",
21
"Index file is crashed",
22
/* HA_ERR_WRONG_IN_RECORD */
23
"Record file is crashed",
24
/* HA_ERR_OUT_OF_MEM */
25
"Out of memory in engine",
27
"Undefined handler error 129",
28
/* HA_ERR_NOT_A_TABLE */
29
"Incorrect file format",
30
/* HA_ERR_WRONG_COMMAND */
31
"Command not supported by database",
34
/* HA_ERR_NO_ACTIVE_RECORD */
35
"No record read before update",
36
/* HA_ERR_RECORD_DELETED */
37
"Record was already deleted (or record file crashed)",
38
/* HA_ERR_RECORD_FILE_FULL */
39
"No more room in record file",
40
/* HA_ERR_INDEX_FILE_FULL */
41
"No more room in index file",
42
/* HA_ERR_END_OF_FILE */
43
"No more records (read after end of file)",
44
/* HA_ERR_UNSUPPORTED */
45
"Unsupported extension used for table",
46
/* HA_ERR_TO_BIG_ROW */
48
/* HA_WRONG_CREATE_OPTION */
49
"Wrong create options",
50
/* HA_ERR_FOUND_DUPP_UNIQUE */
51
"Duplicate unique key or constraint on write or update",
52
/* HA_ERR_UNKNOWN_CHARSET */
53
"Unknown character set used in table",
54
/* HA_ERR_WRONG_MRG_TABLE_DEF */
55
"Conflicting table definitions in sub-tables of MERGE table",
56
/* HA_ERR_CRASHED_ON_REPAIR */
57
"Table is crashed and last repair failed",
58
/* HA_ERR_CRASHED_ON_USAGE */
59
"Table was marked as crashed and should be repaired",
60
/* HA_ERR_LOCK_WAIT_TIMEOUT */
61
"Lock timed out; Retry transaction",
62
/* HA_ERR_LOCK_TABLE_FULL */
63
"Lock table is full; Restart program with a larger lock table",
64
/* HA_ERR_READ_ONLY_TRANSACTION */
65
"Updates are not allowed under a read only transactions",
66
/* HA_ERR_LOCK_DEADLOCK */
67
"Lock deadlock; Retry transaction",
68
/* HA_ERR_CANNOT_ADD_FOREIGN */
69
"Foreign key constraint is incorrectly formed",
70
/* HA_ERR_NO_REFERENCED_ROW */
71
"Cannot add a child row",
72
/* HA_ERR_ROW_IS_REFERENCED */
73
"Cannot delete a parent row",
74
/* HA_ERR_NO_SAVEPOINT */
75
"No savepoint with that name",
76
/* HA_ERR_NON_UNIQUE_BLOCK_SIZE */
77
"Non unique key block size",
78
/* HA_ERR_NO_SUCH_TABLE */
79
"The table does not exist in engine",
80
/* HA_ERR_TABLE_EXIST */
81
"The table already existed in storage engine",
82
/* HA_ERR_NO_CONNECTION */
83
"Could not connect to storage engine",
84
/* HA_ERR_NULL_IN_SPATIAL */
85
"Unexpected null pointer found when using spatial index",
86
/* HA_ERR_TABLE_DEF_CHANGED */
87
"The table changed in storage engine",
88
/* HA_ERR_NO_PARTITION_FOUND */
89
"There's no partition in table for the given value",
90
/* HA_ERR_RBR_LOGGING_FAILED */
91
"Row-based binary logging of row failed",
92
/* HA_ERR_DROP_INDEX_FK */
93
"Index needed in foreign key constraint",
94
/* HA_ERR_FOREIGN_DUPLICATE_KEY */
95
"Upholding foreign key constraints would lead to a duplicate key error in "
97
/* HA_ERR_TABLE_NEEDS_UPGRADE */
98
"Table needs to be upgraded before it can be used",
99
/* HA_ERR_TABLE_READONLY */
100
"Table is read only",
101
/* HA_ERR_AUTOINC_READ_FAILED */
102
"Failed to get next auto increment value",
103
/* HA_ERR_AUTOINC_ERANGE */
104
"Failed to set row auto increment value",
106
"Unknown (generic) error from engine",
107
/* HA_ERR_RECORD_IS_THE_SAME */
108
"Record was not update. Original values was same as new values",
109
/* HA_ERR_LOGGING_IMPOSSIBLE */
110
"It is not possible to log this statement",
111
/* HA_ERR_TABLESPACE_EXIST */
113
/* HA_ERR_CORRUPT_EVENT */
114
"The event was corrupt, leading to illegal data being read",
115
/* HA_ERR_NEW_FILE */
116
"The table is of a new format not supported by this version",
117
/* HA_ERR_ROWS_EVENT_APPLY */
118
"The event could not be processed. No other handler error happened",
119
/* HA_ERR_INITIALIZATION */
120
"Got a fatal error during initialization of handler",
121
/* HA_ERR_FILE_TOO_SHORT */
122
"File too short; Expected more data in file",
124
/* HA_ERR_WRONG_CRC */
125
"Read page with wrong checksum",
126
/* HA_ERR_LOCK_OR_ACTIVE_TRANSACTION */
127
"Lock or active transaction", /* TODO: get a better message */
128
/* HA_ERR_NO_SUCH_TABLESPACE */
129
"No such table space", /* TODO: get a better message */
130
/* HA_ERR_TABLESPACE_NOT_EMPTY */
131
"Tablespace not empty", /* TODO: get a better message */
132
/* HA_ERR_TABLESPACE_DATAFILE_EXIST */
133
"Tablespace data file already exists", /* TODO: get a better message */
134
/* HA_ERR_ROW_NOT_VISIBLE */
135
"Row is not visible by the current transaction"