1
/* Copyright (C) 2000-2004 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.
7
There are special exceptions to the terms and conditions of the GPL as it
8
is applied to this software. View the full text of the exception in file
9
EXCEPTIONS-CLIENT in the directory of this software distribution.
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.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2008 Sun Microsystems, Inc.
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; version 2 of the License.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20
20
/* Error messages for MySQL clients */
21
/* (Error messages for the daemon are in share/language/errmsg.sys) */
23
#include <drizzled/global.h>
23
#include <drizzled/gettext.h>
24
24
#include "errmsg.h"
26
const char *client_errors[]=
28
"Unknown MySQL error",
29
"Can't create UNIX socket (%d)",
30
"Can't connect to local MySQL server through socket '%-.100s' (%d)",
31
"Can't connect to MySQL server on '%-.100s' (%d)",
32
"Can't create TCP/IP socket (%d)",
33
"Unknown MySQL server host '%-.100s' (%d)",
34
"MySQL server has gone away",
35
"Protocol mismatch; server version = %d, client version = %d",
36
"MySQL client ran out of memory",
38
"Localhost via UNIX socket",
40
"Error in server handshake",
41
"Lost connection to MySQL server during query",
42
"Commands out of sync; you can't run this command now",
44
"Can't wait for named pipe to host: %-.64s pipe: %-.32s (%lu)",
45
"Can't open named pipe to host: %-.64s pipe: %-.32s (%lu)",
46
"Can't set state of named pipe to host: %-.64s pipe: %-.32s (%lu)",
47
"Can't initialize character set %-.32s (path: %-.100s)",
48
"Got packet bigger than 'max_allowed_packet' bytes",
50
"Error on SHOW SLAVE STATUS:",
51
"Error on SHOW SLAVE HOSTS:",
52
"Error connecting to slave:",
53
"Error connecting to master:",
54
"SSL connection error",
56
"This client library is licensed only for use with MySQL servers having '%s' license",
57
"Invalid use of null pointer",
58
"Statement not prepared",
59
"No data supplied for parameters in prepared statement",
61
"No parameters exist in the statement",
62
"Invalid parameter number",
63
"Can't send long data for non-string/non-binary data types (parameter: %d)",
64
"Using unsupported buffer type: %d (parameter: %d)",
65
"Shared memory: %-.100s",
66
"Can't open shared memory; client could not create request event (%lu)",
67
"Can't open shared memory; no answer event received from server (%lu)",
68
"Can't open shared memory; server could not allocate file mapping (%lu)",
69
"Can't open shared memory; server could not get pointer to file mapping (%lu)",
70
"Can't open shared memory; client could not allocate file mapping (%lu)",
71
"Can't open shared memory; client could not get pointer to file mapping (%lu)",
72
"Can't open shared memory; client could not create %s event (%lu)",
73
"Can't open shared memory; no answer from server (%lu)",
74
"Can't open shared memory; cannot send request event to server (%lu)",
75
"Wrong or unknown protocol",
76
"Invalid connection handle",
77
"Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)",
78
"Row retrieval was canceled by drizzle_stmt_close() call",
79
"Attempt to read column without prior row fetch",
80
"Prepared statement contains no metadata",
81
"Attempt to read a row while there is no result set associated with the statement",
82
"This feature is not implemented yet",
83
"Lost connection to MySQL server at '%s', system error: %d",
84
"Statement closed indirectly because of a preceeding %s() call",
26
namespace drizzle_protocol
29
static const char *client_errors[]=
31
N_("Unknown Drizzle error"),
32
N_("Can't create UNIX socket (%d)"),
33
N_("Can't connect to local Drizzle server through socket '%-.100s' (%d)"),
34
N_("Can't connect to Drizzle server on '%-.100s:%lu' (%d)"),
35
N_("Can't create TCP/IP socket (%d)"),
36
N_("Unknown Drizzle server host '%-.100s' (%d)"),
37
N_("Drizzle server has gone away"),
38
N_("Protocol mismatch; server version = %d, client version = %d"),
39
N_("Drizzle client ran out of memory"),
40
N_("Wrong host info"),
41
N_("Localhost via UNIX socket"),
42
N_("%-.100s via TCP/IP"),
43
N_("Error in server handshake"),
44
N_("Lost connection to Drizzle server during query"),
45
N_("Commands out of sync; you can't run this command now"),
46
N_("Named pipe: %-.32s"),
47
N_("Can't wait for named pipe to host: %-.64s pipe: %-.32s (%lu)"),
48
N_("Can't open named pipe to host: %-.64s pipe: %-.32s (%lu)"),
49
N_("Can't set state of named pipe to host: %-.64s pipe: %-.32s (%lu)"),
50
N_("Can't initialize character set %-.32s (path: %-.100s)"),
51
N_("Got packet bigger than 'max_allowed_packet' bytes"),
52
N_("Embedded server"),
53
N_("Error on SHOW SLAVE STATUS:"),
54
N_("Error on SHOW SLAVE HOSTS:"),
55
N_("Error connecting to slave:"),
56
N_("Error connecting to master:"),
57
N_("SSL connection error"),
58
N_("Malformed packet"),
59
N_("(unused error message)"),
60
N_("Invalid use of null pointer"),
61
N_("Statement not prepared"),
62
N_("No data supplied for parameters in prepared statement"),
64
N_("No parameters exist in the statement"),
65
N_("Invalid parameter number"),
66
N_("Can't send long data for non-string/non-binary data types "
68
N_("Using unsupported buffer type: %d (parameter: %d)"),
69
N_("Shared memory: %-.100s"),
70
N_("(unused error message)"),
71
N_("(unused error message)"),
72
N_("(unused error message)"),
73
N_("(unused error message)"),
74
N_("(unused error message)"),
75
N_("(unused error message)"),
76
N_("(unused error message)"),
77
N_("(unused error message)"),
78
N_("(unused error message)"),
79
N_("Wrong or unknown protocol"),
80
N_("Invalid connection handle"),
81
N_("Connection using old (pre-4.1.1) authentication protocol refused "
82
"(client option 'secure_auth' enabled)"),
83
N_("Row retrieval was canceled by drizzle_stmt_close() call"),
84
N_("Attempt to read column without prior row fetch"),
85
N_("Prepared statement contains no metadata"),
86
N_("Attempt to read a row while there is no result set associated with "
88
N_("This feature is not implemented yet"),
89
N_("Lost connection to Drizzle server while waiting for initial "
90
"communication packet, system error: %d"),
91
N_("Lost connection to Drizzle server while reading initial communication "
92
"packet, system error: %d"),
93
N_("Lost connection to Drizzle server while sending authentication "
94
"information, system error: %d"),
95
N_("Lost connection to Drizzle server while reading authorization "
96
"information, system error: %d"),
97
N_("Lost connection to Drizzle server while setting initial database, "
99
N_("Statement closed indirectly because of a preceding %s() call"),
100
/* CR_NET_UNCOMPRESS_ERROR 08S01 */
101
N_("Couldn't uncompress communication packet"),
102
/* CR_NET_READ_ERROR 08S01 */
103
N_("Got an error reading communication packets"),
104
/* CR_NET_READ_INTERRUPTED 08S01 */
105
N_("Got timeout reading communication packets"),
106
/* CR_NET_ERROR_ON_WRITE 08S01 */
107
N_("Got an error writing communication packets"),
108
/* CR_NET_WRITE_INTERRUPTED 08S01 */
109
N_("Got timeout writing communication packets"),
90
get_client_error(unsigned int err_index)
115
drizzleclient_get_client_error(unsigned int err_index)
92
return client_errors[err_index];
117
return _(client_errors[err_index]);
120
} /* namespace drizzle_protocol */