You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.6 KiB

26 years ago
26 years ago
26 years ago
26 years ago
26 years ago
26 years ago
  1. /* Copyright (C) 2000 MySQL AB
  2. This program is free software; you can redistribute it and/or modify
  3. it under the terms of the GNU General Public License as published by
  4. the Free Software Foundation; either version 2 of the License, or
  5. (at your option) any later version.
  6. This program is distributed in the hope that it will be useful,
  7. but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. GNU General Public License for more details.
  10. You should have received a copy of the GNU General Public License
  11. along with this program; if not, write to the Free Software
  12. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
  13. #ifndef _mysys_err_h
  14. #define _mysys_err_h
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. #define GLOBERRS (EE_ERROR_LAST - EE_ERROR_FIRST + 1) /* Nr of global errors */
  19. #define EE(X) (globerrs[(X) - EE_ERROR_FIRST])
  20. extern const char * NEAR globerrs[]; /* my_error_messages is here */
  21. /* Error message numbers in global map */
  22. /*
  23. Do not add error numbers before EE_ERROR_FIRST.
  24. If necessary to add lower numbers, change EE_ERROR_FIRST accordingly.
  25. We start with error 1 to not confuse peoples with 'error 0'
  26. */
  27. #define EE_ERROR_FIRST 1 /*Copy first error nr.*/
  28. #define EE_CANTCREATEFILE 1
  29. #define EE_READ 2
  30. #define EE_WRITE 3
  31. #define EE_BADCLOSE 4
  32. #define EE_OUTOFMEMORY 5
  33. #define EE_DELETE 6
  34. #define EE_LINK 7
  35. #define EE_EOFERR 9
  36. #define EE_CANTLOCK 10
  37. #define EE_CANTUNLOCK 11
  38. #define EE_DIR 12
  39. #define EE_STAT 13
  40. #define EE_CANT_CHSIZE 14
  41. #define EE_CANT_OPEN_STREAM 15
  42. #define EE_GETWD 16
  43. #define EE_SETWD 17
  44. #define EE_LINK_WARNING 18
  45. #define EE_OPEN_WARNING 19
  46. #define EE_DISK_FULL 20
  47. #define EE_CANT_MKDIR 21
  48. #define EE_UNKNOWN_CHARSET 22
  49. #define EE_OUT_OF_FILERESOURCES 23
  50. #define EE_CANT_READLINK 24
  51. #define EE_CANT_SYMLINK 25
  52. #define EE_REALPATH 26
  53. #define EE_SYNC 27
  54. #define EE_UNKNOWN_COLLATION 28
  55. #define EE_FILENOTFOUND 29
  56. #define EE_FILE_NOT_CLOSED 30
  57. #define EE_ERROR_LAST 30 /* Copy last error nr */
  58. /* Add error numbers before EE_ERROR_LAST and change it accordingly. */
  59. /* exit codes for all MySQL programs */
  60. #define EXIT_UNSPECIFIED_ERROR 1
  61. #define EXIT_UNKNOWN_OPTION 2
  62. #define EXIT_AMBIGUOUS_OPTION 3
  63. #define EXIT_NO_ARGUMENT_ALLOWED 4
  64. #define EXIT_ARGUMENT_REQUIRED 5
  65. #define EXIT_VAR_PREFIX_NOT_UNIQUE 6
  66. #define EXIT_UNKNOWN_VARIABLE 7
  67. #define EXIT_OUT_OF_MEMORY 8
  68. #define EXIT_UNKNOWN_SUFFIX 9
  69. #define EXIT_NO_PTR_TO_VARIABLE 10
  70. #define EXIT_CANNOT_CONNECT_TO_SERVICE 11
  71. #define EXIT_OPTION_DISABLED 12
  72. #ifdef __cplusplus
  73. }
  74. #endif
  75. #endif