1
by brian
clean slate |
1 |
/******************************************************
|
2 |
Global error codes for the database
|
|
3 |
||
4 |
(c) 1996 Innobase Oy
|
|
5 |
||
6 |
Created 5/24/1996 Heikki Tuuri
|
|
7 |
*******************************************************/
|
|
8 |
||
9 |
#ifndef db0err_h
|
|
10 |
#define db0err_h
|
|
11 |
||
12 |
||
13 |
#define DB_SUCCESS 10
|
|
14 |
||
15 |
/* The following are error codes */
|
|
16 |
#define DB_ERROR 11
|
|
17 |
#define DB_OUT_OF_MEMORY 12
|
|
18 |
#define DB_OUT_OF_FILE_SPACE 13
|
|
19 |
#define DB_LOCK_WAIT 14
|
|
20 |
#define DB_DEADLOCK 15
|
|
21 |
#define DB_ROLLBACK 16
|
|
22 |
#define DB_DUPLICATE_KEY 17
|
|
23 |
#define DB_QUE_THR_SUSPENDED 18
|
|
24 |
#define DB_MISSING_HISTORY 19 /* required history data has been |
|
25 |
deleted due to lack of space in
|
|
26 |
rollback segment */
|
|
27 |
#define DB_CLUSTER_NOT_FOUND 30
|
|
28 |
#define DB_TABLE_NOT_FOUND 31
|
|
29 |
#define DB_MUST_GET_MORE_FILE_SPACE 32 /* the database has to be stopped |
|
30 |
and restarted with more file space */
|
|
31 |
#define DB_TABLE_IS_BEING_USED 33
|
|
32 |
#define DB_TOO_BIG_RECORD 34 /* a record in an index would become |
|
33 |
bigger than 1/2 free space in a page
|
|
34 |
frame */
|
|
35 |
#define DB_LOCK_WAIT_TIMEOUT 35 /* lock wait lasted too long */ |
|
36 |
#define DB_NO_REFERENCED_ROW 36 /* referenced key value not found |
|
37 |
for a foreign key in an insert or
|
|
38 |
update of a row */
|
|
39 |
#define DB_ROW_IS_REFERENCED 37 /* cannot delete or update a row |
|
40 |
because it contains a key value
|
|
41 |
which is referenced */
|
|
42 |
#define DB_CANNOT_ADD_CONSTRAINT 38 /* adding a foreign key constraint |
|
43 |
to a table failed */
|
|
44 |
#define DB_CORRUPTION 39 /* data structure corruption noticed */ |
|
45 |
#define DB_COL_APPEARS_TWICE_IN_INDEX 40/* InnoDB cannot handle an index |
|
46 |
where same column appears twice */
|
|
47 |
#define DB_CANNOT_DROP_CONSTRAINT 41 /* dropping a foreign key constraint |
|
48 |
from a table failed */
|
|
49 |
#define DB_NO_SAVEPOINT 42 /* no savepoint exists with the given |
|
50 |
name */
|
|
51 |
#define DB_TABLESPACE_ALREADY_EXISTS 43 /* we cannot create a new single-table |
|
52 |
tablespace because a file of the same
|
|
53 |
name already exists */
|
|
54 |
#define DB_TABLESPACE_DELETED 44 /* tablespace does not exist or is |
|
55 |
being dropped right now */
|
|
56 |
#define DB_LOCK_TABLE_FULL 45 /* lock structs have exhausted the |
|
57 |
buffer pool (for big transactions,
|
|
58 |
InnoDB stores the lock structs in the
|
|
59 |
buffer pool) */
|
|
60 |
#define DB_FOREIGN_DUPLICATE_KEY 46 /* foreign key constraints |
|
61 |
activated by the operation would
|
|
62 |
lead to a duplicate key in some
|
|
63 |
table */
|
|
64 |
#define DB_TOO_MANY_CONCURRENT_TRXS 47 /* when InnoDB runs out of the |
|
65 |
preconfigured undo slots, this can
|
|
66 |
only happen when there are too many
|
|
67 |
concurrent transactions */
|
|
68 |
#define DB_UNSUPPORTED 48 /* when InnoDB sees any artefact or |
|
69 |
a feature that it can't recoginize or
|
|
70 |
work with e.g., FT indexes created by
|
|
71 |
a later version of the engine. */
|
|
72 |
/* The following are partial failure codes */
|
|
73 |
#define DB_FAIL 1000
|
|
74 |
#define DB_OVERFLOW 1001
|
|
75 |
#define DB_UNDERFLOW 1002
|
|
76 |
#define DB_STRONG_FAIL 1003
|
|
77 |
#define DB_RECORD_NOT_FOUND 1500
|
|
78 |
#define DB_END_OF_INDEX 1501
|
|
79 |
||
80 |
#endif
|