errmsg.c 9.3 KB
Newer Older
1
/* Copyright (C) 2000-2004 MySQL AB
monty@hundin.mysql.fi's avatar
monty@hundin.mysql.fi 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.
monty@hundin.mysql.fi's avatar
monty@hundin.mysql.fi committed
10 11

   This program is distributed in the hope that it will be useful,
bk@work.mysql.com's avatar
bk@work.mysql.com committed
12
   but WITHOUT ANY WARRANTY; without even the implied warranty of
monty@hundin.mysql.fi's avatar
monty@hundin.mysql.fi 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 */
bk@work.mysql.com's avatar
bk@work.mysql.com committed
19 20

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

23
#include <my_global.h>
bk@work.mysql.com's avatar
bk@work.mysql.com 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)",
bk@work.mysql.com's avatar
bk@work.mysql.com committed
34
  "Kann TCP/IP-Socket nicht anlegen (%d)",
35
  "Unbekannter MySQL Server Host (%-.100s) (%d)",
bk@work.mysql.com's avatar
bk@work.mysql.com committed
36
  "MySQL Server nicht vorhanden",
37
  "Protokolle ungleich; Server Version = %d, Client Version = %d",
38
  "MySQL client ran out of memory",
bk@work.mysql.com's avatar
bk@work.mysql.com committed
39 40
  "Wrong host info",
  "Localhost via UNIX socket",
41
  "%-.100s via TCP/IP",
bk@work.mysql.com's avatar
bk@work.mysql.com committed
42 43
  "Error in server handshake",
  "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",
bk@work.mysql.com's avatar
bk@work.mysql.com 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)",
50
  "Got packet bigger than 'max_allowed_packet' bytes",
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:",
monty@mashka.mysql.fi's avatar
monty@mashka.mysql.fi committed
56
  "SSL connection error",
monty@mashka.mysql.fi's avatar
monty@mashka.mysql.fi 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",
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 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)",
monty@mashka.mysql.fi's avatar
monty@mashka.mysql.fi committed
77
  "Wrong or unknown protocol",
hf@deer.(none)'s avatar
hf@deer.(none) committed
78
  "Invalid connection handle",
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 83
  "Attempt to read column without prior row fetch",
  "Prepared statement contains no metadata",
  ""
bk@work.mysql.com's avatar
bk@work.mysql.com committed
84 85
};

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

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


void init_client_errs(void)
{
210
  my_errmsg[CLIENT_ERRMAP] = &client_errors[0];
bk@work.mysql.com's avatar
bk@work.mysql.com committed
211
}