Commit 0e665a7a authored by bar@mysql.com's avatar bar@mysql.com

sql_show.cc:

  Don't display charsets/collations with HIDDEN flag.
ctype-utf8.c:
  Adding HIDDEN flag to "filename"
  Changeing ID to 17 which was previosly
  used by deprecated "win1251", removed in 4.1.
charset-def.c:
  Adding "filename" as a hidden charset, for test purposes.
m_ctype.h:
  Adding MY_CS_HIDDEN flag,
  to hide charsets and collations from
  being displayed in SHOW.
parent 92e1557d
......@@ -66,7 +66,8 @@ extern MY_UNICASE_INFO *my_unicase_turkish[256];
#define MY_CS_UNICODE 128 /* is a charset is full unicode */
#define MY_CS_READY 256 /* if a charset is initialized */
#define MY_CS_AVAILABLE 512 /* If either compiled-in or loaded*/
#define MY_CS_CSSORT 1024 /* if case sensitive sort order */
#define MY_CS_CSSORT 1024 /* if case sensitive sort order */
#define MY_CS_HIDDEN 2048 /* don't display in SHOW */
#define MY_CHARSET_UNDEFINED 0
......
......@@ -78,6 +78,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
CHARSET_INFO *cs;
add_compiled_collation(&my_charset_bin);
add_compiled_collation(&my_charset_filename);
add_compiled_collation(&my_charset_latin1);
add_compiled_collation(&my_charset_latin1_bin);
......
......@@ -2835,6 +2835,7 @@ int fill_schema_charsets(THD *thd, TABLE_LIST *tables, COND *cond)
CHARSET_INFO *tmp_cs= cs[0];
if (tmp_cs && (tmp_cs->state & MY_CS_PRIMARY) &&
(tmp_cs->state & MY_CS_AVAILABLE) &&
!(tmp_cs->state & MY_CS_HIDDEN) &&
!(wild && wild[0] &&
wild_case_compare(scs, tmp_cs->csname,wild)))
{
......@@ -2904,6 +2905,7 @@ int fill_schema_collation(THD *thd, TABLE_LIST *tables, COND *cond)
CHARSET_INFO **cl;
CHARSET_INFO *tmp_cs= cs[0];
if (!tmp_cs || !(tmp_cs->state & MY_CS_AVAILABLE) ||
(tmp_cs->state & MY_CS_HIDDEN) ||
!(tmp_cs->state & MY_CS_PRIMARY))
continue;
for (cl= all_charsets; cl < all_charsets+255 ;cl ++)
......
......@@ -4048,8 +4048,8 @@ static MY_CHARSET_HANDLER my_charset_filename_handler=
CHARSET_INFO my_charset_filename=
{
33,0,0, /* number */
MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM|MY_CS_UNICODE, /* state */
17,0,0, /* number */
MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_HIDDEN,
"filename", /* cs name */
"filename", /* name */
"", /* comment */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment