type_binary.result, type_binary.test:

new file
mysql_fix_privilege_tables.sql, mysql_create_system_tables.sh:
  Adding true BINARY/VARBINARY: fixing "password" type, not to be 0x00-padding.
Many files:
  Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
  Adding true BINARY/VARBINARY: new pad_char structure member.
ctype-bin.c:
  Adding true BINARY/VARBINARY: new pad_char structure member.
  New strnxfrm, with two trailing length bytes.
field.cc:
  Adding true BINARY/VARBINARY.
This commit is contained in:
bar@mysql.com 2005-10-13 19:16:19 +05:00
parent bb179f2376
commit 39b0712cf7
47 changed files with 471 additions and 198 deletions

View File

@ -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;

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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 Ñ<EFBFBD> Ñ<> Ó Ñ<>
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 Ñ<EFBFBD> Ñ<> Ü Ñ<>
CYR SMALL YU ÑŽ ÑŽ À ÑŽ
CYR SMALL YA Ñ<EFBFBD> Ñ<> Ñ Ñ<>
CYR CAPIT A Ð<EFBFBD> Ð<> á Ð<>
CYR CAPIT BE Б Б â Б
CYR CAPIT VE Ð’ Ð’ ÷ Ð’
CYR CAPIT GE Г Г ç Г
CYR CAPIT DE Д Д ä Д
CYR CAPIT IE Е Е å Е
CYR CAPIT IO Ð<EFBFBD> Ð<> ³ Ð<>
CYR CAPIT ZHE Ж Ж ö Ж
CYR CAPIT ZE З З ú З
CYR CAPIT I И И é И
CYR CAPIT KA К К ë К
CYR CAPIT EL Л Л ì Л
CYR CAPIT EM М М í М
CYR CAPIT EN Ð<EFBFBD> Ð<> î Ð<>
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 Α <03> <09>
GREEK CAPIT BETA Β <03> <09>
GREEK CAPIT GAMMA Γ <03> <09>
GREEK CAPIT DELTA Δ <03> <09>
GREEK CAPIT EPSILON Ε <03> <09>
GREEK SMALL ALPHA α <03> <09>
GREEK SMALL BETA β <03> <09>
GREEK SMALL GAMMA γ <03> <09>
GREEK SMALL DELTA δ <03> <09>
GREEK SMALL EPSILON ε <03> <09>
ARMENIAN CAPIT AYB Ա 1 <09>
ARMENIAN CAPIT BEN Բ 2 <09>
ARMENIAN CAPIT GIM Գ 3 <09>
ARMENIAN CAPIT DA Դ 4 <09>
ARMENIAN CAPIT ECH Ե 5 <09>
ARMENIAN CAPIT ZA Զ 6 <09>
ARMENIAN SMALL YAB ա a <09>
ARMENIAN SMALL BEN բ b <09>
ARMENIAN SMALL GIM գ c <09>
ARMENIAN SMALL DA դ d <09>
ARMENIAN SMALL ECH ե e <09>
ARMENIAN SMALL ZA զ f <09>
SELECT min(comment),count(*) FROM t1 GROUP BY ucs2_f;
min(comment) count(*)
LAT CAPIT A 2

View File

@ -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),

View File

@ -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

View File

@ -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 ,

View File

@ -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 ,

View File

@ -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

View File

@ -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',

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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),

View File

@ -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;

View File

@ -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 ,

View File

@ -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 ,

View File

@ -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|

View File

@ -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;

View File

@ -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");

View File

@ -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,"

View File

@ -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,

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 */

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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);
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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