Commit c4dc670d authored by bar@bar.mysql.r18.ru's avatar bar@bar.mysql.r18.ru

Every character set now has binary collation

parent dc634a18
......@@ -57,22 +57,40 @@ static void set_max_sort_char(CHARSET_INFO *cs)
static void simple_cs_init_functions(CHARSET_INFO *cs)
{
if (cs->state & MY_CS_BINSORT)
{
CHARSET_INFO *b= &my_charset_bin;
cs->strnxfrm = b->strnxfrm;
cs->like_range = b->like_range;
cs->wildcmp = b->wildcmp;
cs->strnncoll = b->strnncoll;
cs->strnncollsp = b->strnncollsp;
cs->tosort = b->tosort;
cs->strcasecmp = b->strcasecmp;
cs->strncasecmp = b->strncasecmp;
cs->hash_caseup = b->hash_caseup;
cs->hash_sort = b->hash_sort;
}
else
{
cs->strnxfrm = my_strnxfrm_simple;
cs->strnncoll = my_strnncoll_simple;
cs->strnncollsp = my_strnncollsp_simple;
cs->like_range = my_like_range_simple;
cs->wildcmp = my_wildcmp_8bit;
cs->mb_wc = my_mb_wc_8bit;
cs->wc_mb = my_wc_mb_8bit;
cs->caseup_str = my_caseup_str_8bit;
cs->casedn_str = my_casedn_str_8bit;
cs->caseup = my_caseup_8bit;
cs->casedn = my_casedn_8bit;
cs->strnncoll = my_strnncoll_simple;
cs->strnncollsp = my_strnncollsp_simple;
cs->tosort = my_tosort_8bit;
cs->strcasecmp = my_strcasecmp_8bit;
cs->strncasecmp = my_strncasecmp_8bit;
cs->hash_caseup = my_hash_caseup_simple;
cs->hash_sort = my_hash_sort_simple;
}
cs->caseup_str = my_caseup_str_8bit;
cs->casedn_str = my_casedn_str_8bit;
cs->caseup = my_caseup_8bit;
cs->casedn = my_casedn_8bit;
cs->mb_wc = my_mb_wc_8bit;
cs->wc_mb = my_wc_mb_8bit;
cs->snprintf = my_snprintf_8bit;
cs->long10_to_str= my_long10_to_str_8bit;
cs->longlong10_to_str= my_longlong10_to_str_8bit;
......@@ -223,7 +241,8 @@ static my_bool simple_cs_is_full(CHARSET_INFO *cs)
{
return ((cs->csname && cs->tab_to_uni && cs->ctype && cs->to_upper &&
cs->to_lower) &&
(cs->number && cs->name && cs->sort_order));
(cs->number && cs->name &&
(cs->sort_order || (cs->state & MY_CS_BINSORT) )));
}
......
<?xml version='1.0' encoding="utf-8"?>
<charsets max-id=63>
<charsets max-id="82">
<description>
This file lists all of the available character sets.
......@@ -16,7 +16,10 @@ To make maintaining easier please:
<alias>big-five</alias>
<alias>cn-big5</alias>
<alias>csbig5</alias>
<collation name="big5" id="1" order="Chinese" flag="primary" flag="compiled"/>
<collation name="big5" id="1" order="Chinese">
<flag>primary</flag>
<flag>compiled"</flag>
</collation>
</charset>
<charset name="latin2">
......@@ -39,10 +42,12 @@ To make maintaining easier please:
</collation>
<collation name="hungarian" id="21" order="Hungarian"/>
<collation name="croat" id="27" order="Croatian"/>
<collation name="latin2_bin" id="77" order="Binary" flag="binary"/>
</charset>
<charset name="dec8">
<family>Western</family>
<collation name="dec_bin" id="69" order="Binary" flag="binary"/>
<collation name="dec8" id="3" flag="primary">
<order>Dutch</order>
<order>English</order>
......@@ -71,6 +76,7 @@ To make maintaining easier please:
<order>Pogtuguese</order>
<order>Spanish</order>
</collation>
<collation name="pclatin1_bin" id="80" order="Binary" flag="binary"/>
</charset>
<charset name="latin1">
......@@ -86,7 +92,7 @@ To make maintaining easier please:
<collation name="latin1" id="8" order="Finnish, Swedish" flag="primary"/>
<collation name="danish" id="15" order="Danish"/>
<collation name="latin1_de" id="31" order="German DIN" flag="compiled"/>
<collation name="latin1_bin" id="47" order="Binary"/>
<collation name="latin1_bin" id="47" order="Binary" flag="binary"/>
<collation name="latin1_ci_as" id="48">
<order>Dutch</order>
<order>English</order>
......@@ -112,6 +118,7 @@ To make maintaining easier please:
<charset name="hp8">
<family>Western</family>
<alias>hproman8</alias>
<collation name="hp8_bin" id="72" order="Binary" flag="binary"/>
<collation name="hp8" id="6" flag="primary">
<order>Dutch</order>
<order>English</order>
......@@ -129,12 +136,14 @@ To make maintaining easier please:
<alias>koi8-r</alias>
<alias>cskoi8r</alias>
<collation name="koi8r" id="7" order="Russian" flag="primary"/>
<collation name="koi8r_bin" id="74" order="Binary" flag="binary"/>
</charset>
<charset name="swe7">
<family>Western</family>
<alias>iso-646-se</alias>
<collation name="swe7" id="10" order="Swedish" flag="primary"/>
<collation name="swe7_bin" id="82" order="Binary" flag="binary"/>
</charset>
<charset name="ascii">
......@@ -145,6 +154,7 @@ To make maintaining easier please:
<alias>iso-ir-6</alias>
<alias>iso646-us</alias>
<collation name="ascii" id="11" order="English" flag="primary"/>
<collation name="ascii_bin" id="65" order="Binary" flag="binary"/>
</charset>
<charset name="ujis">
......@@ -175,8 +185,8 @@ To make maintaining easier please:
<order>Mongolian</order>
<order>Ukrainian</order>
</collation>
<collation name="win1251ukr" id="23" order="<Depreciated>"/>
<collation name="cp1251_bin" id="50" order="Binary"/>
<collation name="win1251ukr" id="23" order="Depreciated"/>
<collation name="cp1251_bin" id="50" order="Binary" flag="binary"/>
<collation name="cp1251_ci_as" id="51">
<order>Belarusian</order>
<order>Bulgarian</order>
......@@ -203,19 +213,26 @@ To make maintaining easier please:
<alias>iso-8859-8</alias>
<alias>iso-ir-138</alias>
<collation name="hebrew" id="16" order="Hebrew" flag="primary"/>
<collation name="hebrew_bin" id="71" order="Binary" flag="binary"/>
</charset>
<charset name="tis620">
<family>Thai</family>
<alias>tis-620</alias>
<collation name="tis620" id="18" order="Thai" flag="primary" flag="compiled"/>
<collation name="tis620" id="18" order="Thai">
<flag>primary</flag>
<flag>compiled</flag>
</collation>
</charset>
<charset name="euckr">
<family>Korean</family>
<alias>euc_kr</alias>
<alias>euc-kr</alias>
<collation name="euckr" id="19" order="Korean" flag="primary" flag="compiled"/>
<collation name="euckr" id="19" order="Korean">
<flag>primary</flag>
<flag>compiled"</flag>
</collation>
</charset>
<charset name="latin7">
......@@ -226,19 +243,24 @@ To make maintaining easier please:
<collation name="estonia" id="20" order="Estonian" flag="primary"/>
<collation name="latvian" id="41" order="Latvian"/>
<collation name="latvian1" id="42" order="Latvian"/>
<collation name="latin7_bin" id="79" order="Binary" flag="binary"/>
</charset>
<charset name="koi8u">
<family>Cyrillic</family>
<alias>koi8-u</alias>
<collation name="koi8u" id="22" order="Ukranian" flag="primary"/>
<collation name="koi8u_bin" id="75" order="Binary" flag="binary"/>
</charset>
<charset name="gb2312">
<family>Simplified Chinese</family>
<alias>chinese</alias>
<alias>iso-ir-58</alias>
<collation name="gb2312" id="24" order="Chinese" flag="primary" flag="compiled"/>
<collation name="gb2312" id="24" order="Chinese">
<flag>primary</flag>
<flag>compiled"</flag>
</collation>
</charset>
<charset name="greek">
......@@ -249,6 +271,7 @@ To make maintaining easier please:
<alias>iso-8859-7</alias>
<alias>iso-ir-126</alias>
<collation name="greek" id="25" order="Greek" flag="primary"/>
<collation name="greek_bin" id="70" order="Binary" flag="binary"/>
</charset>
<charset name="cp1250">
......@@ -265,20 +288,24 @@ To make maintaining easier please:
<order>Sorbian</order>
</collation>
<collation name="cp1250_czech" id="34" order="Czech"/>
<collation name="cp1250_bin" id="66" order="Binary" flag="binary"/>
</charset>
<charset name="gbk">
<family>East Asian</family>
<alias>cp936</alias>
<collation name="gbk" id="28" order="Chinese" flag="primary" flag="compiled"/>
<collation name="gbk" id="28" order="Chinese">
<flag>primary</flag>
<flag>compiled</flag>
</collation>
</charset>
<charset name="cp1257">
<family>Baltic</family>
<alias>WinBaltRim</alias>
<alias>windows-1257</alias>
<collation name="cp1257" id="29" order="<Depreciated>"/>
<collation name="cp1257_bin" id="58" order="Binary"/>
<collation name="cp1257" id="29" order="Depreciated"/>
<collation name="cp1257_bin" id="58" order="Binary" flag="binary"/>
<collation name="cp1257_ci_ai" id="59" flag="primary">
<order>Latvian</order>
<order>Lithuanian</order>
......@@ -302,12 +329,14 @@ To make maintaining easier please:
<alias>latin5</alias>
<alias>turkish</alias>
<collation name="latin5" id="30" order="Turkish" flag="primary"/>
<collation name="latin5_bin" id="78" order="Binary" flag="binary"/>
</charset>
<charset name="armscii8">
<family>South Asian</family>
<alias>armscii-8</alias>
<collation name="armscii8" id="32" order="Armenian" flag="primary"/>
<collation name="armscii_bin" id="64" order="Binary" flag="binary"/>
</charset>
<charset name="utf8">
......@@ -328,11 +357,13 @@ To make maintaining easier please:
<alias>ibm866</alias>
<alias>DOSCyrillicRussian</alias>
<collation name="cp866" id="36" order="Russian" flag="primary"/>
<collation name="cp866_bin" id="68" order="Binary" flag="binary"/>
</charset>
<charset name="keybcs2">
<family>Central European</family>
<collation name="keybcs2" id="37" order="Czech" flag="primary"/>
<collation name="keybcs2_bin" id="73" order="Binary" flag="binary"/>
</charset>
<charset name="MacCE">
......@@ -347,7 +378,7 @@ To make maintaining easier please:
<order>Slovenian</order>
<order>Sorbian</order>
</collation>
<collation name="macce_bin" id="43" order="Binary"/>
<collation name="macce_bin" id="43" order="Binary" flag="binary"/>
<collation name="macce_ci_ai" id="44">
<order>Hungarian</order>
<order>Polish</order>
......@@ -392,7 +423,7 @@ To make maintaining easier please:
<order>Pogtuguese</order>
<order>Spanish</order>
</collation>
<collation name="macroman_bin" id="53" order="Binary"/>
<collation name="macroman_bin" id="53" order="Binary" flag="binary"/>
<collation name="macroman_ci_as" id="54">
<order>Dutch</order>
<order>English</order>
......@@ -439,12 +470,14 @@ To make maintaining easier please:
<order>Slovenian</order>
<order>Sorbian</order>
</collation>
<collation name="pclatin2_bin" id="81" order="Binary" flag="binary"/>
</charset>
<charset name="cp1256">
<family>Arabic</family>
<alias>ms-arab</alias>
<alias>windows-1256</alias>
<collation name="cp1256_bin" id="67" order="Binary" flag="binary"/>
<collation name="cp1256" id="57" order="Arabic" flag="primary">
<order>Arabic</order>
<order>Persian</order>
......@@ -454,7 +487,11 @@ To make maintaining easier please:
</charset>
<charset name="binary">
<collation name="binary" id="63" order="Binary" flag="primary" flag="compiled"/>
<collation name="binary" id="63" order="Binary">
<flag>primary</flag>
<flag>compiled</flag>
</collation>
</charset>
</charsets>
......@@ -115,27 +115,7 @@
</collation>
<collation name="macce_bin">
<map>
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F
40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F
50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F
60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F
70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F
80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F
90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F
A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF
B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF
C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF
D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF
E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF
F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF
</map>
</collation>
<collation name="macce_bin" flag="binary"/>
<collation name="macce_ci_ai">
<map>
......
......@@ -111,26 +111,7 @@
</map>
</collation>
<collation name="macroman_bin">
<map>
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F
40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F
50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F
60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F
70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F
80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F
90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F
A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF
B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF
C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF
D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF
E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF
F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF
</map>
</collation>
<collation name="macroman_bin" flag="binary"/>
<collation name="macroman_ci_ai">
<map>
......
......@@ -114,6 +114,8 @@
</map>
</collation>
<collation name="armscii_bin" flag="binary"/>
</charset>
</charsets>
......@@ -114,6 +114,8 @@
</map>
</collation>
<collation name="ascii_bin" flag="binary"/>
</charset>
</charsets>
......@@ -116,6 +116,8 @@
<collation name="cp1250_czech"/>
<collation name="cp1250_bin" flag="binary"/>
</charset>
</charsets>
......@@ -116,26 +116,7 @@
</collation>
<collation name="cp1251_bin">
<map>
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F
40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F
50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F
60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F
70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F
80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F
90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F
A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF
B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF
C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF
D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF
E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF
F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF
</map>
</collation>
<collation name="cp1251_bin" flag="binary"/>
<collation name="cp1251_ci_as">
......
......@@ -116,6 +116,7 @@
</map>
</collation>
<collation name="cp1256_bin" flag="binary"/>
</charset>
......
......@@ -115,26 +115,7 @@
</collation>
<collation name="cp1257_bin">
<map>
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F
40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F
50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F
60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F
70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F
80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F
90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F
A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF
B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF
C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF
D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF
E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF
F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF
</map>
</collation>
<collation name="cp1257_bin" flag="binary"/>
<collation name="cp1257_ci_ai">
......
......@@ -116,6 +116,8 @@
</map>
</collation>
<collation name="cp866_bin" flag="binary"/>
</charset>
</charsets>
......
......@@ -114,6 +114,7 @@
</map>
</collation>
<collation name="dec_bin" flag="binary"/>
</charset>
......
......@@ -114,6 +114,8 @@
</map>
</collation>
<collation name="greek_bin" flag="binary"/>
</charset>
</charsets>
......
......@@ -114,6 +114,8 @@
</map>
</collation>
<collation name="hebrew_bin" flag="binary"/>
</charset>
</charsets>
......
......@@ -115,6 +115,8 @@
</map>
</collation>
<collation name="hp8_bin" flag="binary"/>
</charset>
</charsets>
......@@ -114,6 +114,8 @@
</map>
</collation>
<collation name="keybcs2_bin" flag="binary"/>
</charset>
</charsets>
......
......@@ -114,6 +114,8 @@
</map>
</collation>
<collation name="koi8r_bin" flag="binary"/>
</charset>
</charsets>
......@@ -114,6 +114,8 @@
</map>
</collation>
<collation name="koi8u_bin" flag="binary"/>
</charset>
</charsets>
......
......@@ -162,26 +162,7 @@
<collation name="latin1_de"/>
<collation name="latin1_bin">
<map>
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F
40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F
50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F
60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F
70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F
80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F
90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F
A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF
B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF
C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF
D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF
E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF
F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF
</map>
</collation>
<collation name="latin1_bin" flag="binary"/>
<collation name="latin1_ci_as">
......
......@@ -161,6 +161,7 @@
</map>
</collation>
<collation name="latin2_bin" flag="binary"/>
</charset>
......
......@@ -119,6 +119,7 @@
</map>
</collation>
<collation name="latin5_bin" flag="binary"/>
</charset>
......
......@@ -162,6 +162,7 @@
</map>
</collation>
<collation name="latin7_bin" flag="binary"/>
</charset>
......
......@@ -114,6 +114,8 @@
</map>
</collation>
<collation name="pclatin1_bin" flag="binary"/>
</charset>
</charsets>
......@@ -114,6 +114,8 @@
</map>
</collation>
<collation name="swe7_bin" flag="binary"/>
</charset>
</charsets>
......
......@@ -201,6 +201,8 @@ static int cs_value(MY_XML_PARSER *st,const char *attr, uint len)
case _CS_FLAG:
if (!strncmp("primary",attr,len))
i->cs.state|= MY_CS_PRIMARY;
else if (!strncmp("binary",attr,len))
i->cs.state|= MY_CS_BINSORT;
break;
case _CS_UPPERMAP:
fill_uchar(i->to_upper,MY_CS_TO_UPPER_TABLE_SIZE,attr,len);
......
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