/***************************************************************************** Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2015, 2018, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA *****************************************************************************/ /**************************************************//** @file include/db0err.h Global error codes for the database Created 5/24/1996 Heikki Tuuri *******************************************************/ #ifndef db0err_h #define db0err_h /* Do not include univ.i because univ.i includes this. */ enum dberr_t { DB_SUCCESS, DB_SUCCESS_LOCKED_REC = 9, /*!< like DB_SUCCESS, but a new explicit record lock was created */ /* The following are error codes */ DB_ERROR = 11, DB_INTERRUPTED, DB_OUT_OF_MEMORY, DB_OUT_OF_FILE_SPACE, DB_LOCK_WAIT, DB_DEADLOCK, DB_ROLLBACK, DB_DUPLICATE_KEY, DB_MISSING_HISTORY, /*!< required history data has been deleted due to lack of space in rollback segment */ DB_CLUSTER_NOT_FOUND = 30, DB_TABLE_NOT_FOUND, DB_MUST_GET_MORE_FILE_SPACE, /*!< the database has to be stopped and restarted with more file space */ DB_TABLE_IS_BEING_USED, 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 space in an uncompressed page frame */ DB_LOCK_WAIT_TIMEOUT, /*!< lock wait lasted too long */ DB_NO_REFERENCED_ROW, /*!< referenced key value not found for a foreign key in an insert or update of a row */ DB_ROW_IS_REFERENCED, /*!< cannot delete or update a row because it contains a key value which is referenced */ DB_CANNOT_ADD_CONSTRAINT, /*!< adding a foreign key constraint to a table failed */ DB_CORRUPTION, /*!< data structure corruption noticed */ DB_CANNOT_DROP_CONSTRAINT, /*!< dropping a foreign key constraint from a table failed */ DB_NO_SAVEPOINT, /*!< no savepoint exists with the given name */ DB_TABLESPACE_EXISTS, /*!< we cannot create a new single-table tablespace because a file of the same name already exists */ DB_TABLESPACE_DELETED, /*!< tablespace was deleted or is being dropped right now */ DB_TABLESPACE_NOT_FOUND, /*