summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorDaniel Black <daniel@mariadb.org>2023-03-08 12:27:31 +1100
committerDaniel Black <daniel@mariadb.org>2023-03-10 08:53:58 +1100
commitb600671f758cac2ed595b5342033c8f92921eade (patch)
treed82efb71d4c7bdd8b8c5cbea54429dce413a28da /extra
parentb4c7f5e670f5fa5e59295039937e516f0ab543da (diff)
downloadmariadb-git-b600671f758cac2ed595b5342033c8f92921eade.tar.gz
MDEV-30810 errmsg-utf8.txt no longer uses charsets
Charset names in the 'languages' line are not used any more. Removing to avoid confusion. All messages in errmsg-utf8.txt are in utf8 now. Charset names should have been removed in MySQL-5.5 during: https://dev.mysql.com/worklog/task/?id=751 Bump version number.
Diffstat (limited to 'extra')
-rw-r--r--extra/comp_err.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/extra/comp_err.c b/extra/comp_err.c
index 40562aeae5d..455f0d3c0d9 100644
--- a/extra/comp_err.c
+++ b/extra/comp_err.c
@@ -37,7 +37,7 @@
#define ERRORS_PER_RANGE 1000
#define MAX_SECTIONS 4
#define HEADER_LENGTH 32 /* Length of header in errmsg.sys */
-#define ERRMSG_VERSION 4 /* Version number of errmsg.sys */
+#define ERRMSG_VERSION 5 /* Version number of errmsg.sys */
#define DEFAULT_CHARSET_DIR "../sql/share/charsets"
#define ER_PREFIX "ER_"
#define ER_PREFIX2 "MARIA_ER_"
@@ -85,7 +85,6 @@ struct languages
{
char *lang_long_name; /* full name of the language */
char *lang_short_name; /* abbreviation of the lang. */
- char *charset; /* Character set name */
struct languages *next_lang; /* Pointer to next language */
};
@@ -329,7 +328,7 @@ static int create_sys_files(struct languages *lang_head,
uint error_count)
{
FILE *to;
- uint csnum= 0, i, row_nr;
+ uint i, row_nr;
ulong length;
uchar head[HEADER_LENGTH];
char outfile[FN_REFLEN], *outfile_end;
@@ -345,16 +344,6 @@ static int create_sys_files(struct languages *lang_head,
*/
for (tmp_lang= lang_head; tmp_lang; tmp_lang= tmp_lang->next_lang)
{
-
- /* setting charset name */
- if (!(csnum= get_charset_number(tmp_lang->charset, MY_CS_PRIMARY,
- MYF(MY_UTF8_IS_UTF8MB3))))
- {
- fprintf(stderr, "Unknown charset '%s' in '%s'\n", tmp_lang->charset,
- TXTFILE);
- DBUG_RETURN(1);
- }
-
outfile_end= strxmov(outfile, DATADIRECTORY,
tmp_lang->lang_long_name, NullS);
if (!my_stat(outfile, &stat_info,MYF(0)))
@@ -410,7 +399,6 @@ static int create_sys_files(struct languages *lang_head,
int2store(head + 10, max_error); /* Max error */
int2store(head + 12, row_nr);
int2store(head + 14, section_count);
- head[30]= csnum;
my_fseek(to, 0l, MY_SEEK_SET, MYF(0));
if (my_fwrite(to, (uchar*) head, HEADER_LENGTH, MYF(MY_WME | MY_FNABP)) ||
@@ -450,7 +438,6 @@ static void clean_up(struct languages *lang_head, struct errors *error_head)
next_language= tmp_lang->next_lang;
my_free(tmp_lang->lang_short_name);
my_free(tmp_lang->lang_long_name);
- my_free(tmp_lang->charset);
my_free(tmp_lang);
}
@@ -1113,12 +1100,6 @@ static struct languages *parse_charset_string(char *str)
DBUG_RETURN(0); /* OOM: Fatal error */
DBUG_PRINT("info", ("short_name: %s", new_lang->lang_short_name));
- /* getting the charset name */
- str= skip_delimiters(str);
- if (!(new_lang->charset= get_word(&str)))
- DBUG_RETURN(0); /* Fatal error */
- DBUG_PRINT("info", ("charset: %s", new_lang->charset));
-
/* skipping space, tab or "," */
str= skip_delimiters(str);
}