~ubuntu-branches/ubuntu/trusty/mysql-5.6/trusty

« back to all changes in this revision

Viewing changes to storage/ndb/include/ndbapi/ndberror.h

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-02-12 11:54:27 UTC
  • Revision ID: package-import@ubuntu.com-20140212115427-oq6tfsqxl1wuwehi
Tags: upstream-5.6.15
ImportĀ upstreamĀ versionĀ 5.6.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
   Copyright (C) 2004-2006 MySQL AB
 
3
    All rights reserved. Use is subject to license terms.
 
4
 
 
5
   This program is free software; you can redistribute it and/or modify
 
6
   it under the terms of the GNU General Public License as published by
 
7
   the Free Software Foundation; version 2 of the License.
 
8
 
 
9
   This program is distributed in the hope that it will be useful,
 
10
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
   GNU General Public License for more details.
 
13
 
 
14
   You should have received a copy of the GNU General Public License
 
15
   along with this program; if not, write to the Free Software
 
16
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
 
17
*/
 
18
 
 
19
#ifndef NDBERROR_H
 
20
#define NDBERROR_H
 
21
 
 
22
#ifdef __cplusplus
 
23
extern "C" {
 
24
#endif
 
25
 
 
26
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
 
27
 
 
28
typedef enum
 
29
{
 
30
  ndberror_st_success = 0,
 
31
  ndberror_st_temporary = 1,
 
32
  ndberror_st_permanent = 2,
 
33
  ndberror_st_unknown = 3
 
34
} ndberror_status_enum;
 
35
 
 
36
typedef enum
 
37
{
 
38
  ndberror_cl_none = 0,  
 
39
  ndberror_cl_application = 1,  
 
40
  ndberror_cl_no_data_found = 2,
 
41
  ndberror_cl_constraint_violation = 3,
 
42
  ndberror_cl_schema_error = 4,
 
43
  ndberror_cl_user_defined = 5,
 
44
  ndberror_cl_insufficient_space = 6,
 
45
  ndberror_cl_temporary_resource = 7,
 
46
  ndberror_cl_node_recovery = 8,
 
47
  ndberror_cl_overload = 9,
 
48
  ndberror_cl_timeout_expired = 10,
 
49
  ndberror_cl_unknown_result = 11,
 
50
  ndberror_cl_internal_error = 12,
 
51
  ndberror_cl_function_not_implemented = 13,
 
52
  ndberror_cl_unknown_error_code = 14,
 
53
  ndberror_cl_node_shutdown = 15,
 
54
  ndberror_cl_configuration = 16,
 
55
  ndberror_cl_schema_object_already_exists = 17,
 
56
  ndberror_cl_internal_temporary = 18
 
57
} ndberror_classification_enum;
 
58
 
 
59
 
 
60
typedef struct {
 
61
 
 
62
  /**
 
63
   * Error status.  
 
64
   */
 
65
  ndberror_status_enum status;
 
66
 
 
67
  /**
 
68
   * Error type
 
69
   */
 
70
  ndberror_classification_enum classification;
 
71
  
 
72
  /**
 
73
   * Error code
 
74
   */
 
75
  int code;
 
76
 
 
77
  /**
 
78
   * Mysql error code
 
79
   */
 
80
  int mysql_code;
 
81
 
 
82
  /**
 
83
   * Error message
 
84
   */
 
85
  const char * message;
 
86
 
 
87
  /**
 
88
   * The detailed description.  This is extra information regarding the 
 
89
   * error which is not included in the error message.
 
90
   *
 
91
   * @note Is NULL when no details specified
 
92
   */
 
93
  char * details;
 
94
 
 
95
} ndberror_struct;
 
96
 
 
97
 
 
98
typedef ndberror_status_enum ndberror_status;
 
99
typedef  ndberror_classification_enum ndberror_classification;
 
100
 
 
101
const char *ndberror_status_message(ndberror_status);
 
102
const char *ndberror_classification_message(ndberror_classification);
 
103
void ndberror_update(ndberror_struct *);
 
104
int ndb_error_string(int err_no, char *str, int size);
 
105
 
 
106
#endif /* doxygen skip internal*/
 
107
 
 
108
#ifdef __cplusplus
 
109
}
 
110
#endif
 
111
 
 
112
#endif