errmsg.c 10 KB
Newer Older
1
/* Copyright (C) 2000-2004 MySQL AB
unknown's avatar
unknown committed
2 3 4

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
5 6 7 8
   the Free Software Foundation.

   There are special exceptions to the terms and conditions of the GPL as it
   is applied to this software. View the full text of the exception in file
9
   EXCEPTIONS-CLIENT in the directory of this software distribution.
unknown's avatar
unknown committed
10 11

   This program is distributed in the hope that it will be useful,
unknown's avatar
unknown committed
12
   but WITHOUT ANY WARRANTY; without even the implied warranty of
unknown's avatar
unknown committed
13 14 15 16 17 18
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
unknown's avatar
unknown committed
19 20

/* Error messages for MySQL clients */
unknown's avatar
unknown committed
21
/* (Error messages for the daemon are in share/language/errmsg.sys) */
unknown's avatar
unknown committed
22

unknown's avatar
unknown committed
23
#include <my_global.h>
unknown's avatar
unknown committed
24 25 26 27 28 29 30 31
#include <my_sys.h>
#include "errmsg.h"

#ifdef GERMAN
const char *client_errors[]=
{
  "Unbekannter MySQL Fehler",
  "Kann UNIX-Socket nicht anlegen (%d)",
32 33
  "Keine Verbindung zu lokalem MySQL Server, socket: '%-.100s' (%d)",
  "Keine Verbindung zu MySQL Server auf %-.100s (%d)",
unknown's avatar
unknown committed
34
  "Kann TCP/IP-Socket nicht anlegen (%d)",
unknown's avatar
unknown committed
35
  "Unbekannter MySQL Server Host (%-.100s) (%d)",
unknown's avatar
unknown committed
36
  "MySQL Server nicht vorhanden",
unknown's avatar
unknown committed
37
  "Protokolle ungleich; Server Version = %d, Client Version = %d",
unknown's avatar
unknown committed
38
  "MySQL client ran out of memory",
unknown's avatar
unknown committed
39 40
  "Wrong host info",
  "Localhost via UNIX socket",
41
  "%-.100s via TCP/IP",
unknown's avatar
unknown committed
42 43
  "Error in server handshake",
  "Lost connection to MySQL server during query",
unknown's avatar
unknown committed
44
  "Commands out of sync; you can't run this command now",
45
  "Verbindung ueber Named Pipe: %-.32s",
unknown's avatar
unknown committed
46 47 48
  "Kann nicht auf Named Pipe warten. Host: %-.64s  pipe: %-.32s (%lu)",
  "Kann Named Pipe nicht oeffnen. Host: %-.64s  pipe: %-.32s (%lu)",
  "Kann den Status der Named Pipe nicht setzen.  Host: %-.64s  pipe: %-.32s (%lu)",
49
  "Can't initialize character set %-.32s (path: %-.100s)",
unknown's avatar
unknown committed
50
  "Got packet bigger than 'max_allowed_packet' bytes",
unknown's avatar
unknown committed
51
  "Embedded server",
52 53 54
  "Error on SHOW SLAVE STATUS:",
  "Error on SHOW SLAVE HOSTS:",
  "Error connecting to slave:",
55
  "Error connecting to master:",
unknown's avatar
unknown committed
56
  "SSL connection error",
unknown's avatar
unknown committed
57
  "Malformed packet",
58
  "This client library is licensed only for use with MySQL servers having '%s' license",
59 60
  "Invalid use of null pointer",
  "Statement not prepared",
unknown's avatar
unknown committed
61
  "No data supplied for parameters in prepared statement",
62
  "Data truncated",
unknown's avatar
unknown committed
63
  "No parameters exist in the statement",
64
  "Invalid parameter number",
unknown's avatar
unknown committed
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",
unknown's avatar
unknown committed
68 69 70 71 72 73 74 75 76
  "Can't open shared memory; client could not create request event (%lu)",
  "Can't open shared memory; no answer event received from server (%lu)",
  "Can't open shared memory; server could not allocate file mapping (%lu)",
  "Can't open shared memory; server could not get pointer to file mapping (%lu)",
  "Can't open shared memory; client could not allocate file mapping (%lu)",
  "Can't open shared memory; client could not get pointer to file mapping (%lu)",
  "Can't open shared memory; client could not create %s event (%lu)",
  "Can't open shared memory; no answer from server (%lu)",
  "Can't open shared memory; cannot send request event to server (%lu)",
unknown's avatar
unknown committed
77
  "Wrong or unknown protocol",
unknown's avatar
unknown committed
78
  "Invalid connection handle",
unknown's avatar
unknown committed
79 80
  "Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)",
  "Row retrieval was canceled by mysql_stmt_close() call",
81 82
  "Attempt to read column without prior row fetch",
  "Prepared statement contains no metadata",
unknown's avatar
unknown committed
83
  "Attempt to read a row while there is no result set associated with the statement",
84
  "This feature is not implemented yet",
85
  ""
unknown's avatar
unknown committed
86 87
};

88 89 90 91 92 93 94
/* Start of code added by Roberto M. Serqueira - martinsc@uol.com.br - 05.24.2001 */

#elif defined PORTUGUESE
const char *client_errors[]=
{
  "Erro desconhecido do MySQL",
  "No pode criar 'UNIX socket' (%d)",
95 96
  "No pode se conectar ao servidor MySQL local atravs do 'socket' '%-.100s' (%d)", 
  "No pode se conectar ao servidor MySQL em '%-.100s' (%d)",
97
  "No pode criar 'socket TCP/IP' (%d)",
98
  "'Host' servidor MySQL '%-.100s' (%d) desconhecido",
99
  "Servidor MySQL desapareceu",
unknown's avatar
unknown committed
100
  "Incompatibilidade de protocolos; verso do servidor = %d, verso do cliente = %d",
101 102 103
  "Cliente do MySQL com falta de memria",
  "Informao invlida de 'host'",
  "Localhost via 'UNIX socket'",
104
  "%-.100s via 'TCP/IP'",
105 106
  "Erro na negociao de acesso ao servidor",
  "Conexo perdida com servidor MySQL durante 'query'",
unknown's avatar
unknown committed
107
  "Comandos fora de sincronismo; voc no pode executar este comando agora",
108
  "Named pipe: %-.32s",
109 110 111
  "No pode esperar pelo 'named pipe' para o 'host' %-.64s - 'pipe' %-.32s (%lu)",
  "No pode abrir 'named pipe' para o 'host' %-.64s - 'pipe' %-.32s (%lu)",
  "No pode estabelecer o estado do 'named pipe' para o 'host' %-.64s - 'pipe' %-.32s (%lu)",
112
  "No pode inicializar conjunto de caracteres %-.32s (caminho %-.100s)",
unknown's avatar
unknown committed
113
  "Obteve pacote maior do que 'max_allowed_packet' bytes",
unknown's avatar
merge  
unknown committed
114
  "Embedded server"
115 116 117
  "Error on SHOW SLAVE STATUS:",
  "Error on SHOW SLAVE HOSTS:",
  "Error connecting to slave:",
118
  "Error connecting to master:",
unknown's avatar
unknown committed
119
  "SSL connection error",
unknown's avatar
unknown committed
120
  "Malformed packet",
121
  "This client library is licensed only for use with MySQL servers having '%s' license",
122 123
  "Invalid use of null pointer",
  "Statement not prepared",
unknown's avatar
unknown committed
124
  "No data supplied for parameters in prepared statement",
125
  "Data truncated",
unknown's avatar
unknown committed
126
  "No parameters exist in the statement",
127
  "Invalid parameter number",
unknown's avatar
unknown committed
128
  "Can't send long data for non-string/non-binary data types (parameter: %d)",
129
  "Using unsupported buffer type: %d  (parameter: %d)",
130
  "Shared memory: %-.100s",
unknown's avatar
unknown committed
131 132 133 134 135 136 137 138 139
  "Can't open shared memory; client could not create request event (%lu)",
  "Can't open shared memory; no answer event received from server (%lu)",
  "Can't open shared memory; server could not allocate file mapping (%lu)",
  "Can't open shared memory; server could not get pointer to file mapping (%lu)",
  "Can't open shared memory; client could not allocate file mapping (%lu)",
  "Can't open shared memory; client could not get pointer to file mapping (%lu)",
  "Can't open shared memory; client could not create %s event (%lu)",
  "Can't open shared memory; no answer from server (%lu)",
  "Can't open shared memory; cannot send request event to server (%lu)",
unknown's avatar
unknown committed
140
  "Wrong or unknown protocol",
unknown's avatar
unknown committed
141
  "Invalid connection handle",
unknown's avatar
unknown committed
142 143
  "Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)",
  "Row retrieval was canceled by mysql_stmt_close() call",
144 145
  "Attempt to read column without prior row fetch",
  "Prepared statement contains no metadata",
unknown's avatar
unknown committed
146
  "Attempt to read a row while there is no result set associated with the statement",
147
  "This feature is not implemented yet",
148
  ""
149 150
};

unknown's avatar
unknown committed
151 152 153 154 155
#else /* ENGLISH */
const char *client_errors[]=
{
  "Unknown MySQL error",
  "Can't create UNIX socket (%d)",
156 157
  "Can't connect to local MySQL server through socket '%-.100s' (%d)",
  "Can't connect to MySQL server on '%-.100s' (%d)",
unknown's avatar
unknown committed
158
  "Can't create TCP/IP socket (%d)",
unknown's avatar
unknown committed
159
  "Unknown MySQL server host '%-.100s' (%d)",
unknown's avatar
unknown committed
160
  "MySQL server has gone away",
unknown's avatar
unknown committed
161 162
  "Protocol mismatch; server version = %d, client version = %d",
  "MySQL client ran out of memory",
unknown's avatar
unknown committed
163 164
  "Wrong host info",
  "Localhost via UNIX socket",
165
  "%-.100s via TCP/IP",
unknown's avatar
unknown committed
166 167
  "Error in server handshake",
  "Lost connection to MySQL server during query",
unknown's avatar
unknown committed
168
  "Commands out of sync; you can't run this command now",
169
  "Named pipe: %-.32s",
unknown's avatar
unknown committed
170 171 172
  "Can't wait for named pipe to host: %-.64s  pipe: %-.32s (%lu)",
  "Can't open named pipe to host: %-.64s  pipe: %-.32s (%lu)",
  "Can't set state of named pipe to host: %-.64s  pipe: %-.32s (%lu)",
173
  "Can't initialize character set %-.32s (path: %-.100s)",
unknown's avatar
unknown committed
174
  "Got packet bigger than 'max_allowed_packet' bytes",
175 176 177 178
  "Embedded server",
  "Error on SHOW SLAVE STATUS:",
  "Error on SHOW SLAVE HOSTS:",
  "Error connecting to slave:",
179
  "Error connecting to master:",
unknown's avatar
unknown committed
180
  "SSL connection error",
unknown's avatar
unknown committed
181
  "Malformed packet",
182
  "This client library is licensed only for use with MySQL servers having '%s' license",
183 184
  "Invalid use of null pointer",
  "Statement not prepared",
unknown's avatar
unknown committed
185
  "No data supplied for parameters in prepared statement",
186
  "Data truncated",
unknown's avatar
unknown committed
187
  "No parameters exist in the statement",
188
  "Invalid parameter number",
unknown's avatar
unknown committed
189
  "Can't send long data for non-string/non-binary data types (parameter: %d)",
190
  "Using unsupported buffer type: %d  (parameter: %d)",
191
  "Shared memory: %-.100s",
unknown's avatar
unknown committed
192 193 194 195 196 197 198 199 200
  "Can't open shared memory; client could not create request event (%lu)",
  "Can't open shared memory; no answer event received from server (%lu)",
  "Can't open shared memory; server could not allocate file mapping (%lu)",
  "Can't open shared memory; server could not get pointer to file mapping (%lu)",
  "Can't open shared memory; client could not allocate file mapping (%lu)",
  "Can't open shared memory; client could not get pointer to file mapping (%lu)",
  "Can't open shared memory; client could not create %s event (%lu)",
  "Can't open shared memory; no answer from server (%lu)",
  "Can't open shared memory; cannot send request event to server (%lu)",
unknown's avatar
unknown committed
201
  "Wrong or unknown protocol",
unknown's avatar
unknown committed
202
  "Invalid connection handle",
unknown's avatar
unknown committed
203 204
  "Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)",
  "Row retrieval was canceled by mysql_stmt_close() call",
205 206
  "Attempt to read column without prior row fetch",
  "Prepared statement contains no metadata",
unknown's avatar
unknown committed
207
  "Attempt to read a row while there is no result set associated with the statement",
208
  "This feature is not implemented yet",
209
  ""
unknown's avatar
unknown committed
210 211 212 213
};
#endif


214 215 216 217 218 219 220 221 222 223
/*
  Register client error messages for use with my_error().

  SYNOPSIS
    init_client_errs()

  RETURN
    void
*/

unknown's avatar
unknown committed
224 225
void init_client_errs(void)
{
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242
  (void) my_error_register(client_errors, CR_ERROR_FIRST, CR_ERROR_LAST);
}


/*
  Unregister client error messages.

  SYNOPSIS
    finish_client_errs()

  RETURN
    void
*/

void finish_client_errs(void)
{
  (void) my_error_unregister(CR_ERROR_FIRST, CR_ERROR_LAST);
unknown's avatar
unknown committed
243
}