~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/errmsg.h

  • Committer: Monty Taylor
  • Date: 2009-01-30 21:02:37 UTC
  • mto: (779.7.3 devel)
  • mto: This revision was merged to the branch mainline in revision 823.
  • Revision ID: mordred@inaugust.com-20090130210237-3n6ld8a9jc084jko
Commented out a test in subselect_sj - I think it might be a regression. Jay?

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 MySQL
 
4
 *  Copyright (C) 2008 Sun Microsystems, Inc.
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
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.
 
8
 *  the Free Software Foundation; version 2 of the License.
10
9
 *
11
10
 *  This program is distributed in the hope that it will be useful,
12
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
24
23
/* Error messages for MySQL clients */
25
24
/* (Error messages for the daemon are in sql/share/errmsg.txt) */
26
25
 
27
 
#ifdef  __cplusplus
 
26
#ifdef  __cplusplus
28
27
extern "C" {
29
28
#endif
30
29
const char * get_client_error(unsigned int err_index);
31
 
#ifdef  __cplusplus
 
30
#ifdef  __cplusplus
32
31
}
33
32
#endif
34
33
 
35
 
#define CR_MIN_ERROR            2000    /* For easier client code */
36
 
#define CR_MAX_ERROR            2999
 
34
#define CR_MIN_ERROR    2000  /* For easier client code */
 
35
#define CR_MAX_ERROR    2999
37
36
#if !defined(ER)
38
37
#define ER(X) get_client_error((X)-CR_MIN_ERROR)
39
38
#endif
40
 
#define CLIENT_ERRMAP           2       /* Errormap used by my_error() */
 
39
#define CLIENT_ERRMAP    2  /* Errormap used by my_error() */
41
40
 
42
41
/* Do not add error numbers before CR_ERROR_FIRST. */
43
42
/* If necessary to add lower numbers, change CR_ERROR_FIRST accordingly. */
44
 
#define CR_ERROR_FIRST          2000 /*Copy first error nr.*/
45
 
#define CR_UNKNOWN_ERROR        2000
46
 
#define CR_SOCKET_CREATE_ERROR  2001
47
 
#define CR_CONNECTION_ERROR     2002
48
 
#define CR_CONN_HOST_ERROR      2003
49
 
#define CR_IPSOCK_ERROR         2004
50
 
#define CR_UNKNOWN_HOST         2005
51
 
#define CR_SERVER_GONE_ERROR    2006
52
 
#define CR_VERSION_ERROR        2007
53
 
#define CR_OUT_OF_MEMORY        2008
54
 
#define CR_WRONG_HOST_INFO      2009
55
 
#define CR_LOCALHOST_CONNECTION 2010
56
 
#define CR_TCP_CONNECTION       2011
57
 
#define CR_SERVER_HANDSHAKE_ERR 2012
58
 
#define CR_SERVER_LOST          2013
59
 
#define CR_COMMANDS_OUT_OF_SYNC 2014
60
 
#define CR_NAMEDPIPE_CONNECTION 2015
61
 
#define CR_NAMEDPIPEWAIT_ERROR  2016
62
 
#define CR_NAMEDPIPEOPEN_ERROR  2017
63
 
#define CR_NAMEDPIPESETSTATE_ERROR 2018
64
 
#define CR_CANT_READ_CHARSET    2019
65
 
#define CR_NET_PACKET_TOO_LARGE 2020
66
 
#define CR_EMBEDDED_CONNECTION  2021
67
 
#define CR_PROBE_SLAVE_STATUS   2022
68
 
#define CR_PROBE_SLAVE_HOSTS    2023
69
 
#define CR_PROBE_SLAVE_CONNECT  2024
70
 
#define CR_PROBE_MASTER_CONNECT 2025
71
 
#define CR_SSL_CONNECTION_ERROR 2026
72
 
#define CR_MALFORMED_PACKET     2027
73
 
#define CR_WRONG_LICENSE        2028
74
 
 
75
 
/* new 4.1 error codes */
76
 
#define CR_NULL_POINTER         2029
77
 
#define CR_NO_PREPARE_STMT      2030
78
 
#define CR_PARAMS_NOT_BOUND     2031
79
 
#define CR_DATA_TRUNCATED       2032
80
 
#define CR_NO_PARAMETERS_EXISTS 2033
81
 
#define CR_INVALID_PARAMETER_NO 2034
82
 
#define CR_INVALID_BUFFER_USE   2035
83
 
#define CR_UNSUPPORTED_PARAM_TYPE 2036
84
 
 
85
 
#define CR_SHARED_MEMORY_CONNECTION             2037
86
 
#define CR_SHARED_MEMORY_CONNECT_REQUEST_ERROR  2038
87
 
#define CR_SHARED_MEMORY_CONNECT_ANSWER_ERROR   2039
88
 
#define CR_SHARED_MEMORY_CONNECT_FILE_MAP_ERROR 2040
89
 
#define CR_SHARED_MEMORY_CONNECT_MAP_ERROR      2041
90
 
#define CR_SHARED_MEMORY_FILE_MAP_ERROR         2042
91
 
#define CR_SHARED_MEMORY_MAP_ERROR              2043
92
 
#define CR_SHARED_MEMORY_EVENT_ERROR            2044
93
 
#define CR_SHARED_MEMORY_CONNECT_ABANDONED_ERROR 2045
94
 
#define CR_SHARED_MEMORY_CONNECT_SET_ERROR      2046
95
 
#define CR_CONN_UNKNOW_PROTOCOL                 2047
96
 
#define CR_INVALID_CONN_HANDLE                  2048
97
 
#define CR_SECURE_AUTH                          2049
98
 
#define CR_FETCH_CANCELED                       2050
99
 
#define CR_NO_DATA                              2051
100
 
#define CR_NO_STMT_METADATA                     2052
101
 
#define CR_NO_RESULT_SET                        2053
102
 
#define CR_NOT_IMPLEMENTED                      2054
103
 
#define CR_SERVER_LOST_EXTENDED                 2055
104
 
#define CR_STMT_CLOSED                          2056
105
 
#define CR_ERROR_LAST  /*Copy last error nr:*/  2056
106
 
/* Add error numbers before CR_ERROR_LAST and change it accordingly. */
107
 
 
 
43
enum CR_CLIENT_ERRORS {
 
44
  CR_ERROR_FIRST    =2000, /*Copy first error nr.*/
 
45
  CR_UNKNOWN_ERROR  =2000,
 
46
  CR_SOCKET_CREATE_ERROR  =2001,
 
47
  CR_CONNECTION_ERROR  =2002,
 
48
  CR_CONN_HOST_ERROR  =2003,
 
49
  CR_IPSOCK_ERROR    =2004,
 
50
  CR_UNKNOWN_HOST    =2005,
 
51
  CR_SERVER_GONE_ERROR  =2006,
 
52
  CR_VERSION_ERROR  =2007,
 
53
  CR_OUT_OF_MEMORY  =2008,
 
54
  CR_WRONG_HOST_INFO  =2009,
 
55
  CR_LOCALHOST_CONNECTION =2010,
 
56
  CR_TCP_CONNECTION  =2011,
 
57
  CR_SERVER_HANDSHAKE_ERR =2012,
 
58
  CR_SERVER_LOST    =2013,
 
59
  CR_COMMANDS_OUT_OF_SYNC =2014,
 
60
  CR_NAMEDPIPE_CONNECTION =2015,
 
61
  CR_NAMEDPIPEWAIT_ERROR  =2016,
 
62
  CR_NAMEDPIPEOPEN_ERROR  =2017,
 
63
  CR_NAMEDPIPESETSTATE_ERROR =2018,
 
64
  CR_CANT_READ_CHARSET  =2019,
 
65
  CR_NET_PACKET_TOO_LARGE =2020,
 
66
  CR_EMBEDDED_CONNECTION  =2021,
 
67
  CR_PROBE_SLAVE_STATUS   =2022,
 
68
  CR_PROBE_SLAVE_HOSTS    =2023,
 
69
  CR_PROBE_SLAVE_CONNECT  =2024,
 
70
  CR_PROBE_MASTER_CONNECT =2025,
 
71
  CR_SSL_CONNECTION_ERROR =2026,
 
72
  CR_MALFORMED_PACKET     =2027,
 
73
 
 
74
  CR_NULL_POINTER    =2029,
 
75
  CR_NO_PREPARE_STMT  =2030,
 
76
  CR_PARAMS_NOT_BOUND  =2031,
 
77
  CR_DATA_TRUNCATED  =2032,
 
78
  CR_NO_PARAMETERS_EXISTS =2033,
 
79
  CR_INVALID_PARAMETER_NO =2034,
 
80
  CR_INVALID_BUFFER_USE  =2035,
 
81
  CR_UNSUPPORTED_PARAM_TYPE =2036,
 
82
 
 
83
  CR_CONN_UNKNOW_PROTOCOL     =2047,
 
84
  CR_INVALID_CONN_HANDLE      =2048,
 
85
  CR_SECURE_AUTH                          =2049,
 
86
  CR_FETCH_CANCELED                       =2050,
 
87
  CR_NO_DATA                              =2051,
 
88
  CR_NO_STMT_METADATA                     =2052,
 
89
  CR_NO_RESULT_SET                        =2053,
 
90
  CR_NOT_IMPLEMENTED                      =2054,
 
91
  CR_SERVER_LOST_INITIAL_COMM_WAIT  =2055,
 
92
  CR_SERVER_LOST_INITIAL_COMM_READ  =2056,
 
93
  CR_SERVER_LOST_SEND_AUTH    =2057,
 
94
  CR_SERVER_LOST_READ_AUTH    =2058,
 
95
  CR_SERVER_LOST_SETTING_DB    =2059,
 
96
 
 
97
  CR_STMT_CLOSED  =2060,
 
98
 
 
99
  CR_NET_UNCOMPRESS_ERROR= 2061,
 
100
  CR_NET_READ_ERROR= 2062,
 
101
  CR_NET_READ_INTERRUPTED= 2063,
 
102
  CR_NET_ERROR_ON_WRITE= 2064,
 
103
  CR_NET_WRITE_INTERRUPTED= 2065,
 
104
 
 
105
  /* Add error numbers before CR_ERROR_LAST and change it accordingly. */
 
106
  CR_ERROR_LAST    =2065 /*Copy last error nr:*/
 
107
};
108
108
 
109
109
#endif