mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
Merge mysql.com:/users/lthalmann/bkroot/mysql-5.0
into mysql.com:/users/lthalmann/bk/mysql-5.0
This commit is contained in:
commit
0ef3cd6c70
7 changed files with 77 additions and 6 deletions
|
@ -360,6 +360,11 @@ int my_wildcmp_8bit(CHARSET_INFO *,
|
|||
const char *wildstr,const char *wildend,
|
||||
int escape, int w_one, int w_many);
|
||||
|
||||
int my_wildcmp_bin(CHARSET_INFO *,
|
||||
const char *str,const char *str_end,
|
||||
const char *wildstr,const char *wildend,
|
||||
int escape, int w_one, int w_many);
|
||||
|
||||
uint my_numchars_8bit(CHARSET_INFO *, const char *b, const char *e);
|
||||
uint my_numcells_8bit(CHARSET_INFO *, const char *b, const char *e);
|
||||
uint my_charpos_8bit(CHARSET_INFO *, const char *b, const char *e, uint pos);
|
||||
|
|
4
mysql-test/include/have_latin2_ch.inc
Normal file
4
mysql-test/include/have_latin2_ch.inc
Normal file
|
@ -0,0 +1,4 @@
|
|||
-- require r/have_latin2_ch.require
|
||||
disable_query_log;
|
||||
show collation like "latin2_czech_cs";
|
||||
enable_query_log;
|
30
mysql-test/r/ctype_latin2_ch.result
Normal file
30
mysql-test/r/ctype_latin2_ch.result
Normal file
|
@ -0,0 +1,30 @@
|
|||
drop table if exists t1;
|
||||
set names latin2;
|
||||
select 'A' = 'a' collate latin2_czech_cs;
|
||||
'A' = 'a' collate latin2_czech_cs
|
||||
0
|
||||
create table t1 (
|
||||
id int(5) not null,
|
||||
tt char(255) not null
|
||||
) character set latin2 collate latin2_czech_cs;
|
||||
insert into t1 values (1,'Aa');
|
||||
insert into t1 values (2,'Aas');
|
||||
alter table t1 add primary key aaa(tt);
|
||||
select * from t1 where tt like 'Aa%';
|
||||
id tt
|
||||
1 Aa
|
||||
2 Aas
|
||||
select * from t1 ignore index (primary) where tt like 'Aa%';
|
||||
id tt
|
||||
1 Aa
|
||||
2 Aas
|
||||
select * from t1 where tt like '%Aa%';
|
||||
id tt
|
||||
1 Aa
|
||||
2 Aas
|
||||
select * from t1 where tt like 'AA%';
|
||||
id tt
|
||||
select * from t1 ignore index (primary) where tt like 'AA%';
|
||||
id tt
|
||||
select * from t1 where tt like '%AA%';
|
||||
id tt
|
2
mysql-test/r/have_latin2_ch.require
Normal file
2
mysql-test/r/have_latin2_ch.require
Normal file
|
@ -0,0 +1,2 @@
|
|||
Collation Charset Id Default Compiled Sortlen
|
||||
latin2_czech_cs latin2 2 Yes 4
|
30
mysql-test/t/ctype_latin2_ch.test
Normal file
30
mysql-test/t/ctype_latin2_ch.test
Normal file
|
@ -0,0 +1,30 @@
|
|||
-- source include/have_latin2_ch.inc
|
||||
|
||||
#
|
||||
# Tests with latin2_czech_cs
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
# Bug#17374: select ... like 'A%' operator fails
|
||||
# to find value on columuns with key
|
||||
#
|
||||
set names latin2;
|
||||
select 'A' = 'a' collate latin2_czech_cs;
|
||||
create table t1 (
|
||||
id int(5) not null,
|
||||
tt char(255) not null
|
||||
) character set latin2 collate latin2_czech_cs;
|
||||
insert into t1 values (1,'Aa');
|
||||
insert into t1 values (2,'Aas');
|
||||
alter table t1 add primary key aaa(tt);
|
||||
select * from t1 where tt like 'Aa%';
|
||||
select * from t1 ignore index (primary) where tt like 'Aa%';
|
||||
select * from t1 where tt like '%Aa%';
|
||||
select * from t1 where tt like 'AA%';
|
||||
select * from t1 ignore index (primary) where tt like 'AA%';
|
||||
select * from t1 where tt like '%AA%';
|
||||
|
||||
# End of 4.1 tests
|
|
@ -295,10 +295,10 @@ void my_hash_sort_bin(CHARSET_INFO *cs __attribute__((unused)),
|
|||
#define INC_PTR(cs,A,B) (A)++
|
||||
|
||||
|
||||
static int my_wildcmp_bin(CHARSET_INFO *cs,
|
||||
const char *str,const char *str_end,
|
||||
const char *wildstr,const char *wildend,
|
||||
int escape, int w_one, int w_many)
|
||||
int my_wildcmp_bin(CHARSET_INFO *cs,
|
||||
const char *str,const char *str_end,
|
||||
const char *wildstr,const char *wildend,
|
||||
int escape, int w_one, int w_many)
|
||||
{
|
||||
int result= -1; /* Not found, using wildcards */
|
||||
|
||||
|
|
|
@ -356,7 +356,7 @@ static int my_strnxfrm_czech(CHARSET_INFO *cs __attribute__((unused)),
|
|||
|
||||
#ifdef REAL_MYSQL
|
||||
|
||||
#define min_sort_char 0
|
||||
#define min_sort_char ' '
|
||||
#define max_sort_char '9'
|
||||
|
||||
#define EXAMPLE
|
||||
|
@ -595,7 +595,7 @@ static MY_COLLATION_HANDLER my_collation_latin2_czech_ci_handler =
|
|||
my_strnxfrm_czech,
|
||||
my_strnxfrmlen_simple,
|
||||
my_like_range_czech,
|
||||
my_wildcmp_8bit,
|
||||
my_wildcmp_bin,
|
||||
my_strcasecmp_8bit,
|
||||
my_instr_simple,
|
||||
my_hash_sort_simple,
|
||||
|
|
Loading…
Reference in a new issue