236.1.23
by Monty Taylor
Cleaned header headers. |
1 |
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
|
2 |
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
|
|
3 |
*
|
|
4 |
* Copyright (C) 2008 MySQL
|
|
5 |
*
|
|
6 |
* This program is free software; you can redistribute it and/or modify
|
|
7 |
* it under the terms of the GNU General Public License as published by
|
|
8 |
* the Free Software Foundation; either version 2 of the License, or
|
|
9 |
* (at your option) any later version.
|
|
10 |
*
|
|
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 for more details.
|
|
15 |
*
|
|
16 |
* You should have received a copy of the GNU General Public License
|
|
17 |
* along with this program; if not, write to the Free Software
|
|
18 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
19 |
*/
|
|
20 |
||
21 |
#ifndef _libdrizzle_errmsg_h
|
|
22 |
#define _libdrizzle_errmsg_h
|
|
1
by brian
clean slate |
23 |
|
24 |
/* Error messages for MySQL clients */
|
|
25 |
/* (Error messages for the daemon are in sql/share/errmsg.txt) */
|
|
26 |
||
337
by Monty Taylor
Cleaned up libdrizzle error messages a little more. |
27 |
#ifdef __cplusplus
|
1
by brian
clean slate |
28 |
extern "C" { |
29 |
#endif
|
|
329
by Monty Taylor
Changed client_errors to be exposed through a function. |
30 |
const char * get_client_error(unsigned int err_index); |
337
by Monty Taylor
Cleaned up libdrizzle error messages a little more. |
31 |
#ifdef __cplusplus
|
1
by brian
clean slate |
32 |
}
|
33 |
#endif
|
|
34 |
||
337
by Monty Taylor
Cleaned up libdrizzle error messages a little more. |
35 |
#define CR_MIN_ERROR 2000 /* For easier client code */ |
36 |
#define CR_MAX_ERROR 2999
|
|
1
by brian
clean slate |
37 |
#if !defined(ER)
|
329
by Monty Taylor
Changed client_errors to be exposed through a function. |
38 |
#define ER(X) get_client_error((X)-CR_MIN_ERROR)
|
1
by brian
clean slate |
39 |
#endif
|
337
by Monty Taylor
Cleaned up libdrizzle error messages a little more. |
40 |
#define CLIENT_ERRMAP 2 /* Errormap used by my_error() */ |
1
by brian
clean slate |
41 |
|
42 |
/* Do not add error numbers before CR_ERROR_FIRST. */
|
|
43 |
/* If necessary to add lower numbers, change CR_ERROR_FIRST accordingly. */
|
|
337
by Monty Taylor
Cleaned up libdrizzle error messages a little more. |
44 |
enum CR_CLIENT_ERRORS { |
45 |
CR_ERROR_FIRST =2000, /*Copy first error nr.*/ |
|
46 |
CR_UNKNOWN_ERROR =2000, |
|
47 |
CR_SOCKET_CREATE_ERROR =2001, |
|
48 |
CR_CONNECTION_ERROR =2002, |
|
49 |
CR_CONN_HOST_ERROR =2003, |
|
50 |
CR_IPSOCK_ERROR =2004, |
|
51 |
CR_UNKNOWN_HOST =2005, |
|
52 |
CR_SERVER_GONE_ERROR =2006, |
|
53 |
CR_VERSION_ERROR =2007, |
|
54 |
CR_OUT_OF_MEMORY =2008, |
|
55 |
CR_WRONG_HOST_INFO =2009, |
|
56 |
CR_LOCALHOST_CONNECTION =2010, |
|
57 |
CR_TCP_CONNECTION =2011, |
|
58 |
CR_SERVER_HANDSHAKE_ERR =2012, |
|
59 |
CR_SERVER_LOST =2013, |
|
60 |
CR_COMMANDS_OUT_OF_SYNC =2014, |
|
61 |
CR_NAMEDPIPE_CONNECTION =2015, |
|
62 |
CR_NAMEDPIPEWAIT_ERROR =2016, |
|
63 |
CR_NAMEDPIPEOPEN_ERROR =2017, |
|
64 |
CR_NAMEDPIPESETSTATE_ERROR =2018, |
|
65 |
CR_CANT_READ_CHARSET =2019, |
|
66 |
CR_NET_PACKET_TOO_LARGE =2020, |
|
67 |
CR_EMBEDDED_CONNECTION =2021, |
|
68 |
CR_PROBE_SLAVE_STATUS =2022, |
|
69 |
CR_PROBE_SLAVE_HOSTS =2023, |
|
70 |
CR_PROBE_SLAVE_CONNECT =2024, |
|
71 |
CR_PROBE_MASTER_CONNECT =2025, |
|
72 |
CR_SSL_CONNECTION_ERROR =2026, |
|
73 |
CR_MALFORMED_PACKET =2027, |
|
74 |
||
75 |
CR_NULL_POINTER =2029, |
|
76 |
CR_NO_PREPARE_STMT =2030, |
|
77 |
CR_PARAMS_NOT_BOUND =2031, |
|
78 |
CR_DATA_TRUNCATED =2032, |
|
79 |
CR_NO_PARAMETERS_EXISTS =2033, |
|
80 |
CR_INVALID_PARAMETER_NO =2034, |
|
81 |
CR_INVALID_BUFFER_USE =2035, |
|
82 |
CR_UNSUPPORTED_PARAM_TYPE =2036, |
|
83 |
||
84 |
CR_CONN_UNKNOW_PROTOCOL =2047, |
|
85 |
CR_INVALID_CONN_HANDLE =2048, |
|
86 |
CR_SECURE_AUTH =2049, |
|
87 |
CR_FETCH_CANCELED =2050, |
|
88 |
CR_NO_DATA =2051, |
|
89 |
CR_NO_STMT_METADATA =2052, |
|
90 |
CR_NO_RESULT_SET =2053, |
|
91 |
CR_NOT_IMPLEMENTED =2054, |
|
92 |
CR_SERVER_LOST_INITIAL_COMM_WAIT =2055, |
|
93 |
CR_SERVER_LOST_INITIAL_COMM_READ =2056, |
|
94 |
CR_SERVER_LOST_SEND_AUTH =2057, |
|
95 |
CR_SERVER_LOST_READ_AUTH =2058, |
|
96 |
CR_SERVER_LOST_SETTING_DB =2059, |
|
97 |
||
98 |
CR_STMT_CLOSED =2060, |
|
99 |
/* Add error numbers before CR_ERROR_LAST and change it accordingly. */
|
|
100 |
CR_ERROR_LAST =2060 /*Copy last error nr:*/ |
|
101 |
};
|
|
236.1.23
by Monty Taylor
Cleaned header headers. |
102 |
|
103 |
#endif
|