errmsg.c 9 KB
Newer Older
unknown's avatar
unknown committed
1 2 3 4 5 6 7 8
/* Copyright (C) 2000 MySQL AB

   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
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
unknown's avatar
unknown committed
9
   but WITHOUT ANY WARRANTY; without even the implied warranty of
unknown's avatar
unknown committed
10 11 12 13 14 15
   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
16 17

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

unknown's avatar
unknown committed
20
#include <my_global.h>
unknown's avatar
unknown committed
21 22 23 24 25 26 27 28
#include <my_sys.h>
#include "errmsg.h"

#ifdef GERMAN
const char *client_errors[]=
{
  "Unbekannter MySQL Fehler",
  "Kann UNIX-Socket nicht anlegen (%d)",
29 30
  "Keine Verbindung zu lokalem MySQL Server, socket: '%-.100s' (%d)",
  "Keine Verbindung zu MySQL Server auf %-.100s (%d)",
unknown's avatar
unknown committed
31
  "Kann TCP/IP-Socket nicht anlegen (%d)",
unknown's avatar
unknown committed
32
  "Unbekannter MySQL Server Host (%-.100s) (%d)",
unknown's avatar
unknown committed
33
  "MySQL Server nicht vorhanden",
unknown's avatar
unknown committed
34
  "Protokolle ungleich; Server Version = %d, Client Version = %d",
unknown's avatar
unknown committed
35
  "MySQL client ran out of memory",
unknown's avatar
unknown committed
36 37
  "Wrong host info",
  "Localhost via UNIX socket",
38
  "%-.100s via TCP/IP",
unknown's avatar
unknown committed
39 40
  "Error in server handshake",
  "Lost connection to MySQL server during query",
unknown's avatar
unknown committed
41
  "Commands out of sync; you can't run this command now",
42
  "Verbindung ueber Named Pipe: %-.32s",
unknown's avatar
unknown committed
43 44 45
  "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)",
46
  "Can't initialize character set %-.32s (path: %-.100s)",
unknown's avatar
unknown committed
47
  "Got packet bigger than 'max_allowed_packet' bytes",
unknown's avatar
unknown committed
48
  "Embedded server",
49 50 51
  "Error on SHOW SLAVE STATUS:",
  "Error on SHOW SLAVE HOSTS:",
  "Error connecting to slave:",
52
  "Error connecting to master:",
unknown's avatar
unknown committed
53
  "SSL connection error",
unknown's avatar
unknown committed
54
  "Malformed packet",
55
  "This client library is licensed only for use with MySQL servers having '%s' license",
56 57
  "Invalid use of null pointer",
  "Statement not prepared",
unknown's avatar
unknown committed
58
  "No data supplied for parameters in prepared statement",
59
  "Data truncated",
unknown's avatar
unknown committed
60
  "No parameters exist in the statement",
61
  "Invalid parameter number",
unknown's avatar
unknown committed
62
  "Can't send long data for non-string/non-binary data types (parameter: %d)",
63
  "Using unsupported buffer type: %d  (parameter: %d)",
64
  "Shared memory: %-.100s",
unknown's avatar
unknown committed
65 66 67 68 69 70 71 72 73
  "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
74
  "Wrong or unknown protocol",
unknown's avatar
unknown committed
75
  "Invalid connection handle",
unknown's avatar
unknown committed
76 77
  "Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)",
  "Row retrieval was canceled by mysql_stmt_close() call",
78
  "Attempt to read column without prior row fetch"
unknown's avatar
unknown committed
79 80
};

81 82 83 84 85 86 87
/* 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)",
88 89
  "No pode se conectar ao servidor MySQL local atravs do 'socket' '%-.100s' (%d)", 
  "No pode se conectar ao servidor MySQL em '%-.100s' (%d)",
90
  "No pode criar 'socket TCP/IP' (%d)",
91
  "'Host' servidor MySQL '%-.100s' (%d) desconhecido",
92
  "Servidor MySQL desapareceu",
unknown's avatar
unknown committed
93
  "Incompatibilidade de protocolos; verso do servidor = %d, verso do cliente = %d",
94 95 96
  "Cliente do MySQL com falta de memria",
  "Informao invlida de 'host'",
  "Localhost via 'UNIX socket'",
97
  "%-.100s via 'TCP/IP'",
98 99
  "Erro na negociao de acesso ao servidor",
  "Conexo perdida com servidor MySQL durante 'query'",
unknown's avatar
unknown committed
100
  "Comandos fora de sincronismo; voc no pode executar este comando agora",
101
  "Named pipe: %-.32s",
102 103 104
  "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)",
105
  "No pode inicializar conjunto de caracteres %-.32s (caminho %-.100s)",
unknown's avatar
unknown committed
106
  "Obteve pacote maior do que 'max_allowed_packet' bytes",
unknown's avatar
merge  
unknown committed
107
  "Embedded server"
108 109 110
  "Error on SHOW SLAVE STATUS:",
  "Error on SHOW SLAVE HOSTS:",
  "Error connecting to slave:",
111
  "Error connecting to master:",
unknown's avatar
unknown committed
112
  "SSL connection error",
unknown's avatar
unknown committed
113
  "Malformed packet",
114
  "This client library is licensed only for use with MySQL servers having '%s' license",
115 116
  "Invalid use of null pointer",
  "Statement not prepared",
unknown's avatar
unknown committed
117
  "No data supplied for parameters in prepared statement",
118
  "Data truncated",
unknown's avatar
unknown committed
119
  "No parameters exist in the statement",
120
  "Invalid parameter number",
unknown's avatar
unknown committed
121
  "Can't send long data for non-string/non-binary data types (parameter: %d)",
122
  "Using unsupported buffer type: %d  (parameter: %d)",
123
  "Shared memory: %-.100s",
unknown's avatar
unknown committed
124 125 126 127 128 129 130 131 132
  "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
133
  "Wrong or unknown protocol",
unknown's avatar
unknown committed
134
  "Invalid connection handle",
unknown's avatar
unknown committed
135 136
  "Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)",
  "Row retrieval was canceled by mysql_stmt_close() call",
137
  "Attempt to read column without prior row fetch"
138 139
};

unknown's avatar
unknown committed
140 141 142 143 144
#else /* ENGLISH */
const char *client_errors[]=
{
  "Unknown MySQL error",
  "Can't create UNIX socket (%d)",
145 146
  "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
147
  "Can't create TCP/IP socket (%d)",
unknown's avatar
unknown committed
148
  "Unknown MySQL server host '%-.100s' (%d)",
unknown's avatar
unknown committed
149
  "MySQL server has gone away",
unknown's avatar
unknown committed
150 151
  "Protocol mismatch; server version = %d, client version = %d",
  "MySQL client ran out of memory",
unknown's avatar
unknown committed
152 153
  "Wrong host info",
  "Localhost via UNIX socket",
154
  "%-.100s via TCP/IP",
unknown's avatar
unknown committed
155 156
  "Error in server handshake",
  "Lost connection to MySQL server during query",
unknown's avatar
unknown committed
157
  "Commands out of sync; you can't run this command now",
158
  "Named pipe: %-.32s",
unknown's avatar
unknown committed
159 160 161
  "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)",
162
  "Can't initialize character set %-.32s (path: %-.100s)",
unknown's avatar
unknown committed
163
  "Got packet bigger than 'max_allowed_packet' bytes",
164 165 166 167
  "Embedded server",
  "Error on SHOW SLAVE STATUS:",
  "Error on SHOW SLAVE HOSTS:",
  "Error connecting to slave:",
168
  "Error connecting to master:",
unknown's avatar
unknown committed
169
  "SSL connection error",
unknown's avatar
unknown committed
170
  "Malformed packet",
171
  "This client library is licensed only for use with MySQL servers having '%s' license",
172 173
  "Invalid use of null pointer",
  "Statement not prepared",
unknown's avatar
unknown committed
174
  "No data supplied for parameters in prepared statement",
175
  "Data truncated",
unknown's avatar
unknown committed
176
  "No parameters exist in the statement",
177
  "Invalid parameter number",
unknown's avatar
unknown committed
178
  "Can't send long data for non-string/non-binary data types (parameter: %d)",
179
  "Using unsupported buffer type: %d  (parameter: %d)",
180
  "Shared memory: %-.100s",
unknown's avatar
unknown committed
181 182 183 184 185 186 187 188 189
  "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
190
  "Wrong or unknown protocol",
unknown's avatar
unknown committed
191
  "Invalid connection handle",
unknown's avatar
unknown committed
192 193
  "Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)",
  "Row retrieval was canceled by mysql_stmt_close() call",
194
  "Attempt to read column without prior row fetch"
unknown's avatar
unknown committed
195 196 197 198 199 200
};
#endif


void init_client_errs(void)
{
201
  my_errmsg[CLIENT_ERRMAP] = &client_errors[0];
unknown's avatar
unknown committed
202
}