00001 /* Copyright (C) 2000 MySQL AB 00002 00003 This program is free software; you can redistribute it and/or modify 00004 it under the terms of the GNU General Public License as published by 00005 the Free Software Foundation; either version 2 of the License, or 00006 (at your option) any later version. 00007 00008 This program is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 GNU General Public License for more details. 00012 00013 You should have received a copy of the GNU General Public License 00014 along with this program; if not, write to the Free Software 00015 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 00016 00017 #ifndef _mysys_err_h 00018 #define _mysys_err_h 00019 #ifdef __cplusplus 00020 extern "C" { 00021 #endif 00022 00023 #define GLOBERRS (EE_ERROR_LAST - EE_ERROR_FIRST + 1) /* Nr of global errors */ 00024 #define EE(X) (globerrs[(X) - EE_ERROR_FIRST]) 00025 00026 extern const char * NEAR globerrs[]; /* my_error_messages is here */ 00027 00028 /* Error message numbers in global map */ 00029 /* 00030 Do not add error numbers before EE_ERROR_FIRST. 00031 If necessary to add lower numbers, change EE_ERROR_FIRST accordingly. 00032 00033 We start with error 1 to not confuse peoples with 'error 0' 00034 */ 00035 00036 #define EE_ERROR_FIRST 1 /*Copy first error nr.*/ 00037 #define EE_CANTCREATEFILE 1 00038 #define EE_READ 2 00039 #define EE_WRITE 3 00040 #define EE_BADCLOSE 4 00041 #define EE_OUTOFMEMORY 5 00042 #define EE_DELETE 6 00043 #define EE_LINK 7 00044 #define EE_EOFERR 9 00045 #define EE_CANTLOCK 10 00046 #define EE_CANTUNLOCK 11 00047 #define EE_DIR 12 00048 #define EE_STAT 13 00049 #define EE_CANT_CHSIZE 14 00050 #define EE_CANT_OPEN_STREAM 15 00051 #define EE_GETWD 16 00052 #define EE_SETWD 17 00053 #define EE_LINK_WARNING 18 00054 #define EE_OPEN_WARNING 19 00055 #define EE_DISK_FULL 20 00056 #define EE_CANT_MKDIR 21 00057 #define EE_UNKNOWN_CHARSET 22 00058 #define EE_OUT_OF_FILERESOURCES 23 00059 #define EE_CANT_READLINK 24 00060 #define EE_CANT_SYMLINK 25 00061 #define EE_REALPATH 26 00062 #define EE_SYNC 27 00063 #define EE_UNKNOWN_COLLATION 28 00064 #define EE_FILENOTFOUND 29 00065 #define EE_FILE_NOT_CLOSED 30 00066 #define EE_ERROR_LAST 30 /* Copy last error nr */ 00067 /* Add error numbers before EE_ERROR_LAST and change it accordingly. */ 00068 00069 /* exit codes for all MySQL programs */ 00070 00071 #define EXIT_UNSPECIFIED_ERROR 1 00072 #define EXIT_UNKNOWN_OPTION 2 00073 #define EXIT_AMBIGUOUS_OPTION 3 00074 #define EXIT_NO_ARGUMENT_ALLOWED 4 00075 #define EXIT_ARGUMENT_REQUIRED 5 00076 #define EXIT_VAR_PREFIX_NOT_UNIQUE 6 00077 #define EXIT_UNKNOWN_VARIABLE 7 00078 #define EXIT_OUT_OF_MEMORY 8 00079 #define EXIT_UNKNOWN_SUFFIX 9 00080 #define EXIT_NO_PTR_TO_VARIABLE 10 00081 #define EXIT_CANNOT_CONNECT_TO_SERVICE 11 00082 #define EXIT_OPTION_DISABLED 12 00083 00084 00085 #ifdef __cplusplus 00086 } 00087 #endif 00088 #endif 00089
1.4.7

