MySQL 8.3.0
Source Code Documentation
db0err.h
Go to the documentation of this file.
1/*****************************************************************************
2
3Copyright (c) 1996, 2023, Oracle and/or its affiliates.
4
5This program is free software; you can redistribute it and/or modify it under
6the terms of the GNU General Public License, version 2.0, as published by the
7Free Software Foundation.
8
9This program is also distributed with certain software (including but not
10limited to OpenSSL) that is licensed under separate terms, as designated in a
11particular file or component or in included license documentation. The authors
12of MySQL hereby grant you an additional permission to link the program and
13your derivative works with the separately licensed software that they have
14included with MySQL.
15
16This program is distributed in the hope that it will be useful, but WITHOUT
17ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
19for more details.
20
21You should have received a copy of the GNU General Public License along with
22this program; if not, write to the Free Software Foundation, Inc.,
2351 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24
25*****************************************************************************/
26
27/** @file include/db0err.h
28 Global error codes for the database
29
30 Created 5/24/1996 Heikki Tuuri
31 *******************************************************/
32
33#ifndef db0err_h
34#define db0err_h
35
36/* Do not include univ.i because univ.i includes this. */
37
38enum dberr_t {
40 /** like DB_SUCCESS, but a new explicit record lock was created */
43
44 /* The following are error codes */
45
49 /** The tablespace could not be auto-extending */
56 /** required history data has been deleted due to lack of space in
57 rollback segment */
59 /** skip lock */
61 /** don't wait lock */
63 /** no session temporary tablespace could be allocated */
67 /** the database has to be stopped and restarted with more file space */
70 /** a record in an index would not fit on a compressed page, or it would
71 become bigger than 1/2 free space in an uncompressed page frame */
73 /** lock wait lasted too long */
75 /** referenced key value not found for a foreign key in an insert or
76 update of a row */
78 /** cannot delete or update a row because it contains a key value which
79 is referenced */
81 /** adding a foreign key constraint to a table failed */
83 /** data structure corruption noticed */
85 /** dropping a foreign key constraint from a table failed */
87 /** no savepoint exists with the given name */
89 /** cannot create a new tablespace because a file of the same name or
90 tablespace ID already exists */
92 /** tablespace was deleted or is being dropped right now */
94 /** Attempt to delete a tablespace instance that was not found in the
95 tablespace hash table */
97 /** lock structs have exhausted the buffer pool (for big transactions,
98 InnoDB stores the lock structs in the buffer pool) */
100 /** foreign key constraints activated by the operation would lead to a
101 duplicate key in some table */
103 /** when InnoDB runs out of the preconfigured undo slots, this can only
104 happen when there are too many concurrent transactions */
106 /** when InnoDB sees any artefact or a feature that it can't recoginize
107 or work with e.g., FT indexes created by a later version of the engine. */
109 /** a NOT NULL column was found to be NULL during table rebuild */
111 /** an operation that requires the persistent storage, used for recording
112 table and index statistics, was requested but this storage does not exist
113 itself or the stats for a given table do not exist */
115 /** Foreign key constraint related cascading delete/update exceeds maximum
116 allowed depth */
118 /** the child (foreign) table does not have an index that contains the
119 foreign keys as its prefix columns */
121 /** the parent table does not have an index that contains the foreign keys
122 as its prefix columns */
124 /** index column size exceeds maximum limit */
126 /** we have corrupted index */
128 /** the undo log record is too big */
130 /** Update operation attempted in a read-only transaction */
132 /** FTS Doc ID cannot be zero */
134 /** table is being used in foreign key check */
136 /** Modification log grew too big during online index creation */
138 /** Identifier name too long */
140 /** FTS query memory exceeds result cache limit */
142 /** Temp file write failure */
144 /** Cannot create specified Geometry data object */
146 /** Cannot open a file */
148 /** Too many words in a phrase */
150 /** Server version is lower than tablespace version */
152 /** The path is too long for the OS */
154 /** Generic IO error */
156 /** Failure to decompress a page after reading it from disk */
158 /** Punch hole not supported by InnoDB */
160 /** The file system doesn't support punch hole */
162 /** The tablespace doesn't support punch hole */
164 /** Failure to decrypt a page after reading it from disk */
166 /** The tablespace doesn't support encrypt */
168 /** Partial IO request failed */
170 /** Transaction was forced to rollback by a higher priority transaction */
172 /** Table/clustered index is corrupted */
174 /** Invalid Filename */
176 /** Compute generated value failed */
178 /** Cannot add foreign constrain placed on the base column of stored column */
180 /** Invalid encryption metadata in page 0. */
182 /** Incomplete cloned directory */
184 /** Btree level limit exceeded. */
186 /** Doublewrite meta data not found in the system space header */
188 /** Failed to initialize the doublewrite extents in the system tablespace */
190 /** Failed to create the doublewrite extents in the system tablespace */
192 /** Failed to initialize the double write memory data structures */
194 /* Schema mismatch between the metadata and data being imported. */
196 /** System has run out of resources. */
198 /** Page was discarded, was not written to storage. */
200 /** Error reading the auto-increment value. */
202 /** Failed to read as read was beyond file size. */
204 /** Data is not in sorted order. */
206 /** The record size is too big for LOAD BULK DATA operation. */
208
209 /* The following are partial failure codes */
210
211 DB_FAIL = 1000,
220
221 /** Generic error code for "Not found" type of errors */
223
224 /* The following are API only error codes. */
225
226 /** Column update or read failed because the types mismatch */
228 /* Too many nested sub expression in full-text search string */
231#endif
dberr_t
Definition: db0err.h:38
@ DB_NO_SAVEPOINT
no savepoint exists with the given name
Definition: db0err.h:88
@ DB_FAIL
Definition: db0err.h:211
@ DB_DBLWR_INIT_FAILED
Failed to initialize the double write memory data structures.
Definition: db0err.h:193
@ DB_WRONG_FILE_NAME
Invalid Filename.
Definition: db0err.h:175
@ DB_TOO_BIG_INDEX_COL
index column size exceeds maximum limit
Definition: db0err.h:125
@ DB_TABLE_IN_FK_CHECK
table is being used in foreign key check
Definition: db0err.h:135
@ DB_FOREIGN_EXCEED_MAX_CASCADE
Foreign key constraint related cascading delete/update exceeds maximum allowed depth.
Definition: db0err.h:117
@ DB_V1_DBLWR_INIT_FAILED
Failed to initialize the doublewrite extents in the system tablespace.
Definition: db0err.h:189
@ DB_ROW_IS_REFERENCED
cannot delete or update a row because it contains a key value which is referenced
Definition: db0err.h:80
@ DB_OUT_OF_MEMORY
Definition: db0err.h:48
@ DB_TABLESPACE_EXISTS
cannot create a new tablespace because a file of the same name or tablespace ID already exists
Definition: db0err.h:91
@ DB_SCHEMA_MISMATCH
Definition: db0err.h:195
@ DB_TABLESPACE_NOT_FOUND
Attempt to delete a tablespace instance that was not found in the tablespace hash table.
Definition: db0err.h:96
@ DB_END_SAMPLE_READ
Definition: db0err.h:219
@ DB_CANNOT_ADD_CONSTRAINT
adding a foreign key constraint to a table failed
Definition: db0err.h:82
@ DB_CANT_CREATE_GEOMETRY_OBJECT
Cannot create specified Geometry data object.
Definition: db0err.h:145
@ DB_ZIP_OVERFLOW
Definition: db0err.h:215
@ DB_DUPLICATE_KEY
Definition: db0err.h:55
@ DB_COMPUTE_VALUE_FAILED
Compute generated value failed.
Definition: db0err.h:177
@ DB_SUCCESS
Definition: db0err.h:42
@ DB_LOCK_TABLE_FULL
lock structs have exhausted the buffer pool (for big transactions, InnoDB stores the lock structs in ...
Definition: db0err.h:99
@ DB_LOCK_WAIT
Definition: db0err.h:52
@ DB_ROLLBACK
Definition: db0err.h:54
@ DB_OVERFLOW
Definition: db0err.h:212
@ DB_TABLESPACE_DELETED
tablespace was deleted or is being dropped right now
Definition: db0err.h:93
@ DB_READ_ONLY
Update operation attempted in a read-only transaction.
Definition: db0err.h:131
@ DB_NO_SESSION_TEMP
no session temporary tablespace could be allocated
Definition: db0err.h:64
@ DB_IO_NO_PUNCH_HOLE_TABLESPACE
The tablespace doesn't support punch hole.
Definition: db0err.h:163
@ DB_MUST_GET_MORE_FILE_SPACE
the database has to be stopped and restarted with more file space
Definition: db0err.h:68
@ DB_INDEX_CORRUPT
we have corrupted index
Definition: db0err.h:127
@ DB_TEMP_FILE_WRITE_FAIL
Temp file write failure.
Definition: db0err.h:143
@ DB_RECORD_NOT_FOUND
Definition: db0err.h:216
@ DB_FOREIGN_DUPLICATE_KEY
foreign key constraints activated by the operation would lead to a duplicate key in some table
Definition: db0err.h:102
@ DB_FILE_READ_BEYOND_SIZE
Failed to read as read was beyond file size.
Definition: db0err.h:203
@ DB_OUT_OF_FILE_SPACE
The tablespace could not be auto-extending.
Definition: db0err.h:50
@ DB_ABORT_INCOMPLETE_CLONE
Incomplete cloned directory.
Definition: db0err.h:183
@ DB_CANNOT_DROP_CONSTRAINT
dropping a foreign key constraint from a table failed
Definition: db0err.h:86
@ DB_CORRUPTION
data structure corruption noticed
Definition: db0err.h:84
@ DB_SUCCESS_LOCKED_REC
like DB_SUCCESS, but a new explicit record lock was created
Definition: db0err.h:41
@ DB_LOCK_NOWAIT
don't wait lock
Definition: db0err.h:62
@ DB_UNDO_RECORD_TOO_BIG
the undo log record is too big
Definition: db0err.h:129
@ DB_NO_FK_ON_S_BASE_COL
Cannot add foreign constrain placed on the base column of stored column.
Definition: db0err.h:179
@ DB_FTS_INVALID_DOCID
FTS Doc ID cannot be zero.
Definition: db0err.h:133
@ DB_ONLINE_LOG_TOO_BIG
Modification log grew too big during online index creation.
Definition: db0err.h:137
@ DB_BULK_TOO_BIG_RECORD
The record size is too big for LOAD BULK DATA operation.
Definition: db0err.h:207
@ DB_TABLE_CORRUPT
Table/clustered index is corrupted.
Definition: db0err.h:173
@ DB_FORCED_ABORT
Transaction was forced to rollback by a higher priority transaction.
Definition: db0err.h:171
@ DB_NO_REFERENCED_ROW
referenced key value not found for a foreign key in an insert or update of a row
Definition: db0err.h:77
@ DB_IO_DECRYPT_FAIL
Failure to decrypt a page after reading it from disk.
Definition: db0err.h:165
@ DB_V1_DBLWR_CREATE_FAILED
Failed to create the doublewrite extents in the system tablespace.
Definition: db0err.h:191
@ DB_NOT_FOUND
Generic error code for "Not found" type of errors.
Definition: db0err.h:222
@ DB_IDENTIFIER_TOO_LONG
Identifier name too long.
Definition: db0err.h:139
@ DB_OUT_OF_DISK_SPACE
Definition: db0err.h:51
@ DB_IO_NO_PUNCH_HOLE_FS
The file system doesn't support punch hole.
Definition: db0err.h:161
@ DB_IO_NO_PUNCH_HOLE
Punch hole not supported by InnoDB.
Definition: db0err.h:159
@ DB_IO_ERROR
Generic IO error.
Definition: db0err.h:155
@ DB_UNSUPPORTED
when InnoDB sees any artefact or a feature that it can't recoginize or work with e....
Definition: db0err.h:108
@ DB_INVALID_ENCRYPTION_META
Invalid encryption metadata in page 0.
Definition: db0err.h:181
@ DB_OUT_OF_RESOURCES
System has run out of resources.
Definition: db0err.h:197
@ DB_TABLE_IS_BEING_USED
Definition: db0err.h:69
@ DB_STRONG_FAIL
Definition: db0err.h:214
@ DB_FTS_TOO_MANY_WORDS_IN_PHRASE
Too many words in a phrase.
Definition: db0err.h:149
@ DB_AUTOINC_READ_ERROR
Error reading the auto-increment value.
Definition: db0err.h:201
@ DB_STATS_DO_NOT_EXIST
an operation that requires the persistent storage, used for recording table and index statistics,...
Definition: db0err.h:114
@ DB_FTS_EXCEED_RESULT_CACHE_LIMIT
FTS query memory exceeds result cache limit.
Definition: db0err.h:141
@ DB_END_OF_INDEX
Definition: db0err.h:218
@ DB_ERROR_UNSET
Definition: db0err.h:39
@ DB_TOO_MANY_CONCURRENT_TRXS
when InnoDB runs out of the preconfigured undo slots, this can only happen when there are too many co...
Definition: db0err.h:105
@ DB_END_OF_BLOCK
Definition: db0err.h:217
@ DB_DATA_NOT_SORTED
Data is not in sorted order.
Definition: db0err.h:205
@ DB_UNDERFLOW
Definition: db0err.h:213
@ DB_IO_PARTIAL_FAILED
Partial IO request failed.
Definition: db0err.h:169
@ DB_TOO_LONG_PATH
The path is too long for the OS.
Definition: db0err.h:153
@ DB_LOCK_WAIT_TIMEOUT
lock wait lasted too long
Definition: db0err.h:74
@ DB_BTREE_LEVEL_LIMIT_EXCEEDED
Btree level limit exceeded.
Definition: db0err.h:185
@ DB_SKIP_LOCKED
skip lock
Definition: db0err.h:60
@ DB_TOO_BIG_RECORD
a record in an index would not fit on a compressed page, or it would become bigger than 1/2 free spac...
Definition: db0err.h:72
@ DB_CANNOT_OPEN_FILE
Cannot open a file.
Definition: db0err.h:147
@ DB_FTS_TOO_MANY_NESTED_EXP
Definition: db0err.h:229
@ DB_DBLWR_NOT_EXISTS
Doublewrite meta data not found in the system space header.
Definition: db0err.h:187
@ DB_INTERRUPTED
Definition: db0err.h:47
@ DB_INVALID_NULL
a NOT NULL column was found to be NULL during table rebuild
Definition: db0err.h:110
@ DB_IO_DECOMPRESS_FAIL
Failure to decompress a page after reading it from disk.
Definition: db0err.h:157
@ DB_CHILD_NO_INDEX
the child (foreign) table does not have an index that contains the foreign keys as its prefix columns
Definition: db0err.h:120
@ DB_DEADLOCK
Definition: db0err.h:53
@ DB_IO_NO_ENCRYPT_TABLESPACE
The tablespace doesn't support encrypt.
Definition: db0err.h:167
@ DB_PARENT_NO_INDEX
the parent table does not have an index that contains the foreign keys as its prefix columns
Definition: db0err.h:123
@ DB_CLUSTER_NOT_FOUND
Definition: db0err.h:65
@ DB_MISSING_HISTORY
required history data has been deleted due to lack of space in rollback segment
Definition: db0err.h:58
@ DB_SERVER_VERSION_LOW
Server version is lower than tablespace version.
Definition: db0err.h:151
@ DB_DATA_MISMATCH
Column update or read failed because the types mismatch.
Definition: db0err.h:227
@ DB_TABLE_NOT_FOUND
Definition: db0err.h:66
@ DB_PAGE_IS_STALE
Page was discarded, was not written to storage.
Definition: db0err.h:199
@ DB_ERROR
Definition: db0err.h:46