summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/m_ctype.h1
-rw-r--r--mysql-test/r/alter_table.result2
-rw-r--r--mysql-test/r/binary.result2
-rw-r--r--mysql-test/r/cast.result2
-rw-r--r--mysql-test/r/ctype_cp1251.result2
-rw-r--r--mysql-test/r/ctype_many.result326
-rw-r--r--mysql-test/r/federated.result4
-rw-r--r--mysql-test/r/func_in.result2
-rw-r--r--mysql-test/r/ndb_condition_pushdown.result2
-rw-r--r--mysql-test/r/ndb_types.result2
-rw-r--r--mysql-test/r/sp.result2
-rw-r--r--mysql-test/r/system_mysql_db.result2
-rw-r--r--mysql-test/r/type_binary.result113
-rw-r--r--mysql-test/r/type_blob.result6
-rw-r--r--mysql-test/t/alter_table.test2
-rw-r--r--mysql-test/t/binary.test2
-rw-r--r--mysql-test/t/cast.test2
-rw-r--r--mysql-test/t/ctype_cp1251.test2
-rw-r--r--mysql-test/t/ctype_many.test4
-rw-r--r--mysql-test/t/federated.test4
-rw-r--r--mysql-test/t/func_in.test2
-rw-r--r--mysql-test/t/ndb_condition_pushdown.test2
-rw-r--r--mysql-test/t/ndb_types.test2
-rw-r--r--mysql-test/t/sp.test2
-rw-r--r--mysql-test/t/type_binary.test67
-rw-r--r--mysql-test/t/type_blob.test4
-rw-r--r--scripts/mysql_create_system_tables.sh2
-rw-r--r--scripts/mysql_fix_privilege_tables.sql2
-rw-r--r--sql/field.cc3
-rw-r--r--strings/ctype-big5.c2
-rw-r--r--strings/ctype-bin.c32
-rw-r--r--strings/ctype-cp932.c2
-rw-r--r--strings/ctype-czech.c1
-rw-r--r--strings/ctype-euc_kr.c2
-rw-r--r--strings/ctype-eucjpms.c2
-rw-r--r--strings/ctype-extra.c1
-rw-r--r--strings/ctype-gb2312.c2
-rw-r--r--strings/ctype-gbk.c2
-rw-r--r--strings/ctype-latin1.c3
-rw-r--r--strings/ctype-simple.c1
-rw-r--r--strings/ctype-sjis.c2
-rw-r--r--strings/ctype-tis620.c2
-rw-r--r--strings/ctype-uca.c37
-rw-r--r--strings/ctype-ucs2.c2
-rw-r--r--strings/ctype-ujis.c2
-rw-r--r--strings/ctype-utf8.c3
-rw-r--r--strings/ctype-win1250ch.c1
47 files changed, 471 insertions, 198 deletions
diff --git a/include/m_ctype.h b/include/m_ctype.h
index e0a26c4ce56..b7361cb7d7b 100644
--- a/include/m_ctype.h
+++ b/include/m_ctype.h
@@ -231,6 +231,7 @@ typedef struct charset_info_st
uint mbmaxlen;
uint16 min_sort_char;
uint16 max_sort_char; /* For LIKE optimization */
+ uchar pad_char;
my_bool escape_with_backslash_is_dangerous;
MY_CHARSET_HANDLER *cset;
diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result
index 6a710a8de10..644d92b477e 100644
--- a/mysql-test/r/alter_table.result
+++ b/mysql-test/r/alter_table.result
@@ -436,7 +436,7 @@ alter table t1 change a a char(10) character set cp1251;
select a,hex(a) from t1;
a hex(a)
ΤΕΣΤ F2E5F1F2
-alter table t1 change a a binary(10);
+alter table t1 change a a binary(4);
select a,hex(a) from t1;
a hex(a)
ςερς F2E5F1F2
diff --git a/mysql-test/r/binary.result b/mysql-test/r/binary.result
index 5b5f673b071..a8d6c3bf411 100644
--- a/mysql-test/r/binary.result
+++ b/mysql-test/r/binary.result
@@ -85,7 +85,7 @@ NULL
select b from t1 having binary b like '';
b
drop table t1;
-create table t1 (a char(15) binary, b binary(15));
+create table t1 (a char(3) binary, b binary(3));
insert into t1 values ('aaa','bbb'),('AAA','BBB');
select upper(a),upper(b) from t1;
upper(a) upper(b)
diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result
index fa8e810cf2b..9f79a15a181 100644
--- a/mysql-test/r/cast.result
+++ b/mysql-test/r/cast.result
@@ -231,7 +231,7 @@ t1 CREATE TABLE `t1` (
`c5` varchar(2) character set utf8 NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
-create table t1 (a binary(10), b char(10) character set koi8r);
+create table t1 (a binary(4), b char(4) character set koi8r);
insert into t1 values (_binary'ΤΕΣΤ',_binary'ΤΕΣΤ');
select a,b,cast(a as char character set cp1251),cast(b as binary) from t1;
a b cast(a as char character set cp1251) cast(b as binary)
diff --git a/mysql-test/r/ctype_cp1251.result b/mysql-test/r/ctype_cp1251.result
index c65055e726d..47797af3cbe 100644
--- a/mysql-test/r/ctype_cp1251.result
+++ b/mysql-test/r/ctype_cp1251.result
@@ -23,7 +23,7 @@ a
b
c
drop table t1;
-create table t1 (a char(15) binary, b binary(15)) character set cp1251;
+create table t1 (a char(3) binary, b binary(3)) character set cp1251;
insert into t1 values ('aaa','bbb'),('AAA','BBB');
select upper(a),upper(b) from t1;
upper(a) upper(b)
diff --git a/mysql-test/r/ctype_many.result b/mysql-test/r/ctype_many.result
index 87b83acfe0f..125a3fc4286 100644
--- a/mysql-test/r/ctype_many.result
+++ b/mysql-test/r/ctype_many.result
@@ -340,7 +340,7 @@ CYR CAPIT SOFT SIGN ψ ψ
CYR CAPIT E ό ό
CYR CAPIT YU ΰ ΰ
CYR CAPIT YA ρ ρ
-ALTER TABLE t1 ADD bin_f CHAR(32) BYTE NOT NULL default '';
+ALTER TABLE t1 ADD bin_f CHAR(1) BYTE NOT NULL default '';
UPDATE t1 SET bin_f=koi8_ru_f;
SELECT COUNT(DISTINCT bin_f),COUNT(DISTINCT koi8_ru_f),COUNT(DISTINCT utf8_f) FROM t1;
COUNT(DISTINCT bin_f) COUNT(DISTINCT koi8_ru_f) COUNT(DISTINCT utf8_f)
@@ -1331,146 +1331,146 @@ UPDATE t1 SET greek_f=CONVERT(ucs2_f USING greek) WHERE comment LIKE _latin2'GRE
UPDATE t1 SET armscii8_f=CONVERT(ucs2_f USING armscii8) WHERE comment LIKE _latin2'ARM%';
UPDATE t1 SET utf8_f=CONVERT(ucs2_f USING utf8) WHERE utf8_f=_utf8'';
UPDATE t1 SET ucs2_f=CONVERT(utf8_f USING ucs2) WHERE ucs2_f=_ucs2'';
-SELECT * FROM t1;
-comment koi8_ru_f utf8_f bin_f ucs2_f armscii8_f greek_f
-LAT SMALL A a a a a
-LAT SMALL B b b b b
-LAT SMALL C c c c c
-LAT SMALL D d d d d
-LAT SMALL E e e e e
-LAT SMALL F f f f f
-LAT SMALL G g g g g
-LAT SMALL H h h h h
-LAT SMALL I i i i i
-LAT SMALL J j j j j
-LAT SMALL K k k k k
-LAT SMALL L l l l l
-LAT SMALL M m m m m
-LAT SMALL N n n n n
-LAT SMALL O o o o o
-LAT SMALL P p p p p
-LAT SMALL Q q q q q
-LAT SMALL R r r r r
-LAT SMALL S s s s s
-LAT SMALL T t t t t
-LAT SMALL U u u u u
-LAT SMALL V v v v v
-LAT SMALL W w w w w
-LAT SMALL X x x x x
-LAT SMALL Y y y y y
-LAT SMALL Z z z z z
-LAT CAPIT A A A A A
-LAT CAPIT B B B B B
-LAT CAPIT C C C C C
-LAT CAPIT D D D D D
-LAT CAPIT E E E E E
-LAT CAPIT F F F F F
-LAT CAPIT G G G G G
-LAT CAPIT H H H H H
-LAT CAPIT I I I I I
-LAT CAPIT J J J J J
-LAT CAPIT K K K K K
-LAT CAPIT L L L L L
-LAT CAPIT M M M M M
-LAT CAPIT N N N N N
-LAT CAPIT O O O O O
-LAT CAPIT P P P P P
-LAT CAPIT Q Q Q Q Q
-LAT CAPIT R R R R R
-LAT CAPIT S S S S S
-LAT CAPIT T T T T T
-LAT CAPIT U U U U U
-LAT CAPIT V V V V V
-LAT CAPIT W W W W W
-LAT CAPIT X X X X X
-LAT CAPIT Y Y Y Y Y
-LAT CAPIT Z Z Z Z Z
-CYR SMALL A Π° Π° Α Π°
-CYR SMALL BE Π± Π± Β Π±
-CYR SMALL VE Π² Π² Χ Π²
-CYR SMALL GE Π³ Π³ Η Π³
-CYR SMALL DE Π΄ Π΄ Δ Π΄
-CYR SMALL IE Π΅ Π΅ Ε Π΅
-CYR SMALL IO Ρ‘ Ρ‘ £ Ρ‘
-CYR SMALL ZHE ΠΆ ΠΆ Φ ΠΆ
-CYR SMALL ZE Π· Π· Ϊ Π·
-CYR SMALL I ΠΈ ΠΈ Ι ΠΈ
-CYR SMALL KA ΠΊ ΠΊ Λ ΠΊ
-CYR SMALL EL Π» Π» Μ Π»
-CYR SMALL EM ΠΌ ΠΌ Ν ΠΌ
-CYR SMALL EN Π½ Π½ Ξ Π½
-CYR SMALL O ΠΎ ΠΎ Ο ΠΎ
-CYR SMALL PE ΠΏ ΠΏ Π ΠΏ
-CYR SMALL ER Ρ€ Ρ€ Ρ€
-CYR SMALL ES с с Σ Ρ
-CYR SMALL TE Ρ‚ Ρ‚ Τ Ρ‚
-CYR SMALL U Ρƒ Ρƒ Υ Ρƒ
-CYR SMALL EF Ρ„ Ρ„ Ζ Ρ„
-CYR SMALL HA Ρ… Ρ… Θ Ρ…
-CYR SMALL TSE Ρ† Ρ† Γ Ρ†
-CYR SMALL CHE Ρ‡ Ρ‡ ή Ρ‡
-CYR SMALL SHA ш ш Ϋ Ρˆ
-CYR SMALL SCHA Ρ‰ Ρ‰ έ Ρ‰
-CYR SMALL HARD SIGN ъ ъ ί ΡŠ
-CYR SMALL YERU Ρ‹ Ρ‹ Ω Ρ‹
-CYR SMALL SOFT SIGN ь ь Ψ ΡŒ
-CYR SMALL E э э ά Ρ
-CYR SMALL YU ю ю ΐ ю
-CYR SMALL YA я я Ρ Ρ
-CYR CAPIT A А А α А
-CYR CAPIT BE Π‘ Π‘ β Π‘
-CYR CAPIT VE Π’ Π’ χ Π’
-CYR CAPIT GE Π“ Π“ η Π“
-CYR CAPIT DE Π” Π” δ Π”
-CYR CAPIT IE Π• Π• ε Π•
-CYR CAPIT IO Ё Ё ³ Ё
-CYR CAPIT ZHE Π– Π– φ Π–
-CYR CAPIT ZE Π— Π— ϊ Π—
-CYR CAPIT I И И ι И
-CYR CAPIT KA К К λ К
-CYR CAPIT EL Π› Π› μ Π›
-CYR CAPIT EM М М ν М
-CYR CAPIT EN Н Н ξ Н
-CYR CAPIT O О О ο О
-CYR CAPIT PE П П π П
-CYR CAPIT ER Π  Π  ς Π 
-CYR CAPIT ES Π‘ Π‘ σ Π‘
-CYR CAPIT TE Π’ Π’ τ Π’
-CYR CAPIT U Π£ Π£ υ Π£
-CYR CAPIT EF Π€ Π€ ζ Π€
-CYR CAPIT HA Π₯ Π₯ θ Π₯
-CYR CAPIT TSE Π¦ Π¦ γ Π¦
-CYR CAPIT CHE Π§ Π§ ώ Π§
-CYR CAPIT SHA Π¨ Π¨ ϋ Π¨
-CYR CAPIT SCHA Π© Π© ύ Π©
-CYR CAPIT HARD SIGN Πͺ Πͺ Πͺ
-CYR CAPIT YERU Π« Π« ω Π«
-CYR CAPIT SOFT SIGN Π¬ Π¬ ψ Π¬
-CYR CAPIT E Π­ Π­ ό Π­
-CYR CAPIT YU Π Π ΰ Π
-CYR CAPIT YA Π― Π― ρ Π―
-GREEK CAPIT ALPHA Ξ‘ Ξ‘ Ξ‘
-GREEK CAPIT BETA Ξ’ Ξ’ Ξ’
-GREEK CAPIT GAMMA Ξ“ Ξ“ Ξ“
-GREEK CAPIT DELTA Ξ” Ξ” Ξ”
-GREEK CAPIT EPSILON Ξ• Ξ• Ξ•
-GREEK SMALL ALPHA Ξ± Ξ± Ξ±
-GREEK SMALL BETA Ξ² Ξ² Ξ²
-GREEK SMALL GAMMA Ξ³ Ξ³ Ξ³
-GREEK SMALL DELTA Ξ΄ Ξ΄ Ξ΄
-GREEK SMALL EPSILON Ξ΅ Ξ΅ Ξ΅
-ARMENIAN CAPIT AYB Τ± Τ± Τ±
-ARMENIAN CAPIT BEN Τ² Τ² Τ²
-ARMENIAN CAPIT GIM Τ³ Τ³ Τ³
-ARMENIAN CAPIT DA Τ΄ Τ΄ Τ΄
-ARMENIAN CAPIT ECH Τ΅ Τ΅ Τ΅
-ARMENIAN CAPIT ZA ΤΆ ΤΆ ΤΆ
-ARMENIAN SMALL YAB Υ‘ Υ‘ Υ‘
-ARMENIAN SMALL BEN Υ’ Υ’ Υ’
-ARMENIAN SMALL GIM Υ£ Υ£ Υ£
-ARMENIAN SMALL DA Υ€ Υ€ Υ€
-ARMENIAN SMALL ECH Υ₯ Υ₯ Υ₯
-ARMENIAN SMALL ZA Υ¦ Υ¦ Υ¦
+SELECT comment, koi8_ru_f, utf8_f, hex(bin_f), ucs2_f, armscii8_f, greek_f FROM t1;
+comment koi8_ru_f utf8_f hex(bin_f) ucs2_f armscii8_f greek_f
+LAT SMALL A a a 61 a
+LAT SMALL B b b 62 b
+LAT SMALL C c c 63 c
+LAT SMALL D d d 64 d
+LAT SMALL E e e 65 e
+LAT SMALL F f f 66 f
+LAT SMALL G g g 67 g
+LAT SMALL H h h 68 h
+LAT SMALL I i i 69 i
+LAT SMALL J j j 6A j
+LAT SMALL K k k 6B k
+LAT SMALL L l l 6C l
+LAT SMALL M m m 6D m
+LAT SMALL N n n 6E n
+LAT SMALL O o o 6F o
+LAT SMALL P p p 70 p
+LAT SMALL Q q q 71 q
+LAT SMALL R r r 72 r
+LAT SMALL S s s 73 s
+LAT SMALL T t t 74 t
+LAT SMALL U u u 75 u
+LAT SMALL V v v 76 v
+LAT SMALL W w w 77 w
+LAT SMALL X x x 78 x
+LAT SMALL Y y y 79 y
+LAT SMALL Z z z 7A z
+LAT CAPIT A A A 41 A
+LAT CAPIT B B B 42 B
+LAT CAPIT C C C 43 C
+LAT CAPIT D D D 44 D
+LAT CAPIT E E E 45 E
+LAT CAPIT F F F 46 F
+LAT CAPIT G G G 47 G
+LAT CAPIT H H H 48 H
+LAT CAPIT I I I 49 I
+LAT CAPIT J J J 4A J
+LAT CAPIT K K K 4B K
+LAT CAPIT L L L 4C L
+LAT CAPIT M M M 4D M
+LAT CAPIT N N N 4E N
+LAT CAPIT O O O 4F O
+LAT CAPIT P P P 50 P
+LAT CAPIT Q Q Q 51 Q
+LAT CAPIT R R R 52 R
+LAT CAPIT S S S 53 S
+LAT CAPIT T T T 54 T
+LAT CAPIT U U U 55 U
+LAT CAPIT V V V 56 V
+LAT CAPIT W W W 57 W
+LAT CAPIT X X X 58 X
+LAT CAPIT Y Y Y 59 Y
+LAT CAPIT Z Z Z 5A Z
+CYR SMALL A Π° Π° C1 Π°
+CYR SMALL BE Π± Π± C2 Π±
+CYR SMALL VE Π² Π² D7 Π²
+CYR SMALL GE Π³ Π³ C7 Π³
+CYR SMALL DE Π΄ Π΄ C4 Π΄
+CYR SMALL IE Π΅ Π΅ C5 Π΅
+CYR SMALL IO Ρ‘ Ρ‘ A3 Ρ‘
+CYR SMALL ZHE ΠΆ ΠΆ D6 ΠΆ
+CYR SMALL ZE Π· Π· DA Π·
+CYR SMALL I ΠΈ ΠΈ C9 ΠΈ
+CYR SMALL KA ΠΊ ΠΊ CB ΠΊ
+CYR SMALL EL Π» Π» CC Π»
+CYR SMALL EM ΠΌ ΠΌ CD ΠΌ
+CYR SMALL EN Π½ Π½ CE Π½
+CYR SMALL O ΠΎ ΠΎ CF ΠΎ
+CYR SMALL PE ΠΏ ΠΏ D0 ΠΏ
+CYR SMALL ER Ρ€ Ρ€ D2 Ρ€
+CYR SMALL ES с с D3 с
+CYR SMALL TE Ρ‚ Ρ‚ D4 Ρ‚
+CYR SMALL U Ρƒ Ρƒ D5 Ρƒ
+CYR SMALL EF Ρ„ Ρ„ C6 Ρ„
+CYR SMALL HA Ρ… Ρ… C8 Ρ…
+CYR SMALL TSE Ρ† Ρ† C3 Ρ†
+CYR SMALL CHE Ρ‡ Ρ‡ DE Ρ‡
+CYR SMALL SHA ш ш DB ш
+CYR SMALL SCHA Ρ‰ Ρ‰ DD Ρ‰
+CYR SMALL HARD SIGN ъ ъ DF ъ
+CYR SMALL YERU Ρ‹ Ρ‹ D9 Ρ‹
+CYR SMALL SOFT SIGN ь ь D8 ь
+CYR SMALL E э э DC э
+CYR SMALL YU ю ю C0 ю
+CYR SMALL YA я я D1 я
+CYR CAPIT A А А E1 А
+CYR CAPIT BE Π‘ Π‘ E2 Π‘
+CYR CAPIT VE Π’ Π’ F7 Π’
+CYR CAPIT GE Π“ Π“ E7 Π“
+CYR CAPIT DE Π” Π” E4 Π”
+CYR CAPIT IE Π• Π• E5 Π•
+CYR CAPIT IO Ё Ё B3 Ё
+CYR CAPIT ZHE Π– Π– F6 Π–
+CYR CAPIT ZE Π— Π— FA Π—
+CYR CAPIT I И И E9 И
+CYR CAPIT KA К К EB К
+CYR CAPIT EL Π› Π› EC Π›
+CYR CAPIT EM М М ED М
+CYR CAPIT EN Н Н EE Н
+CYR CAPIT O О О EF О
+CYR CAPIT PE П П F0 П
+CYR CAPIT ER Π  Π  F2 Π 
+CYR CAPIT ES Π‘ Π‘ F3 Π‘
+CYR CAPIT TE Π’ Π’ F4 Π’
+CYR CAPIT U Π£ Π£ F5 Π£
+CYR CAPIT EF Π€ Π€ E6 Π€
+CYR CAPIT HA Π₯ Π₯ E8 Π₯
+CYR CAPIT TSE Π¦ Π¦ E3 Π¦
+CYR CAPIT CHE Π§ Π§ FE Π§
+CYR CAPIT SHA Π¨ Π¨ FB Π¨
+CYR CAPIT SCHA Π© Π© FD Π©
+CYR CAPIT HARD SIGN Πͺ Πͺ FF Πͺ
+CYR CAPIT YERU Π« Π« F9 Π«
+CYR CAPIT SOFT SIGN Π¬ Π¬ F8 Π¬
+CYR CAPIT E Π­ Π­ FC Π­
+CYR CAPIT YU Π Π E0 Π
+CYR CAPIT YA Π― Π― F1 Π―
+GREEK CAPIT ALPHA Ξ‘ 00 Ξ‘ Ξ‘
+GREEK CAPIT BETA Ξ’ 00 Ξ’ Ξ’
+GREEK CAPIT GAMMA Ξ“ 00 Ξ“ Ξ“
+GREEK CAPIT DELTA Ξ” 00 Ξ” Ξ”
+GREEK CAPIT EPSILON Ξ• 00 Ξ• Ξ•
+GREEK SMALL ALPHA Ξ± 00 Ξ± Ξ±
+GREEK SMALL BETA Ξ² 00 Ξ² Ξ²
+GREEK SMALL GAMMA Ξ³ 00 Ξ³ Ξ³
+GREEK SMALL DELTA Ξ΄ 00 Ξ΄ Ξ΄
+GREEK SMALL EPSILON Ξ΅ 00 Ξ΅ Ξ΅
+ARMENIAN CAPIT AYB Τ± 00 Τ± Τ±
+ARMENIAN CAPIT BEN Τ² 00 Τ² Τ²
+ARMENIAN CAPIT GIM Τ³ 00 Τ³ Τ³
+ARMENIAN CAPIT DA Τ΄ 00 Τ΄ Τ΄
+ARMENIAN CAPIT ECH Τ΅ 00 Τ΅ Τ΅
+ARMENIAN CAPIT ZA ΤΆ 00 ΤΆ ΤΆ
+ARMENIAN SMALL YAB Υ‘ 00 Υ‘ Υ‘
+ARMENIAN SMALL BEN Υ’ 00 Υ’ Υ’
+ARMENIAN SMALL GIM Υ£ 00 Υ£ Υ£
+ARMENIAN SMALL DA Υ€ 00 Υ€ Υ€
+ARMENIAN SMALL ECH Υ₯ 00 Υ₯ Υ₯
+ARMENIAN SMALL ZA Υ¦ 00 Υ¦ Υ¦
SET CHARACTER SET 'binary';
SELECT * FROM t1;
comment koi8_ru_f utf8_f bin_f ucs2_f armscii8_f greek_f
@@ -1590,28 +1590,28 @@ CYR CAPIT SOFT SIGN ψ Π¬ ψ ,
CYR CAPIT E ό Π­ ό -
CYR CAPIT YU ΰ Π ΰ .
CYR CAPIT YA ρ Π― ρ /
-GREEK CAPIT ALPHA Ξ‘ ‘ Α
-GREEK CAPIT BETA Ξ’ ’ Β
-GREEK CAPIT GAMMA Ξ“ “ Γ
-GREEK CAPIT DELTA Ξ” ” Δ
-GREEK CAPIT EPSILON Ξ• • Ε
-GREEK SMALL ALPHA Ξ± ± α
-GREEK SMALL BETA Ξ² ² β
-GREEK SMALL GAMMA Ξ³ ³ γ
-GREEK SMALL DELTA Ξ΄ ΄ δ
-GREEK SMALL EPSILON Ξ΅ ΅ ε
-ARMENIAN CAPIT AYB Τ± 1 ²
-ARMENIAN CAPIT BEN Τ² 2 ΄
-ARMENIAN CAPIT GIM Τ³ 3 Ά
-ARMENIAN CAPIT DA Τ΄ 4 Έ
-ARMENIAN CAPIT ECH Τ΅ 5 Ί
-ARMENIAN CAPIT ZA ΤΆ 6 Ό
-ARMENIAN SMALL YAB Υ‘ a ³
-ARMENIAN SMALL BEN Υ’ b ΅
-ARMENIAN SMALL GIM Υ£ c ·
-ARMENIAN SMALL DA Υ€ d Ή
-ARMENIAN SMALL ECH Υ₯ e »
-ARMENIAN SMALL ZA Υ¦ f ½
+GREEK CAPIT ALPHA Ξ‘
+GREEK CAPIT BETA Ξ’
+GREEK CAPIT GAMMA Ξ“
+GREEK CAPIT DELTA Ξ”
+GREEK CAPIT EPSILON Ξ•
+GREEK SMALL ALPHA Ξ±
+GREEK SMALL BETA Ξ²
+GREEK SMALL GAMMA Ξ³
+GREEK SMALL DELTA Ξ΄
+GREEK SMALL EPSILON Ξ΅
+ARMENIAN CAPIT AYB Τ±
+ARMENIAN CAPIT BEN Τ²
+ARMENIAN CAPIT GIM Τ³
+ARMENIAN CAPIT DA Τ΄
+ARMENIAN CAPIT ECH Τ΅
+ARMENIAN CAPIT ZA ΤΆ
+ARMENIAN SMALL YAB Υ‘
+ARMENIAN SMALL BEN Υ’
+ARMENIAN SMALL GIM Υ£
+ARMENIAN SMALL DA Υ€
+ARMENIAN SMALL ECH Υ₯
+ARMENIAN SMALL ZA Υ¦
SELECT min(comment),count(*) FROM t1 GROUP BY ucs2_f;
min(comment) count(*)
LAT CAPIT A 2
diff --git a/mysql-test/r/federated.result b/mysql-test/r/federated.result
index e0e0bba3271..b5a1016987e 100644
--- a/mysql-test/r/federated.result
+++ b/mysql-test/r/federated.result
@@ -504,7 +504,7 @@ DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 (
`id` int NOT NULL auto_increment,
`name` char(32) NOT NULL DEFAULT '',
-`bincol` binary(4) NOT NULL,
+`bincol` binary(1) NOT NULL,
`floatval` decimal(5,2) NOT NULL DEFAULT 0.0,
`other` int NOT NULL DEFAULT 0,
PRIMARY KEY (id),
@@ -515,7 +515,7 @@ DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 (
`id` int NOT NULL auto_increment,
`name` char(32) NOT NULL DEFAULT '',
-`bincol` binary(4) NOT NULL,
+`bincol` binary(1) NOT NULL,
`floatval` decimal(5,2) NOT NULL DEFAULT 0.0,
`other` int NOT NULL DEFAULT 0,
PRIMARY KEY (id),
diff --git a/mysql-test/r/func_in.result b/mysql-test/r/func_in.result
index 8562937f1ac..60022ae0d8f 100644
--- a/mysql-test/r/func_in.result
+++ b/mysql-test/r/func_in.result
@@ -187,7 +187,7 @@ select 1 in ('1.1',2);
select 1 in ('1.1',2.0);
1 in ('1.1',2.0)
0
-create table t1 (a char(20) character set binary);
+create table t1 (a char(2) character set binary);
insert into t1 values ('aa'), ('bb');
select * from t1 where a in (NULL, 'aa');
a
diff --git a/mysql-test/r/ndb_condition_pushdown.result b/mysql-test/r/ndb_condition_pushdown.result
index 1c3da1b486f..3e46a487c07 100644
--- a/mysql-test/r/ndb_condition_pushdown.result
+++ b/mysql-test/r/ndb_condition_pushdown.result
@@ -3,7 +3,7 @@ CREATE TABLE t1 (
auto int(5) unsigned NOT NULL auto_increment,
string char(10),
vstring varchar(10),
-bin binary(7),
+bin binary(2),
vbin varbinary(7),
tiny tinyint(4) DEFAULT '0' NOT NULL ,
short smallint(6) DEFAULT '1' NOT NULL ,
diff --git a/mysql-test/r/ndb_types.result b/mysql-test/r/ndb_types.result
index 37ce7732f65..6938277f01d 100644
--- a/mysql-test/r/ndb_types.result
+++ b/mysql-test/r/ndb_types.result
@@ -3,7 +3,7 @@ CREATE TABLE t1 (
auto int(5) unsigned NOT NULL auto_increment,
string char(10) default "hello",
vstring varchar(10) default "hello",
-bin binary(7),
+bin binary(2),
vbin varbinary(7),
tiny tinyint(4) DEFAULT '0' NOT NULL ,
short smallint(6) DEFAULT '1' NOT NULL ,
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index 1b8cde6d3db..e3e379ac65d 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -1916,7 +1916,7 @@ select bug3788()|
bug3788()
2005-03-04
drop function bug3788|
-create function bug3788() returns binary(5) return 5|
+create function bug3788() returns binary(1) return 5|
select bug3788()|
bug3788()
5
diff --git a/mysql-test/r/system_mysql_db.result b/mysql-test/r/system_mysql_db.result
index f68c4805d72..999f12a0573 100644
--- a/mysql-test/r/system_mysql_db.result
+++ b/mysql-test/r/system_mysql_db.result
@@ -73,7 +73,7 @@ Table Create Table
user CREATE TABLE `user` (
`Host` char(60) collate utf8_bin NOT NULL default '',
`User` char(16) collate utf8_bin NOT NULL default '',
- `Password` binary(41) NOT NULL default '',
+ `Password` char(41) character set latin1 collate latin1_bin NOT NULL default '',
`Select_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
`Insert_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
`Update_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
diff --git a/mysql-test/r/type_binary.result b/mysql-test/r/type_binary.result
new file mode 100644
index 00000000000..49fd7ba5633
--- /dev/null
+++ b/mysql-test/r/type_binary.result
@@ -0,0 +1,113 @@
+create table t1 (s1 binary(3));
+insert into t1 values (0x61), (0x6120), (0x612020);
+select hex(s1) from t1;
+hex(s1)
+610000
+612000
+612020
+drop table t1;
+create table t1 (s1 binary(2), s2 varbinary(2));
+insert into t1 values (0x4100,0x4100);
+select length(concat('*',s1,'*',s2,'*')) from t1;
+length(concat('*',s1,'*',s2,'*'))
+7
+delete from t1;
+insert into t1 values (0x4120,0x4120);
+select length(concat('*',s1,'*',s2,'*')) from t1;
+length(concat('*',s1,'*',s2,'*'))
+7
+drop table t1;
+create table t1 (s1 varbinary(20), s2 varbinary(20));
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `s1` varbinary(20) default NULL,
+ `s2` varbinary(20) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert into t1 values (0x41,0x4100),(0x41,0x4120),(0x4100,0x4120);
+select hex(s1), hex(s2) from t1;
+hex(s1) hex(s2)
+41 4100
+41 4120
+4100 4120
+select count(*) from t1 where s1 < s2;
+count(*)
+3
+drop table t1;
+create table t1 (s1 varbinary(2), s2 varchar(1));
+insert into t1 values (0x41,'a'), (0x4100,'b'), (0x41,'c'), (0x4100,'d');
+select hex(s1),s2 from t1 order by s1,s2;
+hex(s1) s2
+41 a
+41 c
+4100 b
+4100 d
+drop table t1;
+create table t1 (s1 binary(2) primary key);
+insert into t1 values (0x01);
+insert into t1 values (0x0120);
+insert into t1 values (0x0100);
+ERROR 23000: Duplicate entry '' for key 1
+select hex(s1) from t1 order by s1;
+hex(s1)
+0100
+0120
+select hex(s1) from t1 where s1=0x01;
+hex(s1)
+select hex(s1) from t1 where s1=0x0120;
+hex(s1)
+0120
+select hex(s1) from t1 where s1=0x0100;
+hex(s1)
+0100
+select count(distinct s1) from t1;
+count(distinct s1)
+2
+alter table t1 drop primary key;
+select hex(s1) from t1 where s1=0x01;
+hex(s1)
+select hex(s1) from t1 where s1=0x0120;
+hex(s1)
+0120
+select hex(s1) from t1 where s1=0x0100;
+hex(s1)
+0100
+select count(distinct s1) from t1;
+count(distinct s1)
+2
+drop table t1;
+create table t1 (s1 varbinary(2) primary key);
+insert into t1 values (0x01);
+insert into t1 values (0x0120);
+insert into t1 values (0x0100);
+select hex(s1) from t1 order by s1;
+hex(s1)
+01
+0100
+0120
+select hex(s1) from t1 where s1=0x01;
+hex(s1)
+01
+select hex(s1) from t1 where s1=0x0120;
+hex(s1)
+0120
+select hex(s1) from t1 where s1=0x0100;
+hex(s1)
+0100
+select count(distinct s1) from t1;
+count(distinct s1)
+3
+alter table t1 drop primary key;
+select hex(s1) from t1 where s1=0x01;
+hex(s1)
+01
+select hex(s1) from t1 where s1=0x0120;
+hex(s1)
+0120
+select hex(s1) from t1 where s1=0x0100;
+hex(s1)
+0100
+select count(distinct s1) from t1;
+count(distinct s1)
+3
+drop table t1;
diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result
index 193ed298339..fd478c916c9 100644
--- a/mysql-test/r/type_blob.result
+++ b/mysql-test/r/type_blob.result
@@ -67,7 +67,7 @@ select * from t1;
a
Where
drop table t1;
-create table t1 (t text,c char(10),b blob, d binary(10));
+create table t1 (t text,c char(10),b blob, d varbinary(10));
insert into t1 values (NULL,NULL,NULL,NULL);
insert into t1 values ("","","","");
insert into t1 values ("hello","hello","hello","hello");
@@ -83,14 +83,14 @@ Field Type Collation Null Key Default Extra Privileges Comment
t text latin1_swedish_ci YES NULL #
c char(10) latin1_swedish_ci YES NULL #
b blob NULL YES NULL #
-d binary(10) NULL YES NULL #
+d varbinary(10) NULL YES NULL #
lock tables t1 WRITE;
show full fields from t1;
Field Type Collation Null Key Default Extra Privileges Comment
t text latin1_swedish_ci YES NULL #
c char(10) latin1_swedish_ci YES NULL #
b blob NULL YES NULL #
-d binary(10) NULL YES NULL #
+d varbinary(10) NULL YES NULL #
unlock tables;
select t from t1 where t like "hello";
t
diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test
index 5695822be6b..bc3a4b0261d 100644
--- a/mysql-test/t/alter_table.test
+++ b/mysql-test/t/alter_table.test
@@ -278,7 +278,7 @@ insert into t1 values ('ΤΕΣΤ');
select a,hex(a) from t1;
alter table t1 change a a char(10) character set cp1251;
select a,hex(a) from t1;
-alter table t1 change a a binary(10);
+alter table t1 change a a binary(4);
select a,hex(a) from t1;
alter table t1 change a a char(10) character set cp1251;
select a,hex(a) from t1;
diff --git a/mysql-test/t/binary.test b/mysql-test/t/binary.test
index 02773b32302..1ac0cfebb28 100644
--- a/mysql-test/t/binary.test
+++ b/mysql-test/t/binary.test
@@ -56,7 +56,7 @@ drop table t1;
#
# Test of binary and upper/lower
#
-create table t1 (a char(15) binary, b binary(15));
+create table t1 (a char(3) binary, b binary(3));
insert into t1 values ('aaa','bbb'),('AAA','BBB');
select upper(a),upper(b) from t1;
select lower(a),lower(b) from t1;
diff --git a/mysql-test/t/cast.test b/mysql-test/t/cast.test
index 6220b4cbae7..ca16791d9af 100644
--- a/mysql-test/t/cast.test
+++ b/mysql-test/t/cast.test
@@ -101,7 +101,7 @@ drop table t1;
# Bug 2202
# CAST from BINARY to non-BINARY and from non-BINARY to BINARY
#
-create table t1 (a binary(10), b char(10) character set koi8r);
+create table t1 (a binary(4), b char(4) character set koi8r);
insert into t1 values (_binary'ΤΕΣΤ',_binary'ΤΕΣΤ');
select a,b,cast(a as char character set cp1251),cast(b as binary) from t1;
set names koi8r;
diff --git a/mysql-test/t/ctype_cp1251.test b/mysql-test/t/ctype_cp1251.test
index 1aafe7b7266..463a9cea4bc 100644
--- a/mysql-test/t/ctype_cp1251.test
+++ b/mysql-test/t/ctype_cp1251.test
@@ -21,7 +21,7 @@ drop table t1;
#
# Test of binary and upper/lower
#
-create table t1 (a char(15) binary, b binary(15)) character set cp1251;
+create table t1 (a char(3) binary, b binary(3)) character set cp1251;
insert into t1 values ('aaa','bbb'),('AAA','BBB');
select upper(a),upper(b) from t1;
select lower(a),lower(b) from t1;
diff --git a/mysql-test/t/ctype_many.test b/mysql-test/t/ctype_many.test
index 22e844c6868..0903c3dd7fa 100644
--- a/mysql-test/t/ctype_many.test
+++ b/mysql-test/t/ctype_many.test
@@ -148,7 +148,7 @@ SET CHARACTER SET koi8r;
SELECT * FROM t1;
-ALTER TABLE t1 ADD bin_f CHAR(32) BYTE NOT NULL default '';
+ALTER TABLE t1 ADD bin_f CHAR(1) BYTE NOT NULL default '';
UPDATE t1 SET bin_f=koi8_ru_f;
SELECT COUNT(DISTINCT bin_f),COUNT(DISTINCT koi8_ru_f),COUNT(DISTINCT utf8_f) FROM t1;
@@ -204,7 +204,7 @@ UPDATE t1 SET greek_f=CONVERT(ucs2_f USING greek) WHERE comment LIKE _latin2'GRE
UPDATE t1 SET armscii8_f=CONVERT(ucs2_f USING armscii8) WHERE comment LIKE _latin2'ARM%';
UPDATE t1 SET utf8_f=CONVERT(ucs2_f USING utf8) WHERE utf8_f=_utf8'';
UPDATE t1 SET ucs2_f=CONVERT(utf8_f USING ucs2) WHERE ucs2_f=_ucs2'';
-SELECT * FROM t1;
+SELECT comment, koi8_ru_f, utf8_f, hex(bin_f), ucs2_f, armscii8_f, greek_f FROM t1;
SET CHARACTER SET 'binary';
SELECT * FROM t1;
SELECT min(comment),count(*) FROM t1 GROUP BY ucs2_f;
diff --git a/mysql-test/t/federated.test b/mysql-test/t/federated.test
index c401468a940..43679c54caf 100644
--- a/mysql-test/t/federated.test
+++ b/mysql-test/t/federated.test
@@ -348,7 +348,7 @@ DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 (
`id` int NOT NULL auto_increment,
`name` char(32) NOT NULL DEFAULT '',
- `bincol` binary(4) NOT NULL,
+ `bincol` binary(1) NOT NULL,
`floatval` decimal(5,2) NOT NULL DEFAULT 0.0,
`other` int NOT NULL DEFAULT 0,
PRIMARY KEY (id),
@@ -363,7 +363,7 @@ DROP TABLE IF EXISTS federated.t1;
eval CREATE TABLE federated.t1 (
`id` int NOT NULL auto_increment,
`name` char(32) NOT NULL DEFAULT '',
- `bincol` binary(4) NOT NULL,
+ `bincol` binary(1) NOT NULL,
`floatval` decimal(5,2) NOT NULL DEFAULT 0.0,
`other` int NOT NULL DEFAULT 0,
PRIMARY KEY (id),
diff --git a/mysql-test/t/func_in.test b/mysql-test/t/func_in.test
index dd4edd8ca48..0472968f918 100644
--- a/mysql-test/t/func_in.test
+++ b/mysql-test/t/func_in.test
@@ -97,7 +97,7 @@ select 1 in ('1.1',2.0);
# Test case for bug #6365
-create table t1 (a char(20) character set binary);
+create table t1 (a char(2) character set binary);
insert into t1 values ('aa'), ('bb');
select * from t1 where a in (NULL, 'aa');
drop table t1;
diff --git a/mysql-test/t/ndb_condition_pushdown.test b/mysql-test/t/ndb_condition_pushdown.test
index d090d12e81b..9f512430085 100644
--- a/mysql-test/t/ndb_condition_pushdown.test
+++ b/mysql-test/t/ndb_condition_pushdown.test
@@ -12,7 +12,7 @@ CREATE TABLE t1 (
auto int(5) unsigned NOT NULL auto_increment,
string char(10),
vstring varchar(10),
- bin binary(7),
+ bin binary(2),
vbin varbinary(7),
tiny tinyint(4) DEFAULT '0' NOT NULL ,
short smallint(6) DEFAULT '1' NOT NULL ,
diff --git a/mysql-test/t/ndb_types.test b/mysql-test/t/ndb_types.test
index 3446a409b2a..10b8eb87e2c 100644
--- a/mysql-test/t/ndb_types.test
+++ b/mysql-test/t/ndb_types.test
@@ -12,7 +12,7 @@ CREATE TABLE t1 (
auto int(5) unsigned NOT NULL auto_increment,
string char(10) default "hello",
vstring varchar(10) default "hello",
- bin binary(7),
+ bin binary(2),
vbin varbinary(7),
tiny tinyint(4) DEFAULT '0' NOT NULL ,
short smallint(6) DEFAULT '1' NOT NULL ,
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test
index e16e7456056..1f4d5b6bad5 100644
--- a/mysql-test/t/sp.test
+++ b/mysql-test/t/sp.test
@@ -2431,7 +2431,7 @@ create function bug3788() returns date return cast("2005-03-04" as date)|
select bug3788()|
drop function bug3788|
-create function bug3788() returns binary(5) return 5|
+create function bug3788() returns binary(1) return 5|
select bug3788()|
drop function bug3788|
diff --git a/mysql-test/t/type_binary.test b/mysql-test/t/type_binary.test
new file mode 100644
index 00000000000..b5928cb14c4
--- /dev/null
+++ b/mysql-test/t/type_binary.test
@@ -0,0 +1,67 @@
+# check 0x00 padding
+create table t1 (s1 binary(3));
+insert into t1 values (0x61), (0x6120), (0x612020);
+select hex(s1) from t1;
+drop table t1;
+
+# check that 0x00 is not stripped in val_str
+create table t1 (s1 binary(2), s2 varbinary(2));
+insert into t1 values (0x4100,0x4100);
+select length(concat('*',s1,'*',s2,'*')) from t1;
+delete from t1;
+insert into t1 values (0x4120,0x4120);
+select length(concat('*',s1,'*',s2,'*')) from t1;
+drop table t1;
+
+# check that trailing 0x00 and 0x20 do matter on comparison
+create table t1 (s1 varbinary(20), s2 varbinary(20));
+show create table t1;
+insert into t1 values (0x41,0x4100),(0x41,0x4120),(0x4100,0x4120);
+select hex(s1), hex(s2) from t1;
+select count(*) from t1 where s1 < s2;
+drop table t1;
+
+# check that trailing 0x00 do matter on filesort
+create table t1 (s1 varbinary(2), s2 varchar(1));
+insert into t1 values (0x41,'a'), (0x4100,'b'), (0x41,'c'), (0x4100,'d');
+select hex(s1),s2 from t1 order by s1,s2;
+drop table t1;
+
+# check that 0x01 is padded to 0x0100 and thus we get a duplicate value
+create table t1 (s1 binary(2) primary key);
+insert into t1 values (0x01);
+insert into t1 values (0x0120);
+--error 1062
+insert into t1 values (0x0100);
+select hex(s1) from t1 order by s1;
+# check index search
+select hex(s1) from t1 where s1=0x01;
+select hex(s1) from t1 where s1=0x0120;
+select hex(s1) from t1 where s1=0x0100;
+select count(distinct s1) from t1;
+alter table t1 drop primary key;
+# check non-indexed search
+select hex(s1) from t1 where s1=0x01;
+select hex(s1) from t1 where s1=0x0120;
+select hex(s1) from t1 where s1=0x0100;
+select count(distinct s1) from t1;
+drop table t1;
+
+# check that 0x01 is not padded, and all three values are unique
+create table t1 (s1 varbinary(2) primary key);
+insert into t1 values (0x01);
+insert into t1 values (0x0120);
+insert into t1 values (0x0100);
+select hex(s1) from t1 order by s1;
+# check index search
+select hex(s1) from t1 where s1=0x01;
+select hex(s1) from t1 where s1=0x0120;
+select hex(s1) from t1 where s1=0x0100;
+select count(distinct s1) from t1;
+alter table t1 drop primary key;
+# check non-indexed search
+select hex(s1) from t1 where s1=0x01;
+select hex(s1) from t1 where s1=0x0120;
+select hex(s1) from t1 where s1=0x0100;
+select count(distinct s1) from t1;
+drop table t1;
diff --git a/mysql-test/t/type_blob.test b/mysql-test/t/type_blob.test
index 1ec5c600296..4f3c02b0465 100644
--- a/mysql-test/t/type_blob.test
+++ b/mysql-test/t/type_blob.test
@@ -67,9 +67,9 @@ select * from t1;
drop table t1;
#
-# test of blob, text, char and char binary
+# test of blob, text, char and varbinary
#
-create table t1 (t text,c char(10),b blob, d binary(10));
+create table t1 (t text,c char(10),b blob, d varbinary(10));
insert into t1 values (NULL,NULL,NULL,NULL);
insert into t1 values ("","","","");
insert into t1 values ("hello","hello","hello","hello");
diff --git a/scripts/mysql_create_system_tables.sh b/scripts/mysql_create_system_tables.sh
index babf3a1c83f..54f0ef230ad 100644
--- a/scripts/mysql_create_system_tables.sh
+++ b/scripts/mysql_create_system_tables.sh
@@ -123,7 +123,7 @@ then
c_u="$c_u CREATE TABLE user ("
c_u="$c_u Host char(60) binary DEFAULT '' NOT NULL,"
c_u="$c_u User char(16) binary DEFAULT '' NOT NULL,"
- c_u="$c_u Password binary(41) DEFAULT '' NOT NULL,"
+ c_u="$c_u Password char(41) character set latin1 collate latin1_bin DEFAULT '' NOT NULL,"
c_u="$c_u Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
c_u="$c_u Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
c_u="$c_u Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
diff --git a/scripts/mysql_fix_privilege_tables.sql b/scripts/mysql_fix_privilege_tables.sql
index 7dba854e313..d1b0c35266e 100644
--- a/scripts/mysql_fix_privilege_tables.sql
+++ b/scripts/mysql_fix_privilege_tables.sql
@@ -158,7 +158,7 @@ ALTER TABLE user
MODIFY User char(16) NOT NULL default '',
ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
ALTER TABLE user
- MODIFY Password binary(41) NOT NULL default '',
+ MODIFY Password char(41) character set latin1 collate latin1_bin NOT NULL default '',
MODIFY Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
MODIFY Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
MODIFY Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
diff --git a/sql/field.cc b/sql/field.cc
index eeff2ec9881..7e3cd004dc2 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -5881,7 +5881,8 @@ int Field_string::store(const char *from,uint length,CHARSET_INFO *cs)
memcpy(ptr,from,copy_length);
if (copy_length < field_length) // Append spaces if shorter
field_charset->cset->fill(field_charset,ptr+copy_length,
- field_length-copy_length,' ');
+ field_length-copy_length,
+ field_charset->pad_char);
if ((copy_length < length) && table->in_use->count_cuted_fields)
{ // Check if we loosed some info
diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c
index 8b50388e4ef..4455025d7a5 100644
--- a/strings/ctype-big5.c
+++ b/strings/ctype-big5.c
@@ -6398,6 +6398,7 @@ CHARSET_INFO my_charset_big5_chinese_ci=
2, /* mbmaxlen */
0, /* min_sort_char */
255, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_big5_handler,
&my_collation_big5_chinese_ci_handler
@@ -6430,6 +6431,7 @@ CHARSET_INFO my_charset_big5_bin=
2, /* mbmaxlen */
0, /* min_sort_char */
255, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_big5_handler,
&my_collation_mb_bin_handler
diff --git a/strings/ctype-bin.c b/strings/ctype-bin.c
index 0fcd9021c4b..a931c6412b3 100644
--- a/strings/ctype-bin.c
+++ b/strings/ctype-bin.c
@@ -86,6 +86,14 @@ static int my_strnncoll_binary(CHARSET_INFO * cs __attribute__((unused)),
}
+uint my_lengthsp_binary(CHARSET_INFO *cs __attribute__((unused)),
+ const char *ptr __attribute__((unused)),
+ uint length)
+{
+ return length;
+}
+
+
/*
Compare two strings. Result is sign(first_argument - second_argument)
@@ -365,14 +373,29 @@ static int my_wildcmp_bin(CHARSET_INFO *cs,
}
+uint my_strnxfrmlen_bin(CHARSET_INFO *cs __attribute__((unused)), uint len)
+{
+ return len + 2;
+}
+
+
static int my_strnxfrm_bin(CHARSET_INFO *cs __attribute__((unused)),
uchar * dest, uint dstlen,
const uchar *src, uint srclen)
{
if (dest != src)
memcpy(dest, src, min(dstlen,srclen));
- if (dstlen > srclen)
+
+ if (dstlen >= srclen + 2)
+ {
+ if (dstlen > srclen + 2)
+ bfill(dest + srclen, dstlen - srclen - 2, 0);
+ dest[dstlen-2]= srclen >> 8;
+ dest[dstlen-1]= srclen & 0xFF;
+ }
+ else if (dstlen > srclen)
bfill(dest + srclen, dstlen - srclen, 0);
+
return dstlen;
}
@@ -473,7 +496,7 @@ static MY_COLLATION_HANDLER my_collation_binary_handler =
my_strnncoll_binary,
my_strnncollsp_binary,
my_strnxfrm_bin,
- my_strnxfrmlen_simple,
+ my_strnxfrmlen_bin,
my_like_range_simple,
my_wildcmp_bin,
my_strcasecmp_bin,
@@ -491,7 +514,7 @@ static MY_CHARSET_HANDLER my_charset_handler=
my_numchars_8bit,
my_charpos_8bit,
my_well_formed_len_8bit,
- my_lengthsp_8bit,
+ my_lengthsp_binary,
my_numcells_8bit,
my_mb_wc_bin,
my_wc_mb_bin,
@@ -516,7 +539,7 @@ static MY_CHARSET_HANDLER my_charset_handler=
CHARSET_INFO my_charset_bin =
{
63,0,0, /* number */
- MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_PRIMARY,/* state */
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_PRIMARY|MY_CS_STRNXFRM,/* state */
"binary", /* cs name */
"binary", /* name */
"", /* comment */
@@ -539,6 +562,7 @@ CHARSET_INFO my_charset_bin =
1, /* mbmaxlen */
0, /* min_sort_char */
255, /* max_sort_char */
+ 0, /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_handler,
&my_collation_binary_handler
diff --git a/strings/ctype-cp932.c b/strings/ctype-cp932.c
index b5f36c030bd..9f75757379d 100644
--- a/strings/ctype-cp932.c
+++ b/strings/ctype-cp932.c
@@ -5522,6 +5522,7 @@ CHARSET_INFO my_charset_cp932_japanese_ci=
2, /* mbmaxlen */
0, /* min_sort_char */
255, /* max_sort_char */
+ ' ', /* pad char */
1, /* escape_with_backslash_is_dangerous */
&my_charset_handler,
&my_collation_ci_handler
@@ -5553,6 +5554,7 @@ CHARSET_INFO my_charset_cp932_bin=
2, /* mbmaxlen */
0, /* min_sort_char */
255, /* max_sort_char */
+ ' ', /* pad char */
1, /* escape_with_backslash_is_dangerous */
&my_charset_handler,
&my_collation_mb_bin_handler
diff --git a/strings/ctype-czech.c b/strings/ctype-czech.c
index bdafc5c94b6..fa3a3bf53fe 100644
--- a/strings/ctype-czech.c
+++ b/strings/ctype-czech.c
@@ -628,6 +628,7 @@ CHARSET_INFO my_charset_latin2_czech_ci =
1, /* mbmaxlen */
0, /* min_sort_char */
0, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_8bit_handler,
&my_collation_latin2_czech_ci_handler
diff --git a/strings/ctype-euc_kr.c b/strings/ctype-euc_kr.c
index b529bbb0308..97fea517c1b 100644
--- a/strings/ctype-euc_kr.c
+++ b/strings/ctype-euc_kr.c
@@ -8706,6 +8706,7 @@ CHARSET_INFO my_charset_euckr_korean_ci=
2, /* mbmaxlen */
0, /* min_sort_char */
255, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_handler,
&my_collation_ci_handler
@@ -8738,6 +8739,7 @@ CHARSET_INFO my_charset_euckr_bin=
2, /* mbmaxlen */
0, /* min_sort_char */
255, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_handler,
&my_collation_mb_bin_handler
diff --git a/strings/ctype-eucjpms.c b/strings/ctype-eucjpms.c
index ccdca2ba595..f9210fcb10e 100644
--- a/strings/ctype-eucjpms.c
+++ b/strings/ctype-eucjpms.c
@@ -8708,6 +8708,7 @@ CHARSET_INFO my_charset_eucjpms_japanese_ci=
3, /* mbmaxlen */
0, /* min_sort_char */
255, /* max_sort_char */
+ ' ', /* pad_char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_handler,
&my_collation_ci_handler
@@ -8740,6 +8741,7 @@ CHARSET_INFO my_charset_eucjpms_bin=
3, /* mbmaxlen */
0, /* min_sort_char */
255, /* max_sort_char */
+ ' ', /* pad_char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_handler,
&my_collation_mb_bin_handler
diff --git a/strings/ctype-extra.c b/strings/ctype-extra.c
index e9a9598abdf..9fa4873c5d3 100644
--- a/strings/ctype-extra.c
+++ b/strings/ctype-extra.c
@@ -43,6 +43,7 @@ CHARSET_INFO compiled_charsets[] = {
0, /* mbmaxlen */
0, /* min_sort_ord */
0, /* max_sort_ord */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
NULL, /* cset handler */
NULL /* coll handler */
diff --git a/strings/ctype-gb2312.c b/strings/ctype-gb2312.c
index 3d9a17205cd..f5d9b2627cd 100644
--- a/strings/ctype-gb2312.c
+++ b/strings/ctype-gb2312.c
@@ -5757,6 +5757,7 @@ CHARSET_INFO my_charset_gb2312_chinese_ci=
2, /* mbmaxlen */
0, /* min_sort_char */
255, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_handler,
&my_collation_ci_handler
@@ -5788,6 +5789,7 @@ CHARSET_INFO my_charset_gb2312_bin=
2, /* mbmaxlen */
0, /* min_sort_char */
255, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_handler,
&my_collation_mb_bin_handler
diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c
index e3a76359eaa..edc595875d7 100644
--- a/strings/ctype-gbk.c
+++ b/strings/ctype-gbk.c
@@ -10045,6 +10045,7 @@ CHARSET_INFO my_charset_gbk_chinese_ci=
2, /* mbmaxlen */
0, /* min_sort_char */
255, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_handler,
&my_collation_ci_handler
@@ -10076,6 +10077,7 @@ CHARSET_INFO my_charset_gbk_bin=
2, /* mbmaxlen */
0, /* min_sort_char */
255, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_handler,
&my_collation_mb_bin_handler
diff --git a/strings/ctype-latin1.c b/strings/ctype-latin1.c
index 9075710610b..1e442d7a26c 100644
--- a/strings/ctype-latin1.c
+++ b/strings/ctype-latin1.c
@@ -441,6 +441,7 @@ CHARSET_INFO my_charset_latin1=
1, /* mbmaxlen */
0, /* min_sort_char */
255, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_handler,
&my_collation_8bit_simple_ci_handler
@@ -740,6 +741,7 @@ CHARSET_INFO my_charset_latin1_german2_ci=
1, /* mbmaxlen */
0, /* min_sort_char */
247, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_handler,
&my_collation_german2_ci_handler
@@ -772,6 +774,7 @@ CHARSET_INFO my_charset_latin1_bin=
1, /* mbmaxlen */
0, /* min_sort_char */
255, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_handler,
&my_collation_8bit_bin_handler
diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c
index d25b9e4d9cf..f6ac740730b 100644
--- a/strings/ctype-simple.c
+++ b/strings/ctype-simple.c
@@ -1316,6 +1316,7 @@ static my_bool my_cset_init_8bit(CHARSET_INFO *cs, void *(*alloc)(uint))
{
cs->caseup_multiply= 1;
cs->casedn_multiply= 1;
+ cs->pad_char= ' ';
return create_fromuni(cs, alloc);
}
diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c
index 2ed21a40edd..398aea08b05 100644
--- a/strings/ctype-sjis.c
+++ b/strings/ctype-sjis.c
@@ -4693,6 +4693,7 @@ CHARSET_INFO my_charset_sjis_japanese_ci=
2, /* mbmaxlen */
0, /* min_sort_char */
255, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_handler,
&my_collation_ci_handler
@@ -4724,6 +4725,7 @@ CHARSET_INFO my_charset_sjis_bin=
2, /* mbmaxlen */
0, /* min_sort_char */
255, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_handler,
&my_collation_mb_bin_handler
diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c
index 762f6d2dfb6..5a5f034b8da 100644
--- a/strings/ctype-tis620.c
+++ b/strings/ctype-tis620.c
@@ -922,6 +922,7 @@ CHARSET_INFO my_charset_tis620_thai_ci=
1, /* mbmaxlen */
0, /* min_sort_char */
255, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_handler,
&my_collation_ci_handler
@@ -953,6 +954,7 @@ CHARSET_INFO my_charset_tis620_bin=
1, /* mbmaxlen */
0, /* min_sort_char */
255, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_handler,
&my_collation_8bit_bin_handler
diff --git a/strings/ctype-uca.c b/strings/ctype-uca.c
index a280ed59352..4768e42a0b0 100644
--- a/strings/ctype-uca.c
+++ b/strings/ctype-uca.c
@@ -7954,6 +7954,7 @@ static my_bool create_tailoring(CHARSET_INFO *cs, void *(*alloc)(uint))
static my_bool my_coll_init_uca(CHARSET_INFO *cs, void *(*alloc)(uint))
{
+ cs->pad_char= ' ';
return create_tailoring(cs, alloc);
}
@@ -8071,6 +8072,7 @@ CHARSET_INFO my_charset_ucs2_general_uca=
2, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_ucs2_handler,
&my_collation_ucs2_uca_handler
@@ -8102,6 +8104,7 @@ CHARSET_INFO my_charset_ucs2_icelandic_uca_ci=
2, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_ucs2_handler,
&my_collation_ucs2_uca_handler
@@ -8133,6 +8136,7 @@ CHARSET_INFO my_charset_ucs2_latvian_uca_ci=
2, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_ucs2_handler,
&my_collation_ucs2_uca_handler
@@ -8164,6 +8168,7 @@ CHARSET_INFO my_charset_ucs2_romanian_uca_ci=
2, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_ucs2_handler,
&my_collation_ucs2_uca_handler
@@ -8195,6 +8200,7 @@ CHARSET_INFO my_charset_ucs2_slovenian_uca_ci=
2, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_ucs2_handler,
&my_collation_ucs2_uca_handler
@@ -8226,6 +8232,7 @@ CHARSET_INFO my_charset_ucs2_polish_uca_ci=
2, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_ucs2_handler,
&my_collation_ucs2_uca_handler
@@ -8257,6 +8264,7 @@ CHARSET_INFO my_charset_ucs2_estonian_uca_ci=
2, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_ucs2_handler,
&my_collation_ucs2_uca_handler
@@ -8288,6 +8296,7 @@ CHARSET_INFO my_charset_ucs2_spanish_uca_ci=
2, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_ucs2_handler,
&my_collation_ucs2_uca_handler
@@ -8319,6 +8328,7 @@ CHARSET_INFO my_charset_ucs2_swedish_uca_ci=
2, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_ucs2_handler,
&my_collation_ucs2_uca_handler
@@ -8350,6 +8360,7 @@ CHARSET_INFO my_charset_ucs2_turkish_uca_ci=
2, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_ucs2_handler,
&my_collation_ucs2_uca_handler
@@ -8381,6 +8392,7 @@ CHARSET_INFO my_charset_ucs2_czech_uca_ci=
2, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_ucs2_handler,
&my_collation_ucs2_uca_handler
@@ -8413,6 +8425,7 @@ CHARSET_INFO my_charset_ucs2_danish_uca_ci=
2, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_ucs2_handler,
&my_collation_ucs2_uca_handler
@@ -8444,6 +8457,7 @@ CHARSET_INFO my_charset_ucs2_lithuanian_uca_ci=
2, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_ucs2_handler,
&my_collation_ucs2_uca_handler
@@ -8475,6 +8489,7 @@ CHARSET_INFO my_charset_ucs2_slovak_uca_ci=
2, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_ucs2_handler,
&my_collation_ucs2_uca_handler
@@ -8506,6 +8521,7 @@ CHARSET_INFO my_charset_ucs2_spanish2_uca_ci=
2, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_ucs2_handler,
&my_collation_ucs2_uca_handler
@@ -8538,6 +8554,7 @@ CHARSET_INFO my_charset_ucs2_roman_uca_ci=
2, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_ucs2_handler,
&my_collation_ucs2_uca_handler
@@ -8570,6 +8587,7 @@ CHARSET_INFO my_charset_ucs2_persian_uca_ci=
2, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_ucs2_handler,
&my_collation_ucs2_uca_handler
@@ -8602,6 +8620,7 @@ CHARSET_INFO my_charset_ucs2_esperanto_uca_ci=
2, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_ucs2_handler,
&my_collation_ucs2_uca_handler
@@ -8681,6 +8700,7 @@ CHARSET_INFO my_charset_utf8_general_uca_ci=
3, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_utf8_handler,
&my_collation_any_uca_handler
@@ -8713,6 +8733,7 @@ CHARSET_INFO my_charset_utf8_icelandic_uca_ci=
3, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_utf8_handler,
&my_collation_any_uca_handler
@@ -8744,6 +8765,7 @@ CHARSET_INFO my_charset_utf8_latvian_uca_ci=
3, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_utf8_handler,
&my_collation_any_uca_handler
@@ -8775,6 +8797,7 @@ CHARSET_INFO my_charset_utf8_romanian_uca_ci=
3, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_utf8_handler,
&my_collation_any_uca_handler
@@ -8806,6 +8829,7 @@ CHARSET_INFO my_charset_utf8_slovenian_uca_ci=
3, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_utf8_handler,
&my_collation_any_uca_handler
@@ -8837,6 +8861,7 @@ CHARSET_INFO my_charset_utf8_polish_uca_ci=
3, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_utf8_handler,
&my_collation_any_uca_handler
@@ -8868,6 +8893,7 @@ CHARSET_INFO my_charset_utf8_estonian_uca_ci=
3, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_utf8_handler,
&my_collation_any_uca_handler
@@ -8899,6 +8925,7 @@ CHARSET_INFO my_charset_utf8_spanish_uca_ci=
3, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_utf8_handler,
&my_collation_any_uca_handler
@@ -8930,6 +8957,7 @@ CHARSET_INFO my_charset_utf8_swedish_uca_ci=
3, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_utf8_handler,
&my_collation_any_uca_handler
@@ -8961,6 +8989,7 @@ CHARSET_INFO my_charset_utf8_turkish_uca_ci=
3, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_utf8_handler,
&my_collation_any_uca_handler
@@ -8992,6 +9021,7 @@ CHARSET_INFO my_charset_utf8_czech_uca_ci=
3, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_utf8_handler,
&my_collation_any_uca_handler
@@ -9024,6 +9054,7 @@ CHARSET_INFO my_charset_utf8_danish_uca_ci=
3, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_utf8_handler,
&my_collation_any_uca_handler
@@ -9055,6 +9086,7 @@ CHARSET_INFO my_charset_utf8_lithuanian_uca_ci=
3, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_utf8_handler,
&my_collation_any_uca_handler
@@ -9086,6 +9118,7 @@ CHARSET_INFO my_charset_utf8_slovak_uca_ci=
3, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_utf8_handler,
&my_collation_any_uca_handler
@@ -9117,6 +9150,7 @@ CHARSET_INFO my_charset_utf8_spanish2_uca_ci=
3, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_utf8_handler,
&my_collation_any_uca_handler
@@ -9148,6 +9182,7 @@ CHARSET_INFO my_charset_utf8_roman_uca_ci=
3, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_utf8_handler,
&my_collation_any_uca_handler
@@ -9179,6 +9214,7 @@ CHARSET_INFO my_charset_utf8_persian_uca_ci=
3, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_utf8_handler,
&my_collation_any_uca_handler
@@ -9210,6 +9246,7 @@ CHARSET_INFO my_charset_utf8_esperanto_uca_ci=
3, /* mbmaxlen */
9, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_utf8_handler,
&my_collation_any_uca_handler
diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c
index c389f2e7f75..b0d882d3943 100644
--- a/strings/ctype-ucs2.c
+++ b/strings/ctype-ucs2.c
@@ -1623,6 +1623,7 @@ CHARSET_INFO my_charset_ucs2_general_ci=
2, /* mbmaxlen */
0, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_ucs2_handler,
&my_collation_ucs2_general_ci_handler
@@ -1654,6 +1655,7 @@ CHARSET_INFO my_charset_ucs2_bin=
2, /* mbmaxlen */
0, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_ucs2_handler,
&my_collation_ucs2_bin_handler
diff --git a/strings/ctype-ujis.c b/strings/ctype-ujis.c
index 57ca2de2852..696eecaa794 100644
--- a/strings/ctype-ujis.c
+++ b/strings/ctype-ujis.c
@@ -8576,6 +8576,7 @@ CHARSET_INFO my_charset_ujis_japanese_ci=
3, /* mbmaxlen */
0, /* min_sort_char */
255, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_handler,
&my_collation_ci_handler
@@ -8608,6 +8609,7 @@ CHARSET_INFO my_charset_ujis_bin=
3, /* mbmaxlen */
0, /* min_sort_char */
255, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_handler,
&my_collation_mb_bin_handler
diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c
index 88b6b7d5c86..e1bb746fd9a 100644
--- a/strings/ctype-utf8.c
+++ b/strings/ctype-utf8.c
@@ -2579,6 +2579,7 @@ CHARSET_INFO my_charset_utf8_general_ci=
3, /* mbmaxlen */
0, /* min_sort_char */
0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_utf8_handler,
&my_collation_ci_handler
@@ -2611,6 +2612,7 @@ CHARSET_INFO my_charset_utf8_bin=
3, /* mbmaxlen */
0, /* min_sort_char */
255, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_utf8_handler,
&my_collation_mb_bin_handler
@@ -2781,6 +2783,7 @@ CHARSET_INFO my_charset_utf8_general_cs=
3, /* mbmaxlen */
0, /* min_sort_char */
255, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_utf8_handler,
&my_collation_cs_handler
diff --git a/strings/ctype-win1250ch.c b/strings/ctype-win1250ch.c
index c6b396658d4..16b8ce5aac4 100644
--- a/strings/ctype-win1250ch.c
+++ b/strings/ctype-win1250ch.c
@@ -662,6 +662,7 @@ CHARSET_INFO my_charset_cp1250_czech_ci =
1, /* mbmaxlen */
0, /* min_sort_char */
0, /* max_sort_char */
+ ' ', /* pad char */
0, /* escape_with_backslash_is_dangerous */
&my_charset_8bit_handler,
&my_collation_czech_ci_handler