1
/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
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.
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 */
19
/* Error messages for MySQL clients */
20
/* (Error messages for the daemon are in share/language/errmsg.sys) */
22
#include <my_global.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: %-.100s",
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 mysql_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",
85
"The number of columns in the result set differs from the number of bound buffers. You must reset the statement, rebind the result set columns, and execute the statement again",
86
"This handle is already connected. Use a separate handle for each connection.",
87
"Authentication plugin '%s' cannot be loaded: %s",
91
const char** get_client_errmsgs()
97
Register client error messages for use with my_error().
106
void init_client_errs(void)
108
compile_time_assert(array_elements(client_errors) ==
109
(CR_ERROR_LAST - CR_ERROR_FIRST + 2));
110
(void) my_error_register(get_client_errmsgs, CR_ERROR_FIRST, CR_ERROR_LAST);
115
Unregister client error messages.
124
void finish_client_errs(void)
126
(void) my_error_unregister(CR_ERROR_FIRST, CR_ERROR_LAST);