2011-06-30 17:46:53 +02:00
|
|
|
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
2001-12-06 13:10:51 +01:00
|
|
|
|
|
|
|
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
|
2006-12-23 20:17:15 +01:00
|
|
|
the Free Software Foundation; version 2 of the License.
|
2001-12-06 13:10:51 +01:00
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
2000-07-31 21:29:14 +02:00
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2001-12-06 13:10:51 +01:00
|
|
|
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
|
2011-06-30 17:46:53 +02:00
|
|
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
2000-07-31 21:29:14 +02:00
|
|
|
|
|
|
|
#ifndef _mysys_err_h
|
|
|
|
#define _mysys_err_h
|
2010-03-31 16:05:33 +02:00
|
|
|
|
2010-07-15 13:16:06 +02:00
|
|
|
#ifdef __cplusplus
|
2000-07-31 21:29:14 +02:00
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2004-12-23 20:11:38 +01:00
|
|
|
#define GLOBERRS (EE_ERROR_LAST - EE_ERROR_FIRST + 1) /* Nr of global errors */
|
|
|
|
#define EE(X) (globerrs[(X) - EE_ERROR_FIRST])
|
2000-07-31 21:29:14 +02:00
|
|
|
|
2010-07-15 13:16:06 +02:00
|
|
|
extern const char *globerrs[]; /* my_error_messages is here */
|
2000-07-31 21:29:14 +02:00
|
|
|
|
|
|
|
/* Error message numbers in global map */
|
2005-02-24 22:33:42 +01:00
|
|
|
/*
|
|
|
|
Do not add error numbers before EE_ERROR_FIRST.
|
|
|
|
If necessary to add lower numbers, change EE_ERROR_FIRST accordingly.
|
|
|
|
|
|
|
|
We start with error 1 to not confuse peoples with 'error 0'
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define EE_ERROR_FIRST 1 /*Copy first error nr.*/
|
2000-07-31 21:29:14 +02:00
|
|
|
#define EE_CANTCREATEFILE 1
|
|
|
|
#define EE_READ 2
|
|
|
|
#define EE_WRITE 3
|
|
|
|
#define EE_BADCLOSE 4
|
|
|
|
#define EE_OUTOFMEMORY 5
|
|
|
|
#define EE_DELETE 6
|
|
|
|
#define EE_LINK 7
|
|
|
|
#define EE_EOFERR 9
|
|
|
|
#define EE_CANTLOCK 10
|
|
|
|
#define EE_CANTUNLOCK 11
|
|
|
|
#define EE_DIR 12
|
|
|
|
#define EE_STAT 13
|
|
|
|
#define EE_CANT_CHSIZE 14
|
|
|
|
#define EE_CANT_OPEN_STREAM 15
|
|
|
|
#define EE_GETWD 16
|
|
|
|
#define EE_SETWD 17
|
|
|
|
#define EE_LINK_WARNING 18
|
|
|
|
#define EE_OPEN_WARNING 19
|
|
|
|
#define EE_DISK_FULL 20
|
|
|
|
#define EE_CANT_MKDIR 21
|
|
|
|
#define EE_UNKNOWN_CHARSET 22
|
2000-09-12 02:02:33 +02:00
|
|
|
#define EE_OUT_OF_FILERESOURCES 23
|
2001-05-31 11:18:53 +02:00
|
|
|
#define EE_CANT_READLINK 24
|
|
|
|
#define EE_CANT_SYMLINK 25
|
|
|
|
#define EE_REALPATH 26
|
2003-11-02 14:55:02 +01:00
|
|
|
#define EE_SYNC 27
|
2005-02-22 13:37:25 +01:00
|
|
|
#define EE_UNKNOWN_COLLATION 28
|
2005-02-24 22:33:42 +01:00
|
|
|
#define EE_FILENOTFOUND 29
|
2006-05-04 05:28:24 +02:00
|
|
|
#define EE_FILE_NOT_CLOSED 30
|
2010-07-20 20:07:36 +02:00
|
|
|
#define EE_CHANGE_OWNERSHIP 31
|
|
|
|
#define EE_CHANGE_PERMISSIONS 32
|
2010-12-09 10:59:12 +01:00
|
|
|
#define EE_CANT_SEEK 33
|
|
|
|
#define EE_ERROR_LAST 33 /* Copy last error nr */
|
2004-12-23 20:11:38 +01:00
|
|
|
/* Add error numbers before EE_ERROR_LAST and change it accordingly. */
|
2000-07-31 21:29:14 +02:00
|
|
|
|
2002-05-29 14:07:30 +02:00
|
|
|
/* exit codes for all MySQL programs */
|
|
|
|
|
|
|
|
#define EXIT_UNSPECIFIED_ERROR 1
|
|
|
|
#define EXIT_UNKNOWN_OPTION 2
|
|
|
|
#define EXIT_AMBIGUOUS_OPTION 3
|
|
|
|
#define EXIT_NO_ARGUMENT_ALLOWED 4
|
|
|
|
#define EXIT_ARGUMENT_REQUIRED 5
|
|
|
|
#define EXIT_VAR_PREFIX_NOT_UNIQUE 6
|
|
|
|
#define EXIT_UNKNOWN_VARIABLE 7
|
|
|
|
#define EXIT_OUT_OF_MEMORY 8
|
|
|
|
#define EXIT_UNKNOWN_SUFFIX 9
|
|
|
|
#define EXIT_NO_PTR_TO_VARIABLE 10
|
|
|
|
#define EXIT_CANNOT_CONNECT_TO_SERVICE 11
|
2004-01-14 03:58:37 +01:00
|
|
|
#define EXIT_OPTION_DISABLED 12
|
2007-03-02 17:43:45 +01:00
|
|
|
#define EXIT_ARGUMENT_INVALID 13
|
2002-05-29 14:07:30 +02:00
|
|
|
|
|
|
|
|
2000-07-31 21:29:14 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
2002-05-29 14:07:30 +02:00
|
|
|
|