Drizzled Public API Documentation

db0err.h
Go to the documentation of this file.
00001 /*****************************************************************************
00002 
00003 Copyright (C) 1996, 2009, Innobase Oy. All Rights Reserved.
00004 
00005 This program is free software; you can redistribute it and/or modify it under
00006 the terms of the GNU General Public License as published by the Free Software
00007 Foundation; version 2 of the License.
00008 
00009 This program is distributed in the hope that it will be useful, but WITHOUT
00010 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00011 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
00012 
00013 You should have received a copy of the GNU General Public License along with
00014 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
00015 St, Fifth Floor, Boston, MA 02110-1301 USA
00016 
00017 *****************************************************************************/
00018 
00019 /**************************************************/
00026 #pragma once
00027 #ifndef db0err_h
00028 #define db0err_h
00029 
00030 
00031 enum db_err {
00032   DB_SUCCESS_LOCKED_REC = 9,  
00034   DB_SUCCESS = 10,
00035 
00036   /* The following are error codes */
00037   DB_ERROR,
00038   DB_INTERRUPTED,
00039   DB_OUT_OF_MEMORY,
00040   DB_OUT_OF_FILE_SPACE,
00041   DB_LOCK_WAIT,
00042   DB_DEADLOCK,
00043   DB_ROLLBACK,
00044   DB_DUPLICATE_KEY,
00045   DB_QUE_THR_SUSPENDED,
00046   DB_MISSING_HISTORY,   /* required history data has been
00047           deleted due to lack of space in
00048           rollback segment */
00049   DB_CLUSTER_NOT_FOUND = 30,
00050   DB_TABLE_NOT_FOUND,
00051   DB_MUST_GET_MORE_FILE_SPACE,  /* the database has to be stopped
00052           and restarted with more file space */
00053   DB_TABLE_IS_BEING_USED,
00054   DB_TOO_BIG_RECORD,    /* a record in an index would not fit
00055           on a compressed page, or it would
00056           become bigger than 1/2 free space in
00057           an uncompressed page frame */
00058   DB_LOCK_WAIT_TIMEOUT,   /* lock wait lasted too long */
00059   DB_NO_REFERENCED_ROW,   /* referenced key value not found
00060           for a foreign key in an insert or
00061           update of a row */
00062   DB_ROW_IS_REFERENCED,   /* cannot delete or update a row
00063           because it contains a key value
00064           which is referenced */
00065   DB_CANNOT_ADD_CONSTRAINT, /* adding a foreign key constraint
00066           to a table failed */
00067   DB_CORRUPTION,      /* data structure corruption noticed */
00068   DB_COL_APPEARS_TWICE_IN_INDEX,  /* InnoDB cannot handle an index
00069           where same column appears twice */
00070   DB_CANNOT_DROP_CONSTRAINT,  /* dropping a foreign key constraint
00071           from a table failed */
00072   DB_NO_SAVEPOINT,    /* no savepoint exists with the given
00073           name */
00074   DB_TABLESPACE_ALREADY_EXISTS, /* we cannot create a new single-table
00075           tablespace because a file of the same
00076           name already exists */
00077   DB_TABLESPACE_DELETED,    /* tablespace does not exist or is
00078           being dropped right now */
00079   DB_LOCK_TABLE_FULL,   /* lock structs have exhausted the
00080           buffer pool (for big transactions,
00081           InnoDB stores the lock structs in the
00082           buffer pool) */
00083   DB_FOREIGN_DUPLICATE_KEY, /* foreign key constraints
00084           activated by the operation would
00085           lead to a duplicate key in some
00086           table */
00087   DB_TOO_MANY_CONCURRENT_TRXS,  /* when InnoDB runs out of the
00088           preconfigured undo slots, this can
00089           only happen when there are too many
00090           concurrent transactions */
00091   DB_UNSUPPORTED,     /* when InnoDB sees any artefact or
00092           a feature that it can't recoginize or
00093           work with e.g., FT indexes created by
00094           a later version of the engine. */
00095 
00096   DB_PRIMARY_KEY_IS_NULL,   /* a column in the PRIMARY KEY
00097           was found to be NULL */
00098 
00099   DB_STATS_DO_NOT_EXIST,    /* an operation that requires the
00100           persistent storage, used for recording
00101           table and index statistics, was
00102           requested but this storage does not
00103           exist itself or the stats for a given
00104           table do not exist */
00105   DB_FOREIGN_EXCEED_MAX_CASCADE,  /* Foreign key constraint related
00106           cascading delete/update exceeds
00107           maximum allowed depth */
00108   DB_CHILD_NO_INDEX,    /* the child (foreign) table does not
00109           have an index that contains the
00110           foreign keys as its prefix columns */
00111   DB_PARENT_NO_INDEX,   /* the parent table does not
00112           have an index that contains the
00113           foreign keys as its prefix columns */
00114 
00115   /* The following are partial failure codes */
00116   DB_FAIL = 1000,
00117   DB_OVERFLOW,
00118   DB_UNDERFLOW,
00119   DB_STRONG_FAIL,
00120   DB_ZIP_OVERFLOW,
00121   DB_RECORD_NOT_FOUND = 1500,
00122   DB_END_OF_INDEX
00123 };
00124 
00125 #endif