List:Commits« Previous MessageNext Message »
From:Alexander Barkov Date:November 26 2010 1:31pm
Subject:bzr commit into mysql-trunk-bugfixing branch (bar:3398) Bug#57737
View as plain text  
#At file:///home/bar/mysql-bzr/mysql-trunk-bugfixing/ based on revid:bar@stripped

 3398 Alexander Barkov	2010-11-26
      Bug#57737 Character sets: search fails with like, contraction, index
      Additional 5.6 specific patch.
      - fixing problem with ctype_utf16_uca.test:
        splitting functions my_fill_mb2 into two separate
        functions, for ucs2 and for utf16.
      - adding tests for collations added in 5.6: xxx_unicode_520_ci

    modified:
      mysql-test/r/ctype_like_range.result
      mysql-test/t/ctype_like_range.test
      strings/ctype-ucs2.c
=== modified file 'mysql-test/r/ctype_like_range.result'
--- a/mysql-test/r/ctype_like_range.result	2010-11-26 10:44:39 +0000
+++ b/mysql-test/r/ctype_like_range.result	2010-11-26 13:29:18 +0000
@@ -12,6 +12,7 @@ INSERT INTO t1 (a) VALUES ('aaa'),('ccc'
 INSERT INTO t1 (a) VALUES ('aaa_'),('ccc_'),('cch_');
 INSERT INTO t1 (a) VALUES ('aaa%'),('ccc%'),('cch%');
 INSERT INTO t1 (a) VALUES ('aaaaaaaaaaaaaaaaaaaa');
+INSERT INTO t1 (a) VALUES ('caaaaaaaaaaaaaaaaaaa');
 CREATE VIEW v1 AS
 SELECT id, 'a' AS name, a AS val FROM t1
 UNION
@@ -147,6 +148,10 @@ id	name	val
 31	mn	61616161616161616161616161616161
 31	mx	61616161616161616161616161616161
 31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	63616161616161616161616161616161
+32	mx	63616161616161616161616161616161
+32	sp	--------------------------------
 ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET latin1;
 SELECT * FROM v1;
 id	name	val
@@ -274,6 +279,10 @@ id	name	val
 31	mn	61616161616161616161616161616161
 31	mx	61616161616161616161616161616161
 31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	63616161616161616161616161616161
+32	mx	63616161616161616161616161616161
+32	sp	--------------------------------
 ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8;
 SELECT * FROM v1;
 id	name	val
@@ -401,6 +410,10 @@ id	name	val
 31	mn	6161616161
 31	mx	6161616161
 31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	6361616161
+32	mx	6361616161
+32	sp	--------------------------------
 ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
 SELECT * FROM v1;
 id	name	val
@@ -528,6 +541,10 @@ id	name	val
 31	mn	6161616161
 31	mx	6161616161
 31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	6361616161
+32	mx	6361616161
+32	sp	--------------------------------
 ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_czech_ci;
 SELECT * FROM v1;
 id	name	val
@@ -655,6 +672,10 @@ id	name	val
 31	mn	6161616161
 31	mx	6161616161
 31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	6361616161
+32	mx	6361616161
+32	sp	--------------------------------
 ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_danish_ci;
 SELECT * FROM v1;
 id	name	val
@@ -782,6 +803,665 @@ id	name	val
 31	mn	61616161090909090909090909090909
 31	mx	61616161EFBFBFEFBFBFEFBFBFEFBFBF
 31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	6361616161
+32	mx	6361616161
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8mb4;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	00000000000000000000000000000000
+2	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+2	sp	--------------------------------
+3	a	%
+3	mn	00000000000000000000000000000000
+3	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+3	sp	--------------------------------
+4	a	\_
+4	mn	5F
+4	mx	5F
+4	sp	--------------------------------
+5	a	\%
+5	mn	25
+5	mx	25
+5	sp	--------------------------------
+6	a	\
+6	mn	5C
+6	mx	5C
+6	sp	--------------------------------
+7	a	a
+7	mn	61
+7	mx	61
+7	sp	--------------------------------
+8	a	c
+8	mn	63
+8	mx	63
+8	sp	--------------------------------
+9	a	a_
+9	mn	61000000000000000000000000000000
+9	mx	61EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+9	sp	--------------------------------
+10	a	c_
+10	mn	63000000000000000000000000000000
+10	mx	63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+10	sp	--------------------------------
+11	a	a%
+11	mn	61000000000000000000000000000000
+11	mx	61EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+11	sp	--------------------------------
+12	a	c%
+12	mn	63000000000000000000000000000000
+12	mx	63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+12	sp	--------------------------------
+13	a	aa
+13	mn	6161
+13	mx	6161
+13	sp	--------------------------------
+14	a	cc
+14	mn	6363
+14	mx	6363
+14	sp	--------------------------------
+15	a	ch
+15	mn	6368
+15	mx	6368
+15	sp	--------------------------------
+16	a	aa_
+16	mn	61610000000000000000000000000000
+16	mx	6161EFBFBFEFBFBFEFBFBFEFBFBF2020
+16	sp	--------------------------------
+17	a	cc_
+17	mn	63630000000000000000000000000000
+17	mx	6363EFBFBFEFBFBFEFBFBFEFBFBF2020
+17	sp	--------------------------------
+18	a	ch_
+18	mn	63680000000000000000000000000000
+18	mx	6368EFBFBFEFBFBFEFBFBFEFBFBF2020
+18	sp	--------------------------------
+19	a	aa%
+19	mn	61610000000000000000000000000000
+19	mx	6161EFBFBFEFBFBFEFBFBFEFBFBF2020
+19	sp	--------------------------------
+20	a	cc%
+20	mn	63630000000000000000000000000000
+20	mx	6363EFBFBFEFBFBFEFBFBFEFBFBF2020
+20	sp	--------------------------------
+21	a	ch%
+21	mn	63680000000000000000000000000000
+21	mx	6368EFBFBFEFBFBFEFBFBFEFBFBF2020
+21	sp	--------------------------------
+22	a	aaa
+22	mn	616161
+22	mx	616161
+22	sp	--------------------------------
+23	a	ccc
+23	mn	636363
+23	mx	636363
+23	sp	--------------------------------
+24	a	cch
+24	mn	636368
+24	mx	636368
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	61616100000000000000000000000000
+25	mx	616161EFBFBFEFBFBFEFBFBFEFBFBF20
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	63636300000000000000000000000000
+26	mx	636363EFBFBFEFBFBFEFBFBFEFBFBF20
+26	sp	--------------------------------
+27	a	cch_
+27	mn	63636800000000000000000000000000
+27	mx	636368EFBFBFEFBFBFEFBFBFEFBFBF20
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	61616100000000000000000000000000
+28	mx	616161EFBFBFEFBFBFEFBFBFEFBFBF20
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	63636300000000000000000000000000
+29	mx	636363EFBFBFEFBFBFEFBFBFEFBFBF20
+29	sp	--------------------------------
+30	a	cch%
+30	mn	63636800000000000000000000000000
+30	mx	636368EFBFBFEFBFBFEFBFBFEFBFBF20
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	61616161
+31	mx	61616161
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	63616161
+32	mx	63616161
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	09090909090909090909090909090909
+2	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+2	sp	--------------------------------
+3	a	%
+3	mn	09090909090909090909090909090909
+3	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+3	sp	--------------------------------
+4	a	\_
+4	mn	5F
+4	mx	5F
+4	sp	--------------------------------
+5	a	\%
+5	mn	25
+5	mx	25
+5	sp	--------------------------------
+6	a	\
+6	mn	5C
+6	mx	5C
+6	sp	--------------------------------
+7	a	a
+7	mn	61
+7	mx	61
+7	sp	--------------------------------
+8	a	c
+8	mn	63
+8	mx	63
+8	sp	--------------------------------
+9	a	a_
+9	mn	61090909090909090909090909090909
+9	mx	61EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+9	sp	--------------------------------
+10	a	c_
+10	mn	63090909090909090909090909090909
+10	mx	63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+10	sp	--------------------------------
+11	a	a%
+11	mn	61090909090909090909090909090909
+11	mx	61EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+11	sp	--------------------------------
+12	a	c%
+12	mn	63090909090909090909090909090909
+12	mx	63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+12	sp	--------------------------------
+13	a	aa
+13	mn	6161
+13	mx	6161
+13	sp	--------------------------------
+14	a	cc
+14	mn	6363
+14	mx	6363
+14	sp	--------------------------------
+15	a	ch
+15	mn	6368
+15	mx	6368
+15	sp	--------------------------------
+16	a	aa_
+16	mn	61610909090909090909090909090909
+16	mx	6161EFBFBFEFBFBFEFBFBFEFBFBF2020
+16	sp	--------------------------------
+17	a	cc_
+17	mn	63630909090909090909090909090909
+17	mx	6363EFBFBFEFBFBFEFBFBFEFBFBF2020
+17	sp	--------------------------------
+18	a	ch_
+18	mn	63680909090909090909090909090909
+18	mx	6368EFBFBFEFBFBFEFBFBFEFBFBF2020
+18	sp	--------------------------------
+19	a	aa%
+19	mn	61610909090909090909090909090909
+19	mx	6161EFBFBFEFBFBFEFBFBFEFBFBF2020
+19	sp	--------------------------------
+20	a	cc%
+20	mn	63630909090909090909090909090909
+20	mx	6363EFBFBFEFBFBFEFBFBFEFBFBF2020
+20	sp	--------------------------------
+21	a	ch%
+21	mn	63680909090909090909090909090909
+21	mx	6368EFBFBFEFBFBFEFBFBFEFBFBF2020
+21	sp	--------------------------------
+22	a	aaa
+22	mn	616161
+22	mx	616161
+22	sp	--------------------------------
+23	a	ccc
+23	mn	636363
+23	mx	636363
+23	sp	--------------------------------
+24	a	cch
+24	mn	636368
+24	mx	636368
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	61616109090909090909090909090909
+25	mx	616161EFBFBFEFBFBFEFBFBFEFBFBF20
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	63636309090909090909090909090909
+26	mx	636363EFBFBFEFBFBFEFBFBFEFBFBF20
+26	sp	--------------------------------
+27	a	cch_
+27	mn	63636809090909090909090909090909
+27	mx	636368EFBFBFEFBFBFEFBFBFEFBFBF20
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	61616109090909090909090909090909
+28	mx	616161EFBFBFEFBFBFEFBFBFEFBFBF20
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	63636309090909090909090909090909
+29	mx	636363EFBFBFEFBFBFEFBFBFEFBFBF20
+29	sp	--------------------------------
+30	a	cch%
+30	mn	63636809090909090909090909090909
+30	mx	636368EFBFBFEFBFBFEFBFBFEFBFBF20
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	61616161
+31	mx	61616161
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	63616161
+32	mx	63616161
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_czech_ci;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	09090909090909090909090909090909
+2	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+2	sp	--------------------------------
+3	a	%
+3	mn	09090909090909090909090909090909
+3	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+3	sp	--------------------------------
+4	a	\_
+4	mn	5F
+4	mx	5F
+4	sp	--------------------------------
+5	a	\%
+5	mn	25
+5	mx	25
+5	sp	--------------------------------
+6	a	\
+6	mn	5C
+6	mx	5C
+6	sp	--------------------------------
+7	a	a
+7	mn	61
+7	mx	61
+7	sp	--------------------------------
+8	a	c
+8	mn	63
+8	mx	63
+8	sp	--------------------------------
+9	a	a_
+9	mn	61090909090909090909090909090909
+9	mx	61EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+9	sp	--------------------------------
+10	a	c_
+10	mn	09090909090909090909090909090909
+10	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+10	sp	--------------------------------
+11	a	a%
+11	mn	61090909090909090909090909090909
+11	mx	61EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+11	sp	--------------------------------
+12	a	c%
+12	mn	09090909090909090909090909090909
+12	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+12	sp	--------------------------------
+13	a	aa
+13	mn	6161
+13	mx	6161
+13	sp	--------------------------------
+14	a	cc
+14	mn	6363
+14	mx	6363
+14	sp	--------------------------------
+15	a	ch
+15	mn	6368
+15	mx	6368
+15	sp	--------------------------------
+16	a	aa_
+16	mn	61610909090909090909090909090909
+16	mx	6161EFBFBFEFBFBFEFBFBFEFBFBF2020
+16	sp	--------------------------------
+17	a	cc_
+17	mn	63090909090909090909090909090909
+17	mx	63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+17	sp	--------------------------------
+18	a	ch_
+18	mn	63680909090909090909090909090909
+18	mx	6368EFBFBFEFBFBFEFBFBFEFBFBF2020
+18	sp	--------------------------------
+19	a	aa%
+19	mn	61610909090909090909090909090909
+19	mx	6161EFBFBFEFBFBFEFBFBFEFBFBF2020
+19	sp	--------------------------------
+20	a	cc%
+20	mn	63090909090909090909090909090909
+20	mx	63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+20	sp	--------------------------------
+21	a	ch%
+21	mn	63680909090909090909090909090909
+21	mx	6368EFBFBFEFBFBFEFBFBFEFBFBF2020
+21	sp	--------------------------------
+22	a	aaa
+22	mn	616161
+22	mx	616161
+22	sp	--------------------------------
+23	a	ccc
+23	mn	636363
+23	mx	636363
+23	sp	--------------------------------
+24	a	cch
+24	mn	636368
+24	mx	636368
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	61616109090909090909090909090909
+25	mx	616161EFBFBFEFBFBFEFBFBFEFBFBF20
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	63630909090909090909090909090909
+26	mx	6363EFBFBFEFBFBFEFBFBFEFBFBF2020
+26	sp	--------------------------------
+27	a	cch_
+27	mn	63636809090909090909090909090909
+27	mx	636368EFBFBFEFBFBFEFBFBFEFBFBF20
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	61616109090909090909090909090909
+28	mx	616161EFBFBFEFBFBFEFBFBFEFBFBF20
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	63630909090909090909090909090909
+29	mx	6363EFBFBFEFBFBFEFBFBFEFBFBF2020
+29	sp	--------------------------------
+30	a	cch%
+30	mn	63636809090909090909090909090909
+30	mx	636368EFBFBFEFBFBFEFBFBFEFBFBF20
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	61616161
+31	mx	61616161
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	63616161
+32	mx	63616161
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_danish_ci;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	09090909090909090909090909090909
+2	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+2	sp	--------------------------------
+3	a	%
+3	mn	09090909090909090909090909090909
+3	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+3	sp	--------------------------------
+4	a	\_
+4	mn	5F
+4	mx	5F
+4	sp	--------------------------------
+5	a	\%
+5	mn	25
+5	mx	25
+5	sp	--------------------------------
+6	a	\
+6	mn	5C
+6	mx	5C
+6	sp	--------------------------------
+7	a	a
+7	mn	61
+7	mx	61
+7	sp	--------------------------------
+8	a	c
+8	mn	63
+8	mx	63
+8	sp	--------------------------------
+9	a	a_
+9	mn	09090909090909090909090909090909
+9	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+9	sp	--------------------------------
+10	a	c_
+10	mn	63090909090909090909090909090909
+10	mx	63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+10	sp	--------------------------------
+11	a	a%
+11	mn	09090909090909090909090909090909
+11	mx	EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20
+11	sp	--------------------------------
+12	a	c%
+12	mn	63090909090909090909090909090909
+12	mx	63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF
+12	sp	--------------------------------
+13	a	aa
+13	mn	6161
+13	mx	6161
+13	sp	--------------------------------
+14	a	cc
+14	mn	6363
+14	mx	6363
+14	sp	--------------------------------
+15	a	ch
+15	mn	6368
+15	mx	6368
+15	sp	--------------------------------
+16	a	aa_
+16	mn	61610909090909090909090909090909
+16	mx	6161EFBFBFEFBFBFEFBFBFEFBFBF2020
+16	sp	--------------------------------
+17	a	cc_
+17	mn	63630909090909090909090909090909
+17	mx	6363EFBFBFEFBFBFEFBFBFEFBFBF2020
+17	sp	--------------------------------
+18	a	ch_
+18	mn	63680909090909090909090909090909
+18	mx	6368EFBFBFEFBFBFEFBFBFEFBFBF2020
+18	sp	--------------------------------
+19	a	aa%
+19	mn	61610909090909090909090909090909
+19	mx	6161EFBFBFEFBFBFEFBFBFEFBFBF2020
+19	sp	--------------------------------
+20	a	cc%
+20	mn	63630909090909090909090909090909
+20	mx	6363EFBFBFEFBFBFEFBFBFEFBFBF2020
+20	sp	--------------------------------
+21	a	ch%
+21	mn	63680909090909090909090909090909
+21	mx	6368EFBFBFEFBFBFEFBFBFEFBFBF2020
+21	sp	--------------------------------
+22	a	aaa
+22	mn	616161
+22	mx	616161
+22	sp	--------------------------------
+23	a	ccc
+23	mn	636363
+23	mx	636363
+23	sp	--------------------------------
+24	a	cch
+24	mn	636368
+24	mx	636368
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	61610909090909090909090909090909
+25	mx	6161EFBFBFEFBFBFEFBFBFEFBFBF2020
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	63636309090909090909090909090909
+26	mx	636363EFBFBFEFBFBFEFBFBFEFBFBF20
+26	sp	--------------------------------
+27	a	cch_
+27	mn	63636809090909090909090909090909
+27	mx	636368EFBFBFEFBFBFEFBFBFEFBFBF20
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	61610909090909090909090909090909
+28	mx	6161EFBFBFEFBFBFEFBFBFEFBFBF2020
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	63636309090909090909090909090909
+29	mx	636363EFBFBFEFBFBFEFBFBFEFBFBF20
+29	sp	--------------------------------
+30	a	cch%
+30	mn	63636809090909090909090909090909
+30	mx	636368EFBFBFEFBFBFEFBFBFEFBFBF20
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	61616161
+31	mx	61616161
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	63616109090909090909090909090909
+32	mx	636161EFBFBFEFBFBFEFBFBFEFBFBF20
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	09090909090909090909090909090909
+2	mx	F48FBFBFF48FBFBFF48FBFBFF48FBFBF
+2	sp	--------------------------------
+3	a	%
+3	mn	09090909090909090909090909090909
+3	mx	F48FBFBFF48FBFBFF48FBFBFF48FBFBF
+3	sp	--------------------------------
+4	a	\_
+4	mn	5F
+4	mx	5F
+4	sp	--------------------------------
+5	a	\%
+5	mn	25
+5	mx	25
+5	sp	--------------------------------
+6	a	\
+6	mn	5C
+6	mx	5C
+6	sp	--------------------------------
+7	a	a
+7	mn	61
+7	mx	61
+7	sp	--------------------------------
+8	a	c
+8	mn	63
+8	mx	63
+8	sp	--------------------------------
+9	a	a_
+9	mn	61090909090909090909090909090909
+9	mx	61F48FBFBFF48FBFBFF48FBFBF202020
+9	sp	--------------------------------
+10	a	c_
+10	mn	63090909090909090909090909090909
+10	mx	63F48FBFBFF48FBFBFF48FBFBF202020
+10	sp	--------------------------------
+11	a	a%
+11	mn	61090909090909090909090909090909
+11	mx	61F48FBFBFF48FBFBFF48FBFBF202020
+11	sp	--------------------------------
+12	a	c%
+12	mn	63090909090909090909090909090909
+12	mx	63F48FBFBFF48FBFBFF48FBFBF202020
+12	sp	--------------------------------
+13	a	aa
+13	mn	6161
+13	mx	6161
+13	sp	--------------------------------
+14	a	cc
+14	mn	6363
+14	mx	6363
+14	sp	--------------------------------
+15	a	ch
+15	mn	6368
+15	mx	6368
+15	sp	--------------------------------
+16	a	aa_
+16	mn	61610909090909090909090909090909
+16	mx	6161F48FBFBFF48FBFBFF48FBFBF2020
+16	sp	--------------------------------
+17	a	cc_
+17	mn	63630909090909090909090909090909
+17	mx	6363F48FBFBFF48FBFBFF48FBFBF2020
+17	sp	--------------------------------
+18	a	ch_
+18	mn	63680909090909090909090909090909
+18	mx	6368F48FBFBFF48FBFBFF48FBFBF2020
+18	sp	--------------------------------
+19	a	aa%
+19	mn	61610909090909090909090909090909
+19	mx	6161F48FBFBFF48FBFBFF48FBFBF2020
+19	sp	--------------------------------
+20	a	cc%
+20	mn	63630909090909090909090909090909
+20	mx	6363F48FBFBFF48FBFBFF48FBFBF2020
+20	sp	--------------------------------
+21	a	ch%
+21	mn	63680909090909090909090909090909
+21	mx	6368F48FBFBFF48FBFBFF48FBFBF2020
+21	sp	--------------------------------
+22	a	aaa
+22	mn	616161
+22	mx	616161
+22	sp	--------------------------------
+23	a	ccc
+23	mn	636363
+23	mx	636363
+23	sp	--------------------------------
+24	a	cch
+24	mn	636368
+24	mx	636368
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	61616109090909090909090909090909
+25	mx	616161F48FBFBFF48FBFBFF48FBFBF20
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	63636309090909090909090909090909
+26	mx	636363F48FBFBFF48FBFBFF48FBFBF20
+26	sp	--------------------------------
+27	a	cch_
+27	mn	63636809090909090909090909090909
+27	mx	636368F48FBFBFF48FBFBFF48FBFBF20
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	61616109090909090909090909090909
+28	mx	616161F48FBFBFF48FBFBFF48FBFBF20
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	63636309090909090909090909090909
+29	mx	636363F48FBFBFF48FBFBFF48FBFBF20
+29	sp	--------------------------------
+30	a	cch%
+30	mn	63636809090909090909090909090909
+30	mx	636368F48FBFBFF48FBFBFF48FBFBF20
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	61616161
+31	mx	61616161
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	63616161
+32	mx	63616161
+32	sp	--------------------------------
 ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET ucs2;
 SELECT * FROM v1;
 id	name	val
@@ -909,6 +1589,10 @@ id	name	val
 31	mn	00610061006100610061006100610061
 31	mx	00610061006100610061006100610061
 31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	00630061006100610061006100610061
+32	mx	00630061006100610061006100610061
+32	sp	--------------------------------
 ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET ucs2 COLLATE ucs2_unicode_ci;
 SELECT * FROM v1;
 id	name	val
@@ -1036,6 +1720,10 @@ id	name	val
 31	mn	00610061006100610061006100610061
 31	mx	00610061006100610061006100610061
 31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	00630061006100610061006100610061
+32	mx	00630061006100610061006100610061
+32	sp	--------------------------------
 ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET ucs2 COLLATE ucs2_czech_ci;
 SELECT * FROM v1;
 id	name	val
@@ -1163,6 +1851,10 @@ id	name	val
 31	mn	00610061006100610061006100610061
 31	mx	00610061006100610061006100610061
 31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	00630061006100610061006100610061
+32	mx	00630061006100610061006100610061
+32	sp	--------------------------------
 ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET ucs2 COLLATE ucs2_danish_ci;
 SELECT * FROM v1;
 id	name	val
@@ -1290,6 +1982,10 @@ id	name	val
 31	mn	00610061006100610061006100610061
 31	mx	00610061006100610061006100610061
 31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	00630061006100610061006100610009
+32	mx	0063006100610061006100610061FFFF
+32	sp	--------------------------------
 ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16;
 SELECT * FROM v1;
 id	name	val
@@ -1417,6 +2113,10 @@ id	name	val
 31	mn	0061006100610061
 31	mx	0061006100610061
 31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	0063006100610061
+32	mx	0063006100610061
+32	sp	--------------------------------
 ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16 COLLATE utf16_unicode_ci;
 SELECT * FROM v1;
 id	name	val
@@ -1544,6 +2244,10 @@ id	name	val
 31	mn	0061006100610061
 31	mx	0061006100610061
 31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	0063006100610061
+32	mx	0063006100610061
+32	sp	--------------------------------
 ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16 COLLATE utf16_czech_ci;
 SELECT * FROM v1;
 id	name	val
@@ -1671,6 +2375,10 @@ id	name	val
 31	mn	0061006100610061
 31	mx	0061006100610061
 31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	0063006100610061
+32	mx	0063006100610061
+32	sp	--------------------------------
 ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16 COLLATE utf16_danish_ci;
 SELECT * FROM v1;
 id	name	val
@@ -1798,6 +2506,141 @@ id	name	val
 31	mn	0061006100610061
 31	mx	0061006100610061
 31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	00630061006100090009000900090009
+32	mx	006300610061FFFFFFFFFFFFFFFFFFFF
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16 COLLATE utf16_unicode_520_ci;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	0009
+2	mx	DBFFDFFF
+2	sp	--------------------------------
+3	a	%
+3	mn	00090009000900090009000900090009
+3	mx	DBFFDFFFDBFFDFFFDBFFDFFFDBFFDFFF
+3	sp	--------------------------------
+4	a	\_
+4	mn	005F
+4	mx	005F
+4	sp	--------------------------------
+5	a	\%
+5	mn	0025
+5	mx	0025
+5	sp	--------------------------------
+6	a	\
+6	mn	005C
+6	mx	005C
+6	sp	--------------------------------
+7	a	a
+7	mn	0061
+7	mx	0061
+7	sp	--------------------------------
+8	a	c
+8	mn	0063
+8	mx	0063
+8	sp	--------------------------------
+9	a	a_
+9	mn	00610009
+9	mx	0061DBFFDFFF
+9	sp	--------------------------------
+10	a	c_
+10	mn	00630009
+10	mx	0063DBFFDFFF
+10	sp	--------------------------------
+11	a	a%
+11	mn	00610009000900090009000900090009
+11	mx	0061DBFFDFFFDBFFDFFFDBFFDFFF0000
+11	sp	--------------------------------
+12	a	c%
+12	mn	00630009000900090009000900090009
+12	mx	0063DBFFDFFFDBFFDFFFDBFFDFFF0000
+12	sp	--------------------------------
+13	a	aa
+13	mn	00610061
+13	mx	00610061
+13	sp	--------------------------------
+14	a	cc
+14	mn	00630063
+14	mx	00630063
+14	sp	--------------------------------
+15	a	ch
+15	mn	00630068
+15	mx	00630068
+15	sp	--------------------------------
+16	a	aa_
+16	mn	006100610009
+16	mx	00610061DBFFDFFF
+16	sp	--------------------------------
+17	a	cc_
+17	mn	006300630009
+17	mx	00630063DBFFDFFF
+17	sp	--------------------------------
+18	a	ch_
+18	mn	006300680009
+18	mx	00630068DBFFDFFF
+18	sp	--------------------------------
+19	a	aa%
+19	mn	00610061000900090009000900090009
+19	mx	00610061DBFFDFFFDBFFDFFFDBFFDFFF
+19	sp	--------------------------------
+20	a	cc%
+20	mn	00630063000900090009000900090009
+20	mx	00630063DBFFDFFFDBFFDFFFDBFFDFFF
+20	sp	--------------------------------
+21	a	ch%
+21	mn	00630068000900090009000900090009
+21	mx	00630068DBFFDFFFDBFFDFFFDBFFDFFF
+21	sp	--------------------------------
+22	a	aaa
+22	mn	006100610061
+22	mx	006100610061
+22	sp	--------------------------------
+23	a	ccc
+23	mn	006300630063
+23	mx	006300630063
+23	sp	--------------------------------
+24	a	cch
+24	mn	006300630068
+24	mx	006300630068
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	0061006100610009
+25	mx	006100610061DBFFDFFF
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	0063006300630009
+26	mx	006300630063DBFFDFFF
+26	sp	--------------------------------
+27	a	cch_
+27	mn	0063006300680009
+27	mx	006300630068DBFFDFFF
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	00610061006100090009000900090009
+28	mx	006100610061DBFFDFFFDBFFDFFF0000
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	00630063006300090009000900090009
+29	mx	006300630063DBFFDFFFDBFFDFFF0000
+29	sp	--------------------------------
+30	a	cch%
+30	mn	00630063006800090009000900090009
+30	mx	006300630068DBFFDFFFDBFFDFFF0000
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	0061006100610061
+31	mx	0061006100610061
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	0063006100610061
+32	mx	0063006100610061
+32	sp	--------------------------------
 ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32;
 SELECT * FROM v1;
 id	name	val
@@ -1925,6 +2768,10 @@ id	name	val
 31	mn	00000061000000610000006100000061
 31	mx	00000061000000610000006100000061
 31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	00000063000000610000006100000061
+32	mx	00000063000000610000006100000061
+32	sp	--------------------------------
 ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32 COLLATE utf32_unicode_ci;
 SELECT * FROM v1;
 id	name	val
@@ -2052,6 +2899,10 @@ id	name	val
 31	mn	00000061000000610000006100000061
 31	mx	00000061000000610000006100000061
 31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	00000063000000610000006100000061
+32	mx	00000063000000610000006100000061
+32	sp	--------------------------------
 ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32 COLLATE utf32_czech_ci;
 SELECT * FROM v1;
 id	name	val
@@ -2179,6 +3030,10 @@ id	name	val
 31	mn	00000061000000610000006100000061
 31	mx	00000061000000610000006100000061
 31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	00000063000000610000006100000061
+32	mx	00000063000000610000006100000061
+32	sp	--------------------------------
 ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32 COLLATE utf32_danish_ci;
 SELECT * FROM v1;
 id	name	val
@@ -2306,5 +3161,140 @@ id	name	val
 31	mn	00000061000000610000006100000061
 31	mx	00000061000000610000006100000061
 31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	00000063000000610000006100000009
+32	mx	0000006300000061000000610000FFFF
+32	sp	--------------------------------
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32 COLLATE utf32_unicode_520_ci;
+SELECT * FROM v1;
+id	name	val
+1	a	
+1	mn	
+1	mx	
+1	sp	--------------------------------
+2	a	_
+2	mn	00000009
+2	mx	0010FFFF
+2	sp	--------------------------------
+3	a	%
+3	mn	00000009000000090000000900000009
+3	mx	0010FFFF0010FFFF0010FFFF0010FFFF
+3	sp	--------------------------------
+4	a	\_
+4	mn	0000005F
+4	mx	0000005F
+4	sp	--------------------------------
+5	a	\%
+5	mn	00000025
+5	mx	00000025
+5	sp	--------------------------------
+6	a	\
+6	mn	0000005C
+6	mx	0000005C
+6	sp	--------------------------------
+7	a	a
+7	mn	00000061
+7	mx	00000061
+7	sp	--------------------------------
+8	a	c
+8	mn	00000063
+8	mx	00000063
+8	sp	--------------------------------
+9	a	a_
+9	mn	0000006100000009
+9	mx	000000610010FFFF
+9	sp	--------------------------------
+10	a	c_
+10	mn	0000006300000009
+10	mx	000000630010FFFF
+10	sp	--------------------------------
+11	a	a%
+11	mn	00000061000000090000000900000009
+11	mx	000000610010FFFF0010FFFF0010FFFF
+11	sp	--------------------------------
+12	a	c%
+12	mn	00000063000000090000000900000009
+12	mx	000000630010FFFF0010FFFF0010FFFF
+12	sp	--------------------------------
+13	a	aa
+13	mn	0000006100000061
+13	mx	0000006100000061
+13	sp	--------------------------------
+14	a	cc
+14	mn	0000006300000063
+14	mx	0000006300000063
+14	sp	--------------------------------
+15	a	ch
+15	mn	0000006300000068
+15	mx	0000006300000068
+15	sp	--------------------------------
+16	a	aa_
+16	mn	000000610000006100000009
+16	mx	00000061000000610010FFFF
+16	sp	--------------------------------
+17	a	cc_
+17	mn	000000630000006300000009
+17	mx	00000063000000630010FFFF
+17	sp	--------------------------------
+18	a	ch_
+18	mn	000000630000006800000009
+18	mx	00000063000000680010FFFF
+18	sp	--------------------------------
+19	a	aa%
+19	mn	00000061000000610000000900000009
+19	mx	00000061000000610010FFFF0010FFFF
+19	sp	--------------------------------
+20	a	cc%
+20	mn	00000063000000630000000900000009
+20	mx	00000063000000630010FFFF0010FFFF
+20	sp	--------------------------------
+21	a	ch%
+21	mn	00000063000000680000000900000009
+21	mx	00000063000000680010FFFF0010FFFF
+21	sp	--------------------------------
+22	a	aaa
+22	mn	000000610000006100000061
+22	mx	000000610000006100000061
+22	sp	--------------------------------
+23	a	ccc
+23	mn	000000630000006300000063
+23	mx	000000630000006300000063
+23	sp	--------------------------------
+24	a	cch
+24	mn	000000630000006300000068
+24	mx	000000630000006300000068
+24	sp	--------------------------------
+25	a	aaa_
+25	mn	00000061000000610000006100000009
+25	mx	0000006100000061000000610010FFFF
+25	sp	--------------------------------
+26	a	ccc_
+26	mn	00000063000000630000006300000009
+26	mx	0000006300000063000000630010FFFF
+26	sp	--------------------------------
+27	a	cch_
+27	mn	00000063000000630000006800000009
+27	mx	0000006300000063000000680010FFFF
+27	sp	--------------------------------
+28	a	aaa%
+28	mn	00000061000000610000006100000009
+28	mx	0000006100000061000000610010FFFF
+28	sp	--------------------------------
+29	a	ccc%
+29	mn	00000063000000630000006300000009
+29	mx	0000006300000063000000630010FFFF
+29	sp	--------------------------------
+30	a	cch%
+30	mn	00000063000000630000006800000009
+30	mx	0000006300000063000000680010FFFF
+30	sp	--------------------------------
+31	a	aaaaaaaaaaaaaaaaaaaa
+31	mn	00000061000000610000006100000061
+31	mx	00000061000000610000006100000061
+31	sp	--------------------------------
+32	a	caaaaaaaaaaaaaaaaaaa
+32	mn	00000063000000610000006100000061
+32	mx	00000063000000610000006100000061
+32	sp	--------------------------------
 DROP VIEW v1;
 DROP TABLE t1;

=== modified file 'mysql-test/t/ctype_like_range.test'
--- a/mysql-test/t/ctype_like_range.test	2010-11-26 10:44:39 +0000
+++ b/mysql-test/t/ctype_like_range.test	2010-11-26 13:29:18 +0000
@@ -2,6 +2,7 @@
 --source include/have_ucs2.inc
 --source include/have_utf16.inc
 --source include/have_utf32.inc
+--source include/have_utf8mb4.inc
 
 --disable_warnings
 DROP TABLE IF EXISTS t1;
@@ -20,6 +21,7 @@ INSERT INTO t1 (a) VALUES ('aaa'),('ccc'
 INSERT INTO t1 (a) VALUES ('aaa_'),('ccc_'),('cch_');
 INSERT INTO t1 (a) VALUES ('aaa%'),('ccc%'),('cch%');
 INSERT INTO t1 (a) VALUES ('aaaaaaaaaaaaaaaaaaaa');
+INSERT INTO t1 (a) VALUES ('caaaaaaaaaaaaaaaaaaa');
 
 CREATE VIEW v1 AS
   SELECT id, 'a' AS name, a AS val FROM t1
@@ -44,9 +46,30 @@ SELECT * FROM v1;
 ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_czech_ci;
 SELECT * FROM v1;
 
+# Note, 16 bytes is enough for 16/3= 5 characters
+# For the 'aaaaaaaa' value contraction breaks apart
+# For the 'caaaaaaa' value contraction does not break apart
 ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_danish_ci;
 SELECT * FROM v1;
 
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8mb4;
+SELECT * FROM v1;
+
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+SELECT * FROM v1;
+
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_czech_ci;
+SELECT * FROM v1;
+
+# Note, 16 bytes is enough for 16/4= 4 characters
+# For the 'aaaaaaaa' value contraction does not break apart
+# For the 'caaaaaaa' value contraction breaks apart
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_danish_ci;
+SELECT * FROM v1;
+
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;
+SELECT * FROM v1;
+
 ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET ucs2;
 SELECT * FROM v1;
 
@@ -68,9 +91,15 @@ SELECT * FROM v1;
 ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16 COLLATE utf16_czech_ci;
 SELECT * FROM v1;
 
+# Note, 16 bytes is enough for 16/3= 5 characters
+# For the 'aaaaaaaa' value contraction does not break apart
+# For the 'caaaaaaa' value contraction breaks apart
 ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16 COLLATE utf16_danish_ci;
 SELECT * FROM v1;
 
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16 COLLATE utf16_unicode_520_ci;
+SELECT * FROM v1;
+
 ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32;
 SELECT * FROM v1;
 
@@ -83,5 +112,8 @@ SELECT * FROM v1;
 ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32 COLLATE utf32_danish_ci;
 SELECT * FROM v1;
 
+ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32 COLLATE utf32_unicode_520_ci;
+SELECT * FROM v1;
+
 DROP VIEW v1;
 DROP TABLE t1;

=== modified file 'strings/ctype-ucs2.c'
--- a/strings/ctype-ucs2.c	2010-11-26 11:36:39 +0000
+++ b/strings/ctype-ucs2.c	2010-11-26 13:29:18 +0000
@@ -900,11 +900,34 @@ my_scan_mb2(CHARSET_INFO *cs __attribute
 
 
 static void
-my_fill_mb2(CHARSET_INFO *cs __attribute__((unused)),
-            char *s, size_t l, int fill)
+my_fill_mb2(CHARSET_INFO *cs, char *s, size_t slen, int fill)
 {
-  DBUG_ASSERT(fill <= 0xFFFF);
-  for ( ; l >= 2; s[0]= (fill >> 8), s[1]= (fill & 0xFF), s+= 2, l-= 2);
+  char buf[10];
+  int buflen;
+
+  DBUG_ASSERT((slen % 2) == 0);
+
+  buflen= cs->cset->wc_mb(cs, (my_wc_t) fill, (uchar*) buf,
+                          (uchar*) buf + sizeof(buf));
+
+  DBUG_ASSERT(buflen > 0);
+
+  while (slen >= (size_t) buflen)
+  {
+    /* Enough space for the characer */
+    memcpy(s, buf, (size_t) buflen);
+    s+= buflen;
+    slen-= buflen;
+  }
+
+  /* 
+    If there are some more space which is not enough
+    for the whole multibyte character, then add trailing zeros.
+  */
+  for ( ; slen; slen--)
+  {
+    *s++= 0x00;
+  }  
 }
 
 
@@ -2799,6 +2822,15 @@ static size_t my_casedn_ucs2(CHARSET_INF
 }
 
 
+static void
+my_fill_ucs2(CHARSET_INFO *cs __attribute__((unused)), 
+             char *s, size_t l, int fill)
+{
+  DBUG_ASSERT(fill <= 0xFFFF);
+  for ( ; l >= 2; s[0]= (fill >> 8), s[1]= (fill & 0xFF), s+= 2, l-= 2);
+}
+
+
 static int my_strnncoll_ucs2(CHARSET_INFO *cs, 
 			     const uchar *s, size_t slen, 
                              const uchar *t, size_t tlen,
@@ -3134,7 +3166,7 @@ MY_CHARSET_HANDLER my_charset_ucs2_handl
     my_snprintf_mb2,
     my_l10tostr_mb2_or_mb4,
     my_ll10tostr_mb2_or_mb4,
-    my_fill_mb2,
+    my_fill_ucs2,
     my_strntol_mb2_or_mb4,
     my_strntoul_mb2_or_mb4,
     my_strntoll_mb2_or_mb4,


Attachment: [text/bzr-bundle] bzr/bar@mysql.com-20101126132918-g64kxe7xapnoi22e.bundle
Thread
bzr commit into mysql-trunk-bugfixing branch (bar:3398) Bug#57737Alexander Barkov26 Nov