mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / storage / ndb / include / ndbapi / ndberror.h
blob7dc8ae7217c9ffa52175f3ab346c5e182c4e9c84
1 /* Copyright (c) 2003-2006 MySQL AB
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; version 2 of the License.
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
12 You should have received a copy of the GNU General Public License
13 along with this program; if not, write to the Free Software
14 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
16 #ifndef NDBERROR_H
17 #define NDBERROR_H
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
23 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
25 typedef enum
27 ndberror_st_success = 0,
28 ndberror_st_temporary = 1,
29 ndberror_st_permanent = 2,
30 ndberror_st_unknown = 3
31 } ndberror_status_enum;
33 typedef enum
35 ndberror_cl_none = 0,
36 ndberror_cl_application = 1,
37 ndberror_cl_no_data_found = 2,
38 ndberror_cl_constraint_violation = 3,
39 ndberror_cl_schema_error = 4,
40 ndberror_cl_user_defined = 5,
41 ndberror_cl_insufficient_space = 6,
42 ndberror_cl_temporary_resource = 7,
43 ndberror_cl_node_recovery = 8,
44 ndberror_cl_overload = 9,
45 ndberror_cl_timeout_expired = 10,
46 ndberror_cl_unknown_result = 11,
47 ndberror_cl_internal_error = 12,
48 ndberror_cl_function_not_implemented = 13,
49 ndberror_cl_unknown_error_code = 14,
50 ndberror_cl_node_shutdown = 15,
51 ndberror_cl_configuration = 16,
52 ndberror_cl_schema_object_already_exists = 17,
53 ndberror_cl_internal_temporary = 18
54 } ndberror_classification_enum;
57 typedef struct {
59 /**
60 * Error status.
62 ndberror_status_enum status;
64 /**
65 * Error type
67 ndberror_classification_enum classification;
69 /**
70 * Error code
72 int code;
74 /**
75 * Mysql error code
77 int mysql_code;
79 /**
80 * Error message
82 const char * message;
84 /**
85 * The detailed description. This is extra information regarding the
86 * error which is not included in the error message.
88 * @note Is NULL when no details specified
90 char * details;
92 } ndberror_struct;
95 typedef ndberror_status_enum ndberror_status;
96 typedef ndberror_classification_enum ndberror_classification;
98 const char *ndberror_status_message(ndberror_status);
99 const char *ndberror_classification_message(ndberror_classification);
100 void ndberror_update(ndberror_struct *);
101 int ndb_error_string(int err_no, char *str, int size);
103 #endif /* doxygen skip internal*/
105 #ifdef __cplusplus
107 #endif
109 #endif