From 7f771ce2e1c27be53c5573b0e3f67a30d02501df Mon Sep 17 00:00:00 2001 From: "bar@bar.mysql.r18.ru" <> Date: Wed, 21 May 2003 13:58:30 +0500 Subject: "character_sets" has been removed from SHOW VARIABLES. Use SHOW CHARACTER SET instead. "character_set_system" has been added to display the system character set --- mysys/charset.c | 67 --------------------------------------------------------- 1 file changed, 67 deletions(-) (limited to 'mysys') diff --git a/mysys/charset.c b/mysys/charset.c index 097c35caa56..2d9500e4b0d 100644 --- a/mysys/charset.c +++ b/mysys/charset.c @@ -688,70 +688,3 @@ static void charset_append(DYNAMIC_STRING *s, const char *name) dynstr_append(s, " "); } } - - -/* Returns a dynamically-allocated string listing the character sets - requested. The caller is responsible for freeing the memory. */ - -char *list_charsets(myf want_flags) -{ - DYNAMIC_STRING s; - char *p; - - (void)init_available_charsets(MYF(0)); - init_dynamic_string(&s, NullS, 256, 1024); - - if (want_flags & MY_CS_COMPILED) - { - CHARSET_INFO **cs; - for (cs= all_charsets; cs < all_charsets+255; cs++) - { - if (cs[0]) - { - dynstr_append(&s, cs[0]->name); - dynstr_append(&s, " "); - } - } - } - - if (want_flags & MY_CS_CONFIG) - { - CHARSET_INFO **cs; - char buf[FN_REFLEN]; - MY_STAT status; - - for (cs=all_charsets; cs < all_charsets+255; cs++) - { - if (!cs[0] || !cs[0]->name || charset_in_string(cs[0]->name, &s)) - continue; - get_charset_conf_name(cs[0]->name, buf); - if (!my_stat(buf, &status, MYF(0))) - continue; /* conf file doesn't exist */ - dynstr_append(&s, cs[0]->name); - dynstr_append(&s, " "); - } - } - - if (want_flags & (MY_CS_INDEX|MY_CS_LOADED)) - { - CHARSET_INFO **cs; - for (cs= all_charsets; cs < all_charsets + 255; cs++) - if (cs[0] && cs[0]->name && (cs[0]->state & want_flags) ) - charset_append(&s, cs[0]->name); - } - - if (s.length) - { - s.str[s.length - 1]= '\0'; /* chop trailing space */ - p= my_strdup(s.str, MYF(MY_WME)); - } - else - { - p= my_strdup("", MYF(MY_WME)); - } - dynstr_free(&s); - - return p; -} - - -- cgit v1.2.1