~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/errmsg.c

  • Committer: Brian Aker
  • Date: 2008-08-18 04:35:40 UTC
  • mfrom: (342 codestyle)
  • mto: This revision was merged to the branch mainline in revision 352.
  • Revision ID: brian@tangent.org-20080818043540-numg7vydi7b0bzcd
Mering Monty's work

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
/* (Error messages for the daemon are in share/language/errmsg.sys) */
22
22
 
23
23
#include <drizzled/global.h>
24
 
#include <mysys/my_sys.h>
 
24
#include <libdrizzle/gettext.h>
25
25
#include "errmsg.h"
26
26
 
27
 
#ifdef GERMAN
28
 
const char *client_errors[]=
29
 
{
30
 
  "Unbekannter MySQL Fehler",
31
 
  "Kann UNIX-Socket nicht anlegen (%d)",
32
 
  "Keine Verbindung zu lokalem MySQL Server, socket: '%-.100s' (%d)",
33
 
  "Keine Verbindung zu MySQL Server auf %-.100s (%d)",
34
 
  "Kann TCP/IP-Socket nicht anlegen (%d)",
35
 
  "Unbekannter MySQL Server Host (%-.100s) (%d)",
36
 
  "MySQL Server nicht vorhanden",
37
 
  "Protokolle ungleich; Server Version = %d, Client Version = %d",
38
 
  "MySQL client ran out of memory",
39
 
  "Wrong host info",
40
 
  "Localhost via UNIX socket",
41
 
  "%-.100s via TCP/IP",
42
 
  "Error in server handshake",
43
 
  "Lost connection to MySQL server during query",
44
 
  "Commands out of sync; you can't run this command now",
45
 
  "Verbindung ueber Named Pipe: %-.32s",
46
 
  "Kann nicht auf Named Pipe warten. Host: %-.64s  pipe: %-.32s (%lu)",
47
 
  "Kann Named Pipe nicht oeffnen. Host: %-.64s  pipe: %-.32s (%lu)",
48
 
  "Kann den Status der Named Pipe nicht setzen.  Host: %-.64s  pipe: %-.32s (%lu)",
49
 
  "Can't initialize character set %-.32s (path: %-.100s)",
50
 
  "Got packet bigger than 'max_allowed_packet' bytes",
51
 
  "Embedded server",
52
 
  "Error on SHOW SLAVE STATUS:",
53
 
  "Error on SHOW SLAVE HOSTS:",
54
 
  "Error connecting to slave:",
55
 
  "Error connecting to master:",
56
 
  "SSL connection error",
57
 
  "Malformed packet",
58
 
  "This client library is licensed only for use with MySQL servers having '%s' license",
59
 
  "Invalid use of null pointer",
60
 
  "Statement not prepared",
61
 
  "No data supplied for parameters in prepared statement",
62
 
  "Data truncated",
63
 
  "No parameters exist in the statement",
64
 
  "Invalid parameter number",
65
 
  "Can't send long data for non-string/non-binary data types (parameter: %d)",
66
 
  "Using unsupported buffer type: %d  (parameter: %d)",
67
 
  "Shared memory: %-.100s",
68
 
  "Can't open shared memory; client could not create request event (%lu)",
69
 
  "Can't open shared memory; no answer event received from server (%lu)",
70
 
  "Can't open shared memory; server could not allocate file mapping (%lu)",
71
 
  "Can't open shared memory; server could not get pointer to file mapping (%lu)",
72
 
  "Can't open shared memory; client could not allocate file mapping (%lu)",
73
 
  "Can't open shared memory; client could not get pointer to file mapping (%lu)",
74
 
  "Can't open shared memory; client could not create %s event (%lu)",
75
 
  "Can't open shared memory; no answer from server (%lu)",
76
 
  "Can't open shared memory; cannot send request event to server (%lu)",
77
 
  "Wrong or unknown protocol",
78
 
  "Invalid connection handle",
79
 
  "Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)",
80
 
  "Row retrieval was canceled by drizzle_stmt_close() call",
81
 
  "Attempt to read column without prior row fetch",
82
 
  "Prepared statement contains no metadata",
83
 
  "Attempt to read a row while there is no result set associated with the statement",
84
 
  "This feature is not implemented yet",
85
 
  "Lost connection to MySQL server at '%s', system error: %d",
86
 
  "Statement closed indirectly because of a preceeding %s() call",
87
 
  ""
88
 
};
89
 
 
90
 
/* Start of code added by Roberto M. Serqueira - martinsc@uol.com.br - 05.24.2001 */
91
 
 
92
 
#elif defined PORTUGUESE
93
 
const char *client_errors[]=
94
 
{
95
 
  "Erro desconhecido do MySQL",
96
 
  "N�o pode criar 'UNIX socket' (%d)",
97
 
  "N�o pode se conectar ao servidor MySQL local atrav�s do 'socket' '%-.100s' (%d)", 
98
 
  "N�o pode se conectar ao servidor MySQL em '%-.100s' (%d)",
99
 
  "N�o pode criar 'socket TCP/IP' (%d)",
100
 
  "'Host' servidor MySQL '%-.100s' (%d) desconhecido",
101
 
  "Servidor MySQL desapareceu",
102
 
  "Incompatibilidade de protocolos; vers�o do servidor = %d, vers�o do cliente = %d",
103
 
  "Cliente do MySQL com falta de mem�ria",
104
 
  "Informa��o inv�lida de 'host'",
105
 
  "Localhost via 'UNIX socket'",
106
 
  "%-.100s via 'TCP/IP'",
107
 
  "Erro na negocia��o de acesso ao servidor",
108
 
  "Conex�o perdida com servidor MySQL durante 'query'",
109
 
  "Comandos fora de sincronismo; voc� n�o pode executar este comando agora",
110
 
  "Named pipe: %-.32s",
111
 
  "N�o pode esperar pelo 'named pipe' para o 'host' %-.64s - 'pipe' %-.32s (%lu)",
112
 
  "N�o pode abrir 'named pipe' para o 'host' %-.64s - 'pipe' %-.32s (%lu)",
113
 
  "N�o pode estabelecer o estado do 'named pipe' para o 'host' %-.64s - 'pipe' %-.32s (%lu)",
114
 
  "N�o pode inicializar conjunto de caracteres %-.32s (caminho %-.100s)",
115
 
  "Obteve pacote maior do que 'max_allowed_packet' bytes",
116
 
  "Embedded server"
117
 
  "Error on SHOW SLAVE STATUS:",
118
 
  "Error on SHOW SLAVE HOSTS:",
119
 
  "Error connecting to slave:",
120
 
  "Error connecting to master:",
121
 
  "SSL connection error",
122
 
  "Malformed packet",
123
 
  "This client library is licensed only for use with MySQL servers having '%s' license",
124
 
  "Invalid use of null pointer",
125
 
  "Statement not prepared",
126
 
  "No data supplied for parameters in prepared statement",
127
 
  "Data truncated",
128
 
  "No parameters exist in the statement",
129
 
  "Invalid parameter number",
130
 
  "Can't send long data for non-string/non-binary data types (parameter: %d)",
131
 
  "Using unsupported buffer type: %d  (parameter: %d)",
132
 
  "Shared memory: %-.100s",
133
 
  "Can't open shared memory; client could not create request event (%lu)",
134
 
  "Can't open shared memory; no answer event received from server (%lu)",
135
 
  "Can't open shared memory; server could not allocate file mapping (%lu)",
136
 
  "Can't open shared memory; server could not get pointer to file mapping (%lu)",
137
 
  "Can't open shared memory; client could not allocate file mapping (%lu)",
138
 
  "Can't open shared memory; client could not get pointer to file mapping (%lu)",
139
 
  "Can't open shared memory; client could not create %s event (%lu)",
140
 
  "Can't open shared memory; no answer from server (%lu)",
141
 
  "Can't open shared memory; cannot send request event to server (%lu)",
142
 
  "Wrong or unknown protocol",
143
 
  "Invalid connection handle",
144
 
  "Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)",
145
 
  "Row retrieval was canceled by drizzle_stmt_close() call",
146
 
  "Attempt to read column without prior row fetch",
147
 
  "Prepared statement contains no metadata",
148
 
  "Attempt to read a row while there is no result set associated with the statement",
149
 
  "This feature is not implemented yet",
150
 
  "Lost connection to MySQL server at '%s', system error: %d",
151
 
  "Statement closed indirectly because of a preceeding %s() call",
152
 
  ""
153
 
};
154
 
 
155
 
#else /* ENGLISH */
156
 
const char *client_errors[]=
157
 
{
158
 
  "Unknown MySQL error",
159
 
  "Can't create UNIX socket (%d)",
160
 
  "Can't connect to local MySQL server through socket '%-.100s' (%d)",
161
 
  "Can't connect to MySQL server on '%-.100s' (%d)",
162
 
  "Can't create TCP/IP socket (%d)",
163
 
  "Unknown MySQL server host '%-.100s' (%d)",
164
 
  "MySQL server has gone away",
165
 
  "Protocol mismatch; server version = %d, client version = %d",
166
 
  "MySQL client ran out of memory",
167
 
  "Wrong host info",
168
 
  "Localhost via UNIX socket",
169
 
  "%-.100s via TCP/IP",
170
 
  "Error in server handshake",
171
 
  "Lost connection to MySQL server during query",
172
 
  "Commands out of sync; you can't run this command now",
173
 
  "Named pipe: %-.32s",
174
 
  "Can't wait for named pipe to host: %-.64s  pipe: %-.32s (%lu)",
175
 
  "Can't open named pipe to host: %-.64s  pipe: %-.32s (%lu)",
176
 
  "Can't set state of named pipe to host: %-.64s  pipe: %-.32s (%lu)",
177
 
  "Can't initialize character set %-.32s (path: %-.100s)",
178
 
  "Got packet bigger than 'max_allowed_packet' bytes",
179
 
  "Embedded server",
180
 
  "Error on SHOW SLAVE STATUS:",
181
 
  "Error on SHOW SLAVE HOSTS:",
182
 
  "Error connecting to slave:",
183
 
  "Error connecting to master:",
184
 
  "SSL connection error",
185
 
  "Malformed packet",
186
 
  "This client library is licensed only for use with MySQL servers having '%s' license",
187
 
  "Invalid use of null pointer",
188
 
  "Statement not prepared",
189
 
  "No data supplied for parameters in prepared statement",
190
 
  "Data truncated",
191
 
  "No parameters exist in the statement",
192
 
  "Invalid parameter number",
193
 
  "Can't send long data for non-string/non-binary data types (parameter: %d)",
194
 
  "Using unsupported buffer type: %d  (parameter: %d)",
195
 
  "Shared memory: %-.100s",
196
 
  "Can't open shared memory; client could not create request event (%lu)",
197
 
  "Can't open shared memory; no answer event received from server (%lu)",
198
 
  "Can't open shared memory; server could not allocate file mapping (%lu)",
199
 
  "Can't open shared memory; server could not get pointer to file mapping (%lu)",
200
 
  "Can't open shared memory; client could not allocate file mapping (%lu)",
201
 
  "Can't open shared memory; client could not get pointer to file mapping (%lu)",
202
 
  "Can't open shared memory; client could not create %s event (%lu)",
203
 
  "Can't open shared memory; no answer from server (%lu)",
204
 
  "Can't open shared memory; cannot send request event to server (%lu)",
205
 
  "Wrong or unknown protocol",
206
 
  "Invalid connection handle",
207
 
  "Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)",
208
 
  "Row retrieval was canceled by drizzle_stmt_close() call",
209
 
  "Attempt to read column without prior row fetch",
210
 
  "Prepared statement contains no metadata",
211
 
  "Attempt to read a row while there is no result set associated with the statement",
212
 
  "This feature is not implemented yet",
213
 
  "Lost connection to MySQL server at '%s', system error: %d",
214
 
  "Statement closed indirectly because of a preceeding %s() call",
215
 
  ""
216
 
};
217
 
#endif
218
 
 
219
 
 
220
 
/*
221
 
  Register client error messages for use with my_error().
222
 
 
223
 
  SYNOPSIS
224
 
    init_client_errs()
225
 
 
226
 
  RETURN
227
 
    void
228
 
*/
229
 
 
230
 
void init_client_errs(void)
231
 
{
232
 
  (void) my_error_register(client_errors, CR_ERROR_FIRST, CR_ERROR_LAST);
233
 
}
234
 
 
235
 
 
236
 
/*
237
 
  Unregister client error messages.
238
 
 
239
 
  SYNOPSIS
240
 
    finish_client_errs()
241
 
 
242
 
  RETURN
243
 
    void
244
 
*/
245
 
 
246
 
void finish_client_errs(void)
247
 
{
248
 
  (void) my_error_unregister(CR_ERROR_FIRST, CR_ERROR_LAST);
 
27
const char *client_errors[]=
 
28
{
 
29
  N_("Unknown Drizzle error"),
 
30
  N_("Can't create UNIX socket (%d)"),
 
31
  N_("Can't connect to local Drizzle server through socket '%-.100s' (%d)"),
 
32
  N_("Can't connect to Drizzle server on '%-.100s' (%d)"),
 
33
  N_("Can't create TCP/IP socket (%d)"),
 
34
  N_("Unknown Drizzle server host '%-.100s' (%d)"),
 
35
  N_("Drizzle server has gone away"),
 
36
  N_("Protocol mismatch; server version = %d, client version = %d"),
 
37
  N_("Drizzle client ran out of memory"),
 
38
  N_("Wrong host info"),
 
39
  N_("Localhost via UNIX socket"),
 
40
  N_("%-.100s via TCP/IP"),
 
41
  N_("Error in server handshake"),
 
42
  N_("Lost connection to Drizzle server during query"),
 
43
  N_("Commands out of sync; you can't run this command now"),
 
44
  N_("Named pipe: %-.32s"),
 
45
  N_("Can't wait for named pipe to host: %-.64s  pipe: %-.32s (%lu)"),
 
46
  N_("Can't open named pipe to host: %-.64s  pipe: %-.32s (%lu)"),
 
47
  N_("Can't set state of named pipe to host: %-.64s  pipe: %-.32s (%lu)"),
 
48
  N_("Can't initialize character set %-.32s (path: %-.100s)"),
 
49
  N_("Got packet bigger than 'max_allowed_packet' bytes"),
 
50
  N_("Embedded server"),
 
51
  N_("Error on SHOW SLAVE STATUS:"),
 
52
  N_("Error on SHOW SLAVE HOSTS:"),
 
53
  N_("Error connecting to slave:"),
 
54
  N_("Error connecting to master:"),
 
55
  N_("SSL connection error"),
 
56
  N_("Malformed packet"),
 
57
  N_("(unused error message)"),
 
58
  N_("Invalid use of null pointer"),
 
59
  N_("Statement not prepared"),
 
60
  N_("No data supplied for parameters in prepared statement"),
 
61
  N_("Data truncated"),
 
62
  N_("No parameters exist in the statement"),
 
63
  N_("Invalid parameter number"),
 
64
  N_("Can't send long data for non-string/non-binary data types "
 
65
     "(parameter: %d)"),
 
66
  N_("Using unsupported buffer type: %d  (parameter: %d)"),
 
67
  N_("Shared memory: %-.100s"),
 
68
  N_("(unused error message)"),
 
69
  N_("(unused error message)"),
 
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_("Wrong or unknown protocol"),
 
78
  N_("Invalid connection handle"),
 
79
  N_("Connection using old (pre-4.1.1) authentication protocol refused "
 
80
     "(client option 'secure_auth' enabled)"),
 
81
  N_("Row retrieval was canceled by drizzle_stmt_close() call"),
 
82
  N_("Attempt to read column without prior row fetch"),
 
83
  N_("Prepared statement contains no metadata"),
 
84
  N_("Attempt to read a row while there is no result set associated with "
 
85
     "the statement"),
 
86
  N_("This feature is not implemented yet"),
 
87
  N_("Lost connection to Drizzle server while waiting for initial "
 
88
     "communication packet, system error: %d"),
 
89
  N_("Lost connection to Drizzle server while reading initial communication "
 
90
     "packet, system error: %d"),
 
91
  N_("Lost connection to Drizzle server while sending authentication "
 
92
     "information, system error: %d"),
 
93
  N_("Lost connection to Drizzle server while reading authorization "
 
94
     "information, system error: %d"),
 
95
  N_("Lost connection to Drizzle server while setting initial database, "
 
96
     "system error: %d"),
 
97
  N_("Statement closed indirectly because of a preceeding %s() call"),
 
98
  ""
 
99
};
 
100
 
 
101
 
 
102
const char *
 
103
get_client_error(unsigned int err_index)
 
104
{
 
105
  return _(client_errors[err_index]);
249
106
}