mysys_err.h 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. /* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
  2. This program is free software; you can redistribute it and/or modify
  3. it under the terms of the GNU General Public License, version 2.0,
  4. as published by the Free Software Foundation.
  5. This program is also distributed with certain software (including
  6. but not limited to OpenSSL) that is licensed under separate terms,
  7. as designated in a particular file or component or in included license
  8. documentation. The authors of MySQL hereby grant you an additional
  9. permission to link the program and your derivative works with the
  10. separately licensed software that they have included with MySQL.
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. GNU General Public License, version 2.0, for more details.
  15. You should have received a copy of the GNU General Public License
  16. along with this program; if not, write to the Free Software
  17. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
  18. #ifndef _mysys_err_h
  19. #define _mysys_err_h
  20. /**
  21. @file include/mysys_err.h
  22. */
  23. #define GLOBERRS \
  24. (EE_ERROR_LAST - EE_ERROR_FIRST + 1) /* Nr of global errors \
  25. */
  26. #define EE(X) (globerrs[(X)-EE_ERROR_FIRST])
  27. extern const char *globerrs[]; /* my_error_messages is here */
  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. We start with error 1 to not confuse peoples with 'error 0'
  33. */
  34. #define EE_ERROR_FIRST 1 /*Copy first error nr.*/
  35. #define EE_CANTCREATEFILE 1
  36. #define EE_READ 2
  37. #define EE_WRITE 3
  38. #define EE_BADCLOSE 4
  39. #define EE_OUTOFMEMORY 5
  40. #define EE_DELETE 6
  41. #define EE_LINK 7
  42. #define EE_EOFERR 9
  43. #define EE_CANTLOCK 10
  44. #define EE_CANTUNLOCK 11
  45. #define EE_DIR 12
  46. #define EE_STAT 13
  47. #define EE_CANT_CHSIZE 14
  48. #define EE_CANT_OPEN_STREAM 15
  49. #define EE_GETWD 16
  50. #define EE_SETWD 17
  51. #define EE_LINK_WARNING 18
  52. #define EE_OPEN_WARNING 19
  53. #define EE_DISK_FULL 20
  54. #define EE_CANT_MKDIR 21
  55. #define EE_UNKNOWN_CHARSET 22
  56. #define EE_OUT_OF_FILERESOURCES 23
  57. #define EE_CANT_READLINK 24
  58. #define EE_CANT_SYMLINK 25
  59. #define EE_REALPATH 26
  60. #define EE_SYNC 27
  61. #define EE_UNKNOWN_COLLATION 28
  62. #define EE_FILENOTFOUND 29
  63. #define EE_FILE_NOT_CLOSED 30
  64. #define EE_CHANGE_OWNERSHIP 31
  65. #define EE_CHANGE_PERMISSIONS 32
  66. #define EE_CANT_SEEK 33
  67. #define EE_CAPACITY_EXCEEDED 34
  68. #define EE_DISK_FULL_WITH_RETRY_MSG 35
  69. #define EE_FAILED_TO_CREATE_TIMER 36
  70. #define EE_FAILED_TO_DELETE_TIMER 37
  71. #define EE_FAILED_TO_CREATE_TIMER_QUEUE 38
  72. #define EE_FAILED_TO_START_TIMER_NOTIFY_THREAD 39
  73. #define EE_FAILED_TO_CREATE_TIMER_NOTIFY_THREAD_INTERRUPT_EVENT 40
  74. #define EE_EXITING_TIMER_NOTIFY_THREAD 41
  75. #define EE_WIN_LIBRARY_LOAD_FAILED 42
  76. #define EE_WIN_RUN_TIME_ERROR_CHECK 43
  77. #define EE_FAILED_TO_DETERMINE_LARGE_PAGE_SIZE 44
  78. #define EE_FAILED_TO_KILL_ALL_THREADS 45
  79. #define EE_FAILED_TO_CREATE_IO_COMPLETION_PORT 46
  80. #define EE_FAILED_TO_OPEN_DEFAULTS_FILE 47
  81. #define EE_FAILED_TO_HANDLE_DEFAULTS_FILE 48
  82. #define EE_WRONG_DIRECTIVE_IN_CONFIG_FILE 49
  83. #define EE_SKIPPING_DIRECTIVE_DUE_TO_MAX_INCLUDE_RECURSION 50
  84. #define EE_INCORRECT_GRP_DEFINITION_IN_CONFIG_FILE 51
  85. #define EE_OPTION_WITHOUT_GRP_IN_CONFIG_FILE 52
  86. #define EE_CONFIG_FILE_PERMISSION_ERROR 53
  87. #define EE_IGNORE_WORLD_WRITABLE_CONFIG_FILE 54
  88. #define EE_USING_DISABLED_OPTION 55
  89. #define EE_USING_DISABLED_SHORT_OPTION 56
  90. #define EE_USING_PASSWORD_ON_CLI_IS_INSECURE 57
  91. #define EE_UNKNOWN_SUFFIX_FOR_VARIABLE 58
  92. #define EE_SSL_ERROR_FROM_FILE 59
  93. #define EE_SSL_ERROR 60
  94. #define EE_NET_SEND_ERROR_IN_BOOTSTRAP 61
  95. #define EE_PACKETS_OUT_OF_ORDER 62
  96. #define EE_UNKNOWN_PROTOCOL_OPTION 63
  97. #define EE_FAILED_TO_LOCATE_SERVER_PUBLIC_KEY 64
  98. #define EE_PUBLIC_KEY_NOT_IN_PEM_FORMAT 65
  99. #define EE_DEBUG_INFO 66
  100. #define EE_UNKNOWN_VARIABLE 67
  101. #define EE_UNKNOWN_OPTION 68
  102. #define EE_UNKNOWN_SHORT_OPTION 69
  103. #define EE_OPTION_WITHOUT_ARGUMENT 70
  104. #define EE_OPTION_REQUIRES_ARGUMENT 71
  105. #define EE_SHORT_OPTION_REQUIRES_ARGUMENT 72
  106. #define EE_OPTION_IGNORED_DUE_TO_INVALID_VALUE 73
  107. #define EE_OPTION_WITH_EMPTY_VALUE 74
  108. #define EE_FAILED_TO_ASSIGN_MAX_VALUE_TO_OPTION 75
  109. #define EE_INCORRECT_BOOLEAN_VALUE_FOR_OPTION 76
  110. #define EE_FAILED_TO_SET_OPTION_VALUE 77
  111. #define EE_INCORRECT_INT_VALUE_FOR_OPTION 78
  112. #define EE_INCORRECT_UINT_VALUE_FOR_OPTION 79
  113. #define EE_ADJUSTED_SIGNED_VALUE_FOR_OPTION 80
  114. #define EE_ADJUSTED_UNSIGNED_VALUE_FOR_OPTION 81
  115. #define EE_ADJUSTED_ULONGLONG_VALUE_FOR_OPTION 82
  116. #define EE_ADJUSTED_DOUBLE_VALUE_FOR_OPTION 83
  117. #define EE_INVALID_DECIMAL_VALUE_FOR_OPTION 84
  118. #define EE_COLLATION_PARSER_ERROR 85
  119. #define EE_FAILED_TO_RESET_BEFORE_PRIMARY_IGNORABLE_CHAR 86
  120. #define EE_FAILED_TO_RESET_BEFORE_TERTIARY_IGNORABLE_CHAR 87
  121. #define EE_SHIFT_CHAR_OUT_OF_RANGE 88
  122. #define EE_RESET_CHAR_OUT_OF_RANGE 89
  123. #define EE_UNKNOWN_LDML_TAG 90
  124. #define EE_FAILED_TO_RESET_BEFORE_SECONDARY_IGNORABLE_CHAR 91
  125. #define EE_ERROR_LAST 91 /* Copy last error nr */
  126. /* Add error numbers before EE_ERROR_LAST and change it accordingly. */
  127. /* Exit codes for option processing. When exiting from server use the
  128. MYSQLD_*EXIT codes defined in sql_const.h */
  129. #define EXIT_UNSPECIFIED_ERROR 1
  130. #define EXIT_UNKNOWN_OPTION 2
  131. #define EXIT_AMBIGUOUS_OPTION 3
  132. #define EXIT_NO_ARGUMENT_ALLOWED 4
  133. #define EXIT_ARGUMENT_REQUIRED 5
  134. #define EXIT_VAR_PREFIX_NOT_UNIQUE 6
  135. #define EXIT_UNKNOWN_VARIABLE 7
  136. #define EXIT_OUT_OF_MEMORY 8
  137. #define EXIT_UNKNOWN_SUFFIX 9
  138. #define EXIT_NO_PTR_TO_VARIABLE 10
  139. #define EXIT_CANNOT_CONNECT_TO_SERVICE 11
  140. #define EXIT_OPTION_DISABLED 12
  141. #define EXIT_ARGUMENT_INVALID 13
  142. #endif