1
/* Copyright (C) 2000 MySQL AB
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.
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.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
16
#ifndef MYSYS_MYSYS_ERR_H
17
#define MYSYS_MYSYS_ERR_H
25
Do not add error numbers before EE_ERROR_FIRST.
26
If necessary to add lower numbers, change EE_ERROR_FIRST accordingly.
28
We start with error 1 to not confuse peoples with 'error 0'
31
#define EE_ERROR_FIRST 1 /*Copy first error nr.*/
32
#define EE_CANTCREATEFILE 1
36
#define EE_OUTOFMEMORY 5
40
#define EE_CANTLOCK 10
41
#define EE_CANTUNLOCK 11
44
#define EE_CANT_CHSIZE 14
45
#define EE_CANT_OPEN_STREAM 15
48
#define EE_LINK_WARNING 18
49
#define EE_OPEN_WARNING 19
50
#define EE_DISK_FULL 20
51
#define EE_CANT_MKDIR 21
52
#define EE_UNKNOWN_CHARSET 22
53
#define EE_OUT_OF_FILERESOURCES 23
54
#define EE_CANT_READLINK 24
55
#define EE_CANT_SYMLINK 25
56
#define EE_REALPATH 26
58
#define EE_UNKNOWN_COLLATION 28
59
#define EE_FILENOTFOUND 29
60
#define EE_FILE_NOT_CLOSED 30
61
#define EE_ERROR_LAST 30 /* Copy last error nr */
62
/* Add error numbers before EE_ERROR_LAST and change it accordingly. */
64
/* exit codes for all MySQL programs */
66
#define EXIT_UNSPECIFIED_ERROR 1
67
#define EXIT_UNKNOWN_OPTION 2
68
#define EXIT_AMBIGUOUS_OPTION 3
69
#define EXIT_NO_ARGUMENT_ALLOWED 4
70
#define EXIT_ARGUMENT_REQUIRED 5
71
#define EXIT_VAR_PREFIX_NOT_UNIQUE 6
72
#define EXIT_UNKNOWN_VARIABLE 7
73
#define EXIT_OUT_OF_MEMORY 8
74
#define EXIT_UNKNOWN_SUFFIX 9
75
#define EXIT_NO_PTR_TO_VARIABLE 10
76
#define EXIT_CANNOT_CONNECT_TO_SERVICE 11
77
#define EXIT_OPTION_DISABLED 12
78
#define EXIT_ARGUMENT_INVALID 13
80
#define GLOBERRS (EE_ERROR_LAST - EE_ERROR_FIRST + 1) /* Nr of global errors */
81
#define EE(X) (globerrs[(X) - EE_ERROR_FIRST])
83
/* Error message numbers in global map */
84
extern const char * globerrs[GLOBERRS];
90
#endif /* MYSYS_MYSYS_ERR_H */