~drizzle-trunk/drizzle/development

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
27
#ifdef	__cplusplus
28
extern "C" {
29
#endif
30
void	init_client_errs(void);
31
void	finish_client_errs(void);
32
extern const char *client_errors[];	/* Error messages */
33
#ifdef	__cplusplus
34
}
35
#endif
36
37
#define CR_MIN_ERROR		2000	/* For easier client code */
38
#define CR_MAX_ERROR		2999
39
#if !defined(ER)
40
#define ER(X) client_errors[(X)-CR_MIN_ERROR]
41
#endif
42
#define CLIENT_ERRMAP		2	/* Errormap used by my_error() */
43
44
/* Do not add error numbers before CR_ERROR_FIRST. */
45
/* If necessary to add lower numbers, change CR_ERROR_FIRST accordingly. */
46
#define CR_ERROR_FIRST  	2000 /*Copy first error nr.*/
47
#define CR_UNKNOWN_ERROR	2000
48
#define CR_SOCKET_CREATE_ERROR	2001
49
#define CR_CONNECTION_ERROR	2002
50
#define CR_CONN_HOST_ERROR	2003
51
#define CR_IPSOCK_ERROR		2004
52
#define CR_UNKNOWN_HOST		2005
53
#define CR_SERVER_GONE_ERROR	2006
54
#define CR_VERSION_ERROR	2007
55
#define CR_OUT_OF_MEMORY	2008
56
#define CR_WRONG_HOST_INFO	2009
57
#define CR_LOCALHOST_CONNECTION 2010
58
#define CR_TCP_CONNECTION	2011
59
#define CR_SERVER_HANDSHAKE_ERR 2012
60
#define CR_SERVER_LOST		2013
61
#define CR_COMMANDS_OUT_OF_SYNC 2014
62
#define CR_NAMEDPIPE_CONNECTION 2015
63
#define CR_NAMEDPIPEWAIT_ERROR  2016
64
#define CR_NAMEDPIPEOPEN_ERROR  2017
65
#define CR_NAMEDPIPESETSTATE_ERROR 2018
66
#define CR_CANT_READ_CHARSET	2019
67
#define CR_NET_PACKET_TOO_LARGE 2020
68
#define CR_EMBEDDED_CONNECTION	2021
69
#define CR_PROBE_SLAVE_STATUS   2022
70
#define CR_PROBE_SLAVE_HOSTS    2023
71
#define CR_PROBE_SLAVE_CONNECT  2024
72
#define CR_PROBE_MASTER_CONNECT 2025
73
#define CR_SSL_CONNECTION_ERROR 2026
74
#define CR_MALFORMED_PACKET     2027
75
#define CR_WRONG_LICENSE	2028
76
77
/* new 4.1 error codes */
78
#define CR_NULL_POINTER		2029
79
#define CR_NO_PREPARE_STMT	2030
80
#define CR_PARAMS_NOT_BOUND	2031
81
#define CR_DATA_TRUNCATED	2032
82
#define CR_NO_PARAMETERS_EXISTS 2033
83
#define CR_INVALID_PARAMETER_NO 2034
84
#define CR_INVALID_BUFFER_USE	2035
85
#define CR_UNSUPPORTED_PARAM_TYPE 2036
86
87
#define CR_SHARED_MEMORY_CONNECTION             2037
88
#define CR_SHARED_MEMORY_CONNECT_REQUEST_ERROR  2038
89
#define CR_SHARED_MEMORY_CONNECT_ANSWER_ERROR   2039
90
#define CR_SHARED_MEMORY_CONNECT_FILE_MAP_ERROR 2040
91
#define CR_SHARED_MEMORY_CONNECT_MAP_ERROR      2041
92
#define CR_SHARED_MEMORY_FILE_MAP_ERROR         2042
93
#define CR_SHARED_MEMORY_MAP_ERROR              2043
94
#define CR_SHARED_MEMORY_EVENT_ERROR     	2044
95
#define CR_SHARED_MEMORY_CONNECT_ABANDONED_ERROR 2045
96
#define CR_SHARED_MEMORY_CONNECT_SET_ERROR      2046
97
#define CR_CONN_UNKNOW_PROTOCOL 		2047
98
#define CR_INVALID_CONN_HANDLE			2048
99
#define CR_SECURE_AUTH                          2049
100
#define CR_FETCH_CANCELED                       2050
101
#define CR_NO_DATA                              2051
102
#define CR_NO_STMT_METADATA                     2052
103
#define CR_NO_RESULT_SET                        2053
104
#define CR_NOT_IMPLEMENTED                      2054
105
#define CR_SERVER_LOST_EXTENDED			2055
106
#define CR_STMT_CLOSED				2056
107
#define CR_ERROR_LAST  /*Copy last error nr:*/  2056
108
/* Add error numbers before CR_ERROR_LAST and change it accordingly. */
109
236.1.23 by Monty Taylor
Cleaned header headers.
110
111
#endif