MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mgmapi_error.h
1 /*
2  Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; version 2 of the License.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; if not, write to the Free Software
15  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17 
18 #ifndef MGMAPI_ERROR_H
19 #define MGMAPI_ERROR_H
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
27  enum ndb_mgm_error {
29  NDB_MGM_NO_ERROR = 0,
30 
31  /* Request for service errors */
33  NDB_MGM_ILLEGAL_CONNECT_STRING = 1001,
35  NDB_MGM_ILLEGAL_SERVER_HANDLE = 1005,
37  NDB_MGM_ILLEGAL_SERVER_REPLY = 1006,
39  NDB_MGM_ILLEGAL_NUMBER_OF_NODES = 1007,
41  NDB_MGM_ILLEGAL_NODE_STATUS = 1008,
43  NDB_MGM_OUT_OF_MEMORY = 1009,
45  NDB_MGM_SERVER_NOT_CONNECTED = 1010,
47  NDB_MGM_COULD_NOT_CONNECT_TO_SOCKET = 1011,
49  NDB_MGM_BIND_ADDRESS = 1012,
50 
51  /* Alloc node id failures */
53  NDB_MGM_ALLOCID_ERROR = 1101,
55  NDB_MGM_ALLOCID_CONFIG_MISMATCH = 1102,
56 
57  /* Service errors - Start/Stop Node or System */
59  NDB_MGM_START_FAILED = 2001,
61  NDB_MGM_STOP_FAILED = 2002,
63  NDB_MGM_RESTART_FAILED = 2003,
64 
65  /* Service errors - Backup */
67  NDB_MGM_COULD_NOT_START_BACKUP = 3001,
69  NDB_MGM_COULD_NOT_ABORT_BACKUP = 3002,
70 
71  /* Service errors - Single User Mode */
73  NDB_MGM_COULD_NOT_ENTER_SINGLE_USER_MODE = 4001,
75  NDB_MGM_COULD_NOT_EXIT_SINGLE_USER_MODE = 4002,
76 
77  /* Service errors - Configuration change */
79  NDB_MGM_CONFIG_CHANGE_FAILED = 4011,
81  NDB_MGM_GET_CONFIG_FAILED = 4012,
82 
83  /* Usage errors */
85  NDB_MGM_USAGE_ERROR = 5001
86  };
87 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
89  enum ndb_mgm_error code;
90  const char * msg;
91  };
92 
93  extern const struct Ndb_Mgm_Error_Msg ndb_mgm_error_msgs[];
94  extern const int ndb_mgm_noOfErrorMsgs;
95 #endif
96 
97 /* Include error messages when sourced from perror(or special define set) */
98 #if defined PERROR_VERSION || defined MGMAPI_ERROR_INCLUDE_MESSAGES
99 #include "../../src/mgmapi/mgmapi_error.c"
100 #endif
101 
102 #ifdef __cplusplus
103 }
104 #endif
105 
106 #endif