1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Some changes to separate charset and collation terms

This commit is contained in:
bar@bar.mysql.r18.ru
2003-01-04 14:12:20 +04:00
parent 259b79beac
commit a172e5ad2a
17 changed files with 76 additions and 10 deletions

View File

@ -1362,10 +1362,14 @@ int mysqld_show_charsets(THD *thd, const char *wild)
List<Item> field_list;
CHARSET_INFO **cs;
Protocol *protocol= thd->protocol;
char flags[64];
DBUG_ENTER("mysqld_show_charsets");
field_list.push_back(new Item_empty_string("Name",30));
field_list.push_back(new Item_empty_string("CS_Name",30));
field_list.push_back(new Item_empty_string("COL_Name",30));
field_list.push_back(new Item_return_int("Id",11, FIELD_TYPE_SHORT));
field_list.push_back(new Item_empty_string("Flags",30));
field_list.push_back(new Item_return_int("strx_maxlen",3, FIELD_TYPE_TINY));
field_list.push_back(new Item_return_int("mb_maxlen",3, FIELD_TYPE_TINY));
@ -1374,14 +1378,17 @@ int mysqld_show_charsets(THD *thd, const char *wild)
for (cs=all_charsets ; cs < all_charsets+255 ; cs++ )
{
if (!cs[0])
continue;
if (!(wild && wild[0] &&
if (cs[0] && !(wild && wild[0] &&
wild_case_compare(system_charset_info,cs[0]->name,wild)))
{
protocol->prepare_for_resend();
protocol->store(cs[0]->csname);
protocol->store(cs[0]->name);
protocol->store_short((longlong) cs[0]->number);
flags[0]='\0';
if (cs[0]->state & MY_CS_PRIMARY)
strcat(flags,"pri");
protocol->store(flags);
protocol->store_tiny((longlong) cs[0]->strxfrm_multiply);
protocol->store_tiny((longlong) cs[0]->mbmaxlen);
if (protocol->write())