MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mysys_err.h
1 /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
2 
3  This program is free software; you can redistribute it and/or modify
4  it under the terms of the GNU General Public License as published by
5  the Free Software Foundation; version 2 of the License.
6 
7  This program is distributed in the hope that it will be useful,
8  but WITHOUT ANY WARRANTY; without even the implied warranty of
9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  GNU General Public License for more details.
11 
12  You should have received a copy of the GNU General Public License
13  along with this program; if not, write to the Free Software
14  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
15 
16 #ifndef _mysys_err_h
17 #define _mysys_err_h
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 #define GLOBERRS (EE_ERROR_LAST - EE_ERROR_FIRST + 1) /* Nr of global errors */
24 #define EE(X) (globerrs[(X) - EE_ERROR_FIRST])
25 
26 extern const char *globerrs[]; /* my_error_messages is here */
27 
28 /* Error message numbers in global map */
29 /*
30  Do not add error numbers before EE_ERROR_FIRST.
31  If necessary to add lower numbers, change EE_ERROR_FIRST accordingly.
32 
33  We start with error 1 to not confuse peoples with 'error 0'
34 */
35 
36 #define EE_ERROR_FIRST 1 /*Copy first error nr.*/
37 #define EE_CANTCREATEFILE 1
38 #define EE_READ 2
39 #define EE_WRITE 3
40 #define EE_BADCLOSE 4
41 #define EE_OUTOFMEMORY 5
42 #define EE_DELETE 6
43 #define EE_LINK 7
44 #define EE_EOFERR 9
45 #define EE_CANTLOCK 10
46 #define EE_CANTUNLOCK 11
47 #define EE_DIR 12
48 #define EE_STAT 13
49 #define EE_CANT_CHSIZE 14
50 #define EE_CANT_OPEN_STREAM 15
51 #define EE_GETWD 16
52 #define EE_SETWD 17
53 #define EE_LINK_WARNING 18
54 #define EE_OPEN_WARNING 19
55 #define EE_DISK_FULL 20
56 #define EE_CANT_MKDIR 21
57 #define EE_UNKNOWN_CHARSET 22
58 #define EE_OUT_OF_FILERESOURCES 23
59 #define EE_CANT_READLINK 24
60 #define EE_CANT_SYMLINK 25
61 #define EE_REALPATH 26
62 #define EE_SYNC 27
63 #define EE_UNKNOWN_COLLATION 28
64 #define EE_FILENOTFOUND 29
65 #define EE_FILE_NOT_CLOSED 30
66 #define EE_CHANGE_OWNERSHIP 31
67 #define EE_CHANGE_PERMISSIONS 32
68 #define EE_CANT_SEEK 33
69 #define EE_ERROR_LAST 33 /* Copy last error nr */
70 /* Add error numbers before EE_ERROR_LAST and change it accordingly. */
71 
72  /* exit codes for all MySQL programs */
73 
74 #define EXIT_UNSPECIFIED_ERROR 1
75 #define EXIT_UNKNOWN_OPTION 2
76 #define EXIT_AMBIGUOUS_OPTION 3
77 #define EXIT_NO_ARGUMENT_ALLOWED 4
78 #define EXIT_ARGUMENT_REQUIRED 5
79 #define EXIT_VAR_PREFIX_NOT_UNIQUE 6
80 #define EXIT_UNKNOWN_VARIABLE 7
81 #define EXIT_OUT_OF_MEMORY 8
82 #define EXIT_UNKNOWN_SUFFIX 9
83 #define EXIT_NO_PTR_TO_VARIABLE 10
84 #define EXIT_CANNOT_CONNECT_TO_SERVICE 11
85 #define EXIT_OPTION_DISABLED 12
86 #define EXIT_ARGUMENT_INVALID 13
87 
88 
89 #ifdef __cplusplus
90 }
91 #endif
92 #endif
93