276
278
if (cs_number == default_charset_info->number)
277
279
return default_charset_info;
279
281
(void) init_available_charsets(MYF(0)); /* If it isn't initialized */
281
283
if (!cs_number || cs_number >= array_elements(all_charsets)-1)
284
286
cs= get_internal_charset(cs_number);
286
288
if (!cs && (flags & MY_WME))
288
290
char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)], cs_string[23];
291
293
int10_to_str(cs_number, cs_string+1, 10);
292
294
my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_string, index_file);