Drizzled Public API Documentation

db0err.h
Go to the documentation of this file.
1 /*****************************************************************************
2 
3 Copyright (C) 1996, 2009, Innobase Oy. All Rights Reserved.
4 
5 This program is free software; you can redistribute it and/or modify it under
6 the terms of the GNU General Public License as published by the Free Software
7 Foundation; version 2 of the License.
8 
9 This program is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12 
13 You should have received a copy of the GNU General Public License along with
14 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
15 St, Fifth Floor, Boston, MA 02110-1301 USA
16 
17 *****************************************************************************/
18 
19 /**************************************************/
26 #pragma once
27 #ifndef db0err_h
28 #define db0err_h
29 
30 
31 enum db_err {
34  DB_SUCCESS = 10,
35 
36  /* The following are error codes */
37  DB_ERROR,
38  DB_INTERRUPTED,
39  DB_OUT_OF_MEMORY,
40  DB_OUT_OF_FILE_SPACE,
41  DB_LOCK_WAIT,
42  DB_DEADLOCK,
43  DB_ROLLBACK,
44  DB_DUPLICATE_KEY,
45  DB_QUE_THR_SUSPENDED,
46  DB_MISSING_HISTORY, /* required history data has been
47  deleted due to lack of space in
48  rollback segment */
49  DB_CLUSTER_NOT_FOUND = 30,
50  DB_TABLE_NOT_FOUND,
51  DB_MUST_GET_MORE_FILE_SPACE, /* the database has to be stopped
52  and restarted with more file space */
53  DB_TABLE_IS_BEING_USED,
54  DB_TOO_BIG_RECORD, /* a record in an index would not fit
55  on a compressed page, or it would
56  become bigger than 1/2 free space in
57  an uncompressed page frame */
58  DB_LOCK_WAIT_TIMEOUT, /* lock wait lasted too long */
59  DB_NO_REFERENCED_ROW, /* referenced key value not found
60  for a foreign key in an insert or
61  update of a row */
62  DB_ROW_IS_REFERENCED, /* cannot delete or update a row
63  because it contains a key value
64  which is referenced */
65  DB_CANNOT_ADD_CONSTRAINT, /* adding a foreign key constraint
66  to a table failed */
67  DB_CORRUPTION, /* data structure corruption noticed */
68  DB_COL_APPEARS_TWICE_IN_INDEX, /* InnoDB cannot handle an index
69  where same column appears twice */
70  DB_CANNOT_DROP_CONSTRAINT, /* dropping a foreign key constraint
71  from a table failed */
72  DB_NO_SAVEPOINT, /* no savepoint exists with the given
73  name */
74  DB_TABLESPACE_ALREADY_EXISTS, /* we cannot create a new single-table
75  tablespace because a file of the same
76  name already exists */
77  DB_TABLESPACE_DELETED, /* tablespace does not exist or is
78  being dropped right now */
79  DB_LOCK_TABLE_FULL, /* lock structs have exhausted the
80  buffer pool (for big transactions,
81  InnoDB stores the lock structs in the
82  buffer pool) */
83  DB_FOREIGN_DUPLICATE_KEY, /* foreign key constraints
84  activated by the operation would
85  lead to a duplicate key in some
86  table */
87  DB_TOO_MANY_CONCURRENT_TRXS, /* when InnoDB runs out of the
88  preconfigured undo slots, this can
89  only happen when there are too many
90  concurrent transactions */
91  DB_UNSUPPORTED, /* when InnoDB sees any artefact or
92  a feature that it can't recoginize or
93  work with e.g., FT indexes created by
94  a later version of the engine. */
95 
96  DB_PRIMARY_KEY_IS_NULL, /* a column in the PRIMARY KEY
97  was found to be NULL */
98 
99  DB_STATS_DO_NOT_EXIST, /* an operation that requires the
100  persistent storage, used for recording
101  table and index statistics, was
102  requested but this storage does not
103  exist itself or the stats for a given
104  table do not exist */
105  DB_FOREIGN_EXCEED_MAX_CASCADE, /* Foreign key constraint related
106  cascading delete/update exceeds
107  maximum allowed depth */
108  DB_CHILD_NO_INDEX, /* the child (foreign) table does not
109  have an index that contains the
110  foreign keys as its prefix columns */
111  DB_PARENT_NO_INDEX, /* the parent table does not
112  have an index that contains the
113  foreign keys as its prefix columns */
114 
115  /* The following are partial failure codes */
116  DB_FAIL = 1000,
117  DB_OVERFLOW,
118  DB_UNDERFLOW,
119  DB_STRONG_FAIL,
120  DB_ZIP_OVERFLOW,
121  DB_RECORD_NOT_FOUND = 1500,
122  DB_END_OF_INDEX
123 };
124 
125 #endif
db_err
Definition: db0err.h:31