mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.(none):/home/tomas/mysql-4.1-ndb-merge
This commit is contained in:
commit
96a45ab066
9 changed files with 74 additions and 11 deletions
|
@ -116,7 +116,7 @@ CREATE TABLE t1 (
|
|||
recid int(11) NOT NULL auto_increment,
|
||||
dyninfo text,
|
||||
PRIMARY KEY (recid)
|
||||
) ENGINE=MyISAM;
|
||||
) ENGINE=MyISAM CHARACTER SET tis620;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
|
@ -2890,7 +2890,7 @@ SELECT 'a\t' < 'a';
|
|||
SELECT 'a\t' < 'a ';
|
||||
'a\t' < 'a '
|
||||
1
|
||||
CREATE TABLE t1 (a char(10) not null);
|
||||
CREATE TABLE t1 (a char(10) not null) CHARACTER SET tis620;
|
||||
INSERT INTO t1 VALUES ('a'),('a\0'),('a\t'),('a ');
|
||||
SELECT hex(a),STRCMP(a,'a'), STRCMP(a,'a ') FROM t1;
|
||||
hex(a) STRCMP(a,'a') STRCMP(a,'a ')
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
--default-character-set=tis620
|
|
@ -69,7 +69,7 @@ CREATE TABLE t1 (
|
|||
recid int(11) NOT NULL auto_increment,
|
||||
dyninfo text,
|
||||
PRIMARY KEY (recid)
|
||||
) ENGINE=MyISAM;
|
||||
) ENGINE=MyISAM CHARACTER SET tis620;
|
||||
|
||||
show create table t1;
|
||||
|
||||
|
@ -112,7 +112,7 @@ SELECT 'a\0' < 'a ';
|
|||
SELECT 'a\t' < 'a';
|
||||
SELECT 'a\t' < 'a ';
|
||||
|
||||
CREATE TABLE t1 (a char(10) not null);
|
||||
CREATE TABLE t1 (a char(10) not null) CHARACTER SET tis620;
|
||||
INSERT INTO t1 VALUES ('a'),('a\0'),('a\t'),('a ');
|
||||
SELECT hex(a),STRCMP(a,'a'), STRCMP(a,'a ') FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
|
|
@ -6290,7 +6290,7 @@ static MY_CHARSET_HANDLER my_charset_big5_handler=
|
|||
my_charpos_mb,
|
||||
my_well_formed_len_mb,
|
||||
my_lengthsp_8bit,
|
||||
my_numcells_mb,
|
||||
my_numcells_8bit,
|
||||
my_mb_wc_big5, /* mb_wc */
|
||||
my_wc_mb_big5, /* wc_mb */
|
||||
my_caseup_str_mb,
|
||||
|
|
|
@ -8657,7 +8657,7 @@ static MY_CHARSET_HANDLER my_charset_handler=
|
|||
my_charpos_mb,
|
||||
my_well_formed_len_mb,
|
||||
my_lengthsp_8bit,
|
||||
my_numcells_mb,
|
||||
my_numcells_8bit,
|
||||
my_mb_wc_euc_kr, /* mb_wc */
|
||||
my_wc_mb_euc_kr, /* wc_mb */
|
||||
my_caseup_str_mb,
|
||||
|
|
|
@ -5708,7 +5708,7 @@ static MY_CHARSET_HANDLER my_charset_handler=
|
|||
my_charpos_mb,
|
||||
my_well_formed_len_mb,
|
||||
my_lengthsp_8bit,
|
||||
my_numcells_mb,
|
||||
my_numcells_8bit,
|
||||
my_mb_wc_gb2312, /* mb_wc */
|
||||
my_wc_mb_gb2312, /* wc_mb */
|
||||
my_caseup_str_mb,
|
||||
|
|
|
@ -9939,7 +9939,7 @@ static MY_CHARSET_HANDLER my_charset_handler=
|
|||
my_charpos_mb,
|
||||
my_well_formed_len_mb,
|
||||
my_lengthsp_8bit,
|
||||
my_numcells_mb,
|
||||
my_numcells_8bit,
|
||||
my_mb_wc_gbk,
|
||||
my_wc_mb_gbk,
|
||||
my_caseup_str_mb,
|
||||
|
|
|
@ -4534,6 +4534,36 @@ my_mb_wc_sjis(CHARSET_INFO *cs __attribute__((unused)),
|
|||
return 2;
|
||||
}
|
||||
|
||||
static
|
||||
uint my_numcells_sjis(CHARSET_INFO *cs __attribute__((unused)),
|
||||
const char *str, const char *strend)
|
||||
{
|
||||
uint clen= 0;
|
||||
const unsigned char *b= (const unsigned char *) str;
|
||||
const unsigned char *e= (const unsigned char *) strend;
|
||||
|
||||
for (clen= 0; b < e; )
|
||||
{
|
||||
if (*b >= 0xA1 && *b <= 0xDF)
|
||||
{
|
||||
clen++;
|
||||
b++;
|
||||
}
|
||||
else if (*b > 0x7F)
|
||||
{
|
||||
clen+= 2;
|
||||
b+= 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
clen++;
|
||||
b++;
|
||||
}
|
||||
}
|
||||
return clen;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static MY_COLLATION_HANDLER my_collation_ci_handler =
|
||||
{
|
||||
|
@ -4558,7 +4588,7 @@ static MY_CHARSET_HANDLER my_charset_handler=
|
|||
my_charpos_mb,
|
||||
my_well_formed_len_mb,
|
||||
my_lengthsp_8bit,
|
||||
my_numcells_mb,
|
||||
my_numcells_sjis,
|
||||
my_mb_wc_sjis, /* mb_wc */
|
||||
my_wc_mb_sjis, /* wc_mb */
|
||||
my_caseup_str_8bit,
|
||||
|
|
|
@ -8252,6 +8252,40 @@ my_jisx0212_uni_onechar(int code){
|
|||
[xA1-xFE][xA1-xFE] # JIS X 0208:1997 (two bytes/char)
|
||||
*/
|
||||
|
||||
static
|
||||
uint my_numcells_eucjp(CHARSET_INFO *cs __attribute__((unused)),
|
||||
const char *str, const char *strend)
|
||||
{
|
||||
uint clen= 0;
|
||||
const unsigned char *b= (const unsigned char *) str;
|
||||
const unsigned char *e= (const unsigned char *) strend;
|
||||
|
||||
for (clen= 0; b < e; )
|
||||
{
|
||||
if (*b == 0x8E)
|
||||
{
|
||||
clen++;
|
||||
b+= 2;
|
||||
}
|
||||
else if (*b == 0x8F)
|
||||
{
|
||||
clen+= 2;
|
||||
b+= 3;
|
||||
}
|
||||
else if (*b & 0x80)
|
||||
{
|
||||
clen+= 2;
|
||||
b+= 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
clen++;
|
||||
b++;
|
||||
}
|
||||
}
|
||||
return clen;
|
||||
}
|
||||
|
||||
static int
|
||||
my_mb_wc_euc_jp(CHARSET_INFO *cs,my_wc_t *pwc, const uchar *s, const uchar *e)
|
||||
{
|
||||
|
@ -8443,7 +8477,7 @@ static MY_CHARSET_HANDLER my_charset_handler=
|
|||
my_charpos_mb,
|
||||
my_well_formed_len_mb,
|
||||
my_lengthsp_8bit,
|
||||
my_numcells_mb,
|
||||
my_numcells_eucjp,
|
||||
my_mb_wc_euc_jp, /* mb_wc */
|
||||
my_wc_mb_euc_jp, /* wc_mb */
|
||||
my_caseup_str_mb,
|
||||
|
|
Loading…
Reference in a new issue