diff options
author | bar@bar.mysql.r18.ru <> | 2003-03-04 11:04:19 +0400 |
---|---|---|
committer | bar@bar.mysql.r18.ru <> | 2003-03-04 11:04:19 +0400 |
commit | c4dc670d6127cc8129ce57a2bc3ab76538776ad4 (patch) | |
tree | d871054113cebc8f3cd4841a7523fced0b1ffec8 | |
parent | dc634a18e9d214e041d6dda9c47656a91266b3de (diff) | |
download | mariadb-git-c4dc670d6127cc8129ce57a2bc3ab76538776ad4.tar.gz |
Every character set now has binary collation
-rw-r--r-- | mysys/charset.c | 45 | ||||
-rw-r--r-- | sql/share/charsets/Index.xml | 65 | ||||
-rw-r--r-- | sql/share/charsets/MacCE.xml | 22 | ||||
-rw-r--r-- | sql/share/charsets/MacRoman.xml | 21 | ||||
-rw-r--r-- | sql/share/charsets/armscii8.xml | 2 | ||||
-rw-r--r-- | sql/share/charsets/ascii.xml | 2 | ||||
-rw-r--r-- | sql/share/charsets/cp1250.xml | 2 | ||||
-rw-r--r-- | sql/share/charsets/cp1251.xml | 21 | ||||
-rw-r--r-- | sql/share/charsets/cp1256.xml | 1 | ||||
-rw-r--r-- | sql/share/charsets/cp1257.xml | 21 | ||||
-rw-r--r-- | sql/share/charsets/cp866.xml | 2 | ||||
-rw-r--r-- | sql/share/charsets/dec8.xml | 1 | ||||
-rw-r--r-- | sql/share/charsets/greek.xml | 2 | ||||
-rw-r--r-- | sql/share/charsets/hebrew.xml | 2 | ||||
-rw-r--r-- | sql/share/charsets/hp8.xml | 2 | ||||
-rw-r--r-- | sql/share/charsets/keybcs2.xml | 2 | ||||
-rw-r--r-- | sql/share/charsets/koi8r.xml | 2 | ||||
-rw-r--r-- | sql/share/charsets/koi8u.xml | 2 | ||||
-rw-r--r-- | sql/share/charsets/latin1.xml | 21 | ||||
-rw-r--r-- | sql/share/charsets/latin2.xml | 1 | ||||
-rw-r--r-- | sql/share/charsets/latin5.xml | 1 | ||||
-rw-r--r-- | sql/share/charsets/latin7.xml | 1 | ||||
-rw-r--r-- | sql/share/charsets/pclatin1.xml | 2 | ||||
-rw-r--r-- | sql/share/charsets/swe7.xml | 2 | ||||
-rw-r--r-- | strings/ctype.c | 2 |
25 files changed, 119 insertions, 128 deletions
diff --git a/mysys/charset.c b/mysys/charset.c index 1b53eac77df..c5d86f9c856 100644 --- a/mysys/charset.c +++ b/mysys/charset.c @@ -57,22 +57,40 @@ static void set_max_sort_char(CHARSET_INFO *cs) static void simple_cs_init_functions(CHARSET_INFO *cs) { - 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; + 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->like_range = my_like_range_simple; + cs->wildcmp = my_wildcmp_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->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->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) ))); } diff --git a/sql/share/charsets/Index.xml b/sql/share/charsets/Index.xml index e6cea7bc615..4d54b8b53ce 100644 --- a/sql/share/charsets/Index.xml +++ b/sql/share/charsets/Index.xml @@ -1,6 +1,6 @@ <?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> + diff --git a/sql/share/charsets/MacCE.xml b/sql/share/charsets/MacCE.xml index fe64fd18abc..9a6a392b426 100644 --- a/sql/share/charsets/MacCE.xml +++ b/sql/share/charsets/MacCE.xml @@ -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> diff --git a/sql/share/charsets/MacRoman.xml b/sql/share/charsets/MacRoman.xml index b17860f56b2..9dc4d73b3ef 100644 --- a/sql/share/charsets/MacRoman.xml +++ b/sql/share/charsets/MacRoman.xml @@ -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> diff --git a/sql/share/charsets/armscii8.xml b/sql/share/charsets/armscii8.xml index 99ab5eb336d..5012a3d84a9 100644 --- a/sql/share/charsets/armscii8.xml +++ b/sql/share/charsets/armscii8.xml @@ -114,6 +114,8 @@ </map> </collation> +<collation name="armscii_bin" flag="binary"/> + </charset> </charsets> diff --git a/sql/share/charsets/ascii.xml b/sql/share/charsets/ascii.xml index 67ab57de88f..c94901b1ae7 100644 --- a/sql/share/charsets/ascii.xml +++ b/sql/share/charsets/ascii.xml @@ -114,6 +114,8 @@ </map> </collation> +<collation name="ascii_bin" flag="binary"/> + </charset> </charsets> diff --git a/sql/share/charsets/cp1250.xml b/sql/share/charsets/cp1250.xml index a863aceffc9..b858fbff2a0 100644 --- a/sql/share/charsets/cp1250.xml +++ b/sql/share/charsets/cp1250.xml @@ -116,6 +116,8 @@ <collation name="cp1250_czech"/> +<collation name="cp1250_bin" flag="binary"/> + </charset> </charsets> diff --git a/sql/share/charsets/cp1251.xml b/sql/share/charsets/cp1251.xml index 48c525eb797..79b71df9baf 100644 --- a/sql/share/charsets/cp1251.xml +++ b/sql/share/charsets/cp1251.xml @@ -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"> diff --git a/sql/share/charsets/cp1256.xml b/sql/share/charsets/cp1256.xml index 2a6f6032358..a747c7c3a93 100644 --- a/sql/share/charsets/cp1256.xml +++ b/sql/share/charsets/cp1256.xml @@ -116,6 +116,7 @@ </map> </collation> +<collation name="cp1256_bin" flag="binary"/> </charset> diff --git a/sql/share/charsets/cp1257.xml b/sql/share/charsets/cp1257.xml index 5ac2b746ff9..7f1f8293aae 100644 --- a/sql/share/charsets/cp1257.xml +++ b/sql/share/charsets/cp1257.xml @@ -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"> diff --git a/sql/share/charsets/cp866.xml b/sql/share/charsets/cp866.xml index 2b050f3c993..43bab971bb3 100644 --- a/sql/share/charsets/cp866.xml +++ b/sql/share/charsets/cp866.xml @@ -116,6 +116,8 @@ </map> </collation> +<collation name="cp866_bin" flag="binary"/> + </charset> </charsets> diff --git a/sql/share/charsets/dec8.xml b/sql/share/charsets/dec8.xml index 4e76bbffd14..7b40041ec53 100644 --- a/sql/share/charsets/dec8.xml +++ b/sql/share/charsets/dec8.xml @@ -114,6 +114,7 @@ </map> </collation> +<collation name="dec_bin" flag="binary"/> </charset> diff --git a/sql/share/charsets/greek.xml b/sql/share/charsets/greek.xml index eeb22236675..1ad3d1bc9d2 100644 --- a/sql/share/charsets/greek.xml +++ b/sql/share/charsets/greek.xml @@ -114,6 +114,8 @@ </map> </collation> +<collation name="greek_bin" flag="binary"/> + </charset> </charsets> diff --git a/sql/share/charsets/hebrew.xml b/sql/share/charsets/hebrew.xml index 3bf8bec370e..fbd4ea0c1d2 100644 --- a/sql/share/charsets/hebrew.xml +++ b/sql/share/charsets/hebrew.xml @@ -114,6 +114,8 @@ </map> </collation> +<collation name="hebrew_bin" flag="binary"/> + </charset> </charsets> diff --git a/sql/share/charsets/hp8.xml b/sql/share/charsets/hp8.xml index 036f1cd067c..619297fa988 100644 --- a/sql/share/charsets/hp8.xml +++ b/sql/share/charsets/hp8.xml @@ -115,6 +115,8 @@ </map> </collation> +<collation name="hp8_bin" flag="binary"/> + </charset> </charsets> diff --git a/sql/share/charsets/keybcs2.xml b/sql/share/charsets/keybcs2.xml index bdbb364822f..e509207c1c5 100644 --- a/sql/share/charsets/keybcs2.xml +++ b/sql/share/charsets/keybcs2.xml @@ -114,6 +114,8 @@ </map> </collation> +<collation name="keybcs2_bin" flag="binary"/> + </charset> </charsets> diff --git a/sql/share/charsets/koi8r.xml b/sql/share/charsets/koi8r.xml index dae780f14fc..c5aeea23997 100644 --- a/sql/share/charsets/koi8r.xml +++ b/sql/share/charsets/koi8r.xml @@ -114,6 +114,8 @@ </map> </collation> +<collation name="koi8r_bin" flag="binary"/> + </charset> </charsets> diff --git a/sql/share/charsets/koi8u.xml b/sql/share/charsets/koi8u.xml index e6cba068997..fd963ff0da5 100644 --- a/sql/share/charsets/koi8u.xml +++ b/sql/share/charsets/koi8u.xml @@ -114,6 +114,8 @@ </map> </collation> +<collation name="koi8u_bin" flag="binary"/> + </charset> </charsets> diff --git a/sql/share/charsets/latin1.xml b/sql/share/charsets/latin1.xml index c14e369454e..87abbe06f77 100644 --- a/sql/share/charsets/latin1.xml +++ b/sql/share/charsets/latin1.xml @@ -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"> diff --git a/sql/share/charsets/latin2.xml b/sql/share/charsets/latin2.xml index 377ab19e8ad..9be39dee47d 100644 --- a/sql/share/charsets/latin2.xml +++ b/sql/share/charsets/latin2.xml @@ -161,6 +161,7 @@ </map> </collation> +<collation name="latin2_bin" flag="binary"/> </charset> diff --git a/sql/share/charsets/latin5.xml b/sql/share/charsets/latin5.xml index a072ffc5072..c73cc645d42 100644 --- a/sql/share/charsets/latin5.xml +++ b/sql/share/charsets/latin5.xml @@ -119,6 +119,7 @@ </map> </collation> +<collation name="latin5_bin" flag="binary"/> </charset> diff --git a/sql/share/charsets/latin7.xml b/sql/share/charsets/latin7.xml index eae4d501f44..89c14a3acd8 100644 --- a/sql/share/charsets/latin7.xml +++ b/sql/share/charsets/latin7.xml @@ -162,6 +162,7 @@ </map> </collation> +<collation name="latin7_bin" flag="binary"/> </charset> diff --git a/sql/share/charsets/pclatin1.xml b/sql/share/charsets/pclatin1.xml index 742dcaec459..da4b6d2ac92 100644 --- a/sql/share/charsets/pclatin1.xml +++ b/sql/share/charsets/pclatin1.xml @@ -114,6 +114,8 @@ </map> </collation> +<collation name="pclatin1_bin" flag="binary"/> + </charset> </charsets> diff --git a/sql/share/charsets/swe7.xml b/sql/share/charsets/swe7.xml index ffa1d90608d..2768768cd9b 100644 --- a/sql/share/charsets/swe7.xml +++ b/sql/share/charsets/swe7.xml @@ -114,6 +114,8 @@ </map> </collation> +<collation name="swe7_bin" flag="binary"/> + </charset> </charsets> diff --git a/strings/ctype.c b/strings/ctype.c index 4f6d34ddd7a..04e4e75890b 100644 --- a/strings/ctype.c +++ b/strings/ctype.c @@ -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); |