~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to storage/innodb_plugin/include/db0err.h

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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., 59 Temple
 
15
Place, Suite 330, Boston, MA 02111-1307 USA
 
16
 
 
17
*****************************************************************************/
 
18
 
 
19
/**************************************************//**
 
20
@file include/db0err.h
 
21
Global error codes for the database
 
22
 
 
23
Created 5/24/1996 Heikki Tuuri
 
24
*******************************************************/
 
25
 
 
26
#ifndef db0err_h
 
27
#define db0err_h
 
28
 
 
29
 
 
30
enum db_err {
 
31
        DB_SUCCESS = 10,
 
32
 
 
33
        /* The following are error codes */
 
34
        DB_ERROR,
 
35
        DB_INTERRUPTED,
 
36
        DB_OUT_OF_MEMORY,
 
37
        DB_OUT_OF_FILE_SPACE,
 
38
        DB_LOCK_WAIT,
 
39
        DB_DEADLOCK,
 
40
        DB_ROLLBACK,
 
41
        DB_DUPLICATE_KEY,
 
42
        DB_QUE_THR_SUSPENDED,
 
43
        DB_MISSING_HISTORY,             /* required history data has been
 
44
                                        deleted due to lack of space in
 
45
                                        rollback segment */
 
46
        DB_CLUSTER_NOT_FOUND = 30,
 
47
        DB_TABLE_NOT_FOUND,
 
48
        DB_MUST_GET_MORE_FILE_SPACE,    /* the database has to be stopped
 
49
                                        and restarted with more file space */
 
50
        DB_TABLE_IS_BEING_USED,
 
51
        DB_TOO_BIG_RECORD,              /* a record in an index would not fit
 
52
                                        on a compressed page, or it would
 
53
                                        become bigger than 1/2 free space in
 
54
                                        an uncompressed page frame */
 
55
        DB_LOCK_WAIT_TIMEOUT,           /* lock wait lasted too long */
 
56
        DB_NO_REFERENCED_ROW,           /* referenced key value not found
 
57
                                        for a foreign key in an insert or
 
58
                                        update of a row */
 
59
        DB_ROW_IS_REFERENCED,           /* cannot delete or update a row
 
60
                                        because it contains a key value
 
61
                                        which is referenced */
 
62
        DB_CANNOT_ADD_CONSTRAINT,       /* adding a foreign key constraint
 
63
                                        to a table failed */
 
64
        DB_CORRUPTION,                  /* data structure corruption noticed */
 
65
        DB_COL_APPEARS_TWICE_IN_INDEX,  /* InnoDB cannot handle an index
 
66
                                        where same column appears twice */
 
67
        DB_CANNOT_DROP_CONSTRAINT,      /* dropping a foreign key constraint
 
68
                                        from a table failed */
 
69
        DB_NO_SAVEPOINT,                /* no savepoint exists with the given
 
70
                                        name */
 
71
        DB_TABLESPACE_ALREADY_EXISTS,   /* we cannot create a new single-table
 
72
                                        tablespace because a file of the same
 
73
                                        name already exists */
 
74
        DB_TABLESPACE_DELETED,          /* tablespace does not exist or is
 
75
                                        being dropped right now */
 
76
        DB_LOCK_TABLE_FULL,             /* lock structs have exhausted the
 
77
                                        buffer pool (for big transactions,
 
78
                                        InnoDB stores the lock structs in the
 
79
                                        buffer pool) */
 
80
        DB_FOREIGN_DUPLICATE_KEY,       /* foreign key constraints
 
81
                                        activated by the operation would
 
82
                                        lead to a duplicate key in some
 
83
                                        table */
 
84
        DB_TOO_MANY_CONCURRENT_TRXS,    /* when InnoDB runs out of the
 
85
                                        preconfigured undo slots, this can
 
86
                                        only happen when there are too many
 
87
                                        concurrent transactions */
 
88
        DB_UNSUPPORTED,                 /* when InnoDB sees any artefact or
 
89
                                        a feature that it can't recoginize or
 
90
                                        work with e.g., FT indexes created by
 
91
                                        a later version of the engine. */
 
92
 
 
93
        DB_PRIMARY_KEY_IS_NULL,         /* a column in the PRIMARY KEY
 
94
                                        was found to be NULL */
 
95
 
 
96
        /* The following are partial failure codes */
 
97
        DB_FAIL = 1000,
 
98
        DB_OVERFLOW,
 
99
        DB_UNDERFLOW,
 
100
        DB_STRONG_FAIL,
 
101
        DB_ZIP_OVERFLOW,
 
102
        DB_RECORD_NOT_FOUND = 1500,
 
103
        DB_END_OF_INDEX
 
104
};
 
105
 
 
106
#endif