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 locktable",
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 binlogging 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 "
96
/* HA_ERR_TABLE_NEEDS_UPGRADE */
97
"Table needs to be upgraded before it can be used",
98
/* HA_ERR_TABLE_READONLY */
100
/* HA_ERR_AUTOINC_READ_FAILED */
101
"Failed to get next auto increment value",
102
/* HA_ERR_AUTOINC_ERANGE */
103
"Failed to set row auto increment value",
105
"Unknown (generic) error from engine",
106
/* HA_ERR_RECORD_IS_THE_SAME */
107
"Record is the same",
108
/* HA_ERR_LOGGING_IMPOSSIBLE */
109
"It is not possible to log this statement",
110
/* HA_ERR_TABLESPACE_EXIST */
112
/* HA_ERR_CORRUPT_EVENT */
113
"The event was corrupt, leading to illegal data being read",
114
/* HA_ERR_NEW_FILE */
115
"The table is of a new format not supported by this version",
116
/* HA_ERR_ROWS_EVENT_APPLY */
117
"The event could not be processed no other hanlder error happened",
118
/* HA_ERR_INITIALIZATION */
119
"Got a fatal error during initialzaction of handler",
120
/* HA_ERR_FILE_TOO_SHORT */
121
"File to short; Expected more data in file",
122
/* HA_ERR_WRONG_CRC */
123
"Read page with wrong checksum",
124
/* HA_ERR_LOCK_OR_ACTIVE_TRANSACTION */
125
"Lock or active transaction", /* TODO: get a better message */
126
/* HA_ERR_NO_SUCH_TABLESPACE */
127
"No such table space", /* TODO: get a better message */
128
/* HA_ERR_TABLESPACE_NOT_EMPTY */
129
"Tablespace not empty" /* TODO: get a better message */