List:Commits« Previous MessageNext Message »
From:bar Date:March 20 2006 12:28pm
Subject:bk commit into 4.1 tree (bar:1.2472) BUG#17374
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of bar. When bar does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2472 06/03/20 16:28:25 bar@stripped +7 -0
  Bug#17374: select ... like 'A%' operator fails to find value on columuns with key
  Fixed that LIKE worked case insensitively for latin2_czech_cs,
  which was wrong for a case sensitive collation.

  mysql-test/t/ctype_latin2_ch.test
    1.1 06/03/20 16:28:20 bar@stripped +30 -0
    New BitKeeper file ``mysql-test/t/ctype_latin2_ch.test''

  mysql-test/r/have_latin2_ch.require
    1.1 06/03/20 16:28:20 bar@stripped +2 -0
    New BitKeeper file ``mysql-test/r/have_latin2_ch.require''

  mysql-test/r/ctype_latin2_ch.result
    1.1 06/03/20 16:28:20 bar@stripped +30 -0
    New BitKeeper file ``mysql-test/r/ctype_latin2_ch.result''

  mysql-test/t/ctype_latin2_ch.test
    1.0 06/03/20 16:28:20 bar@stripped +0 -0
    BitKeeper file /usr/home/bar/mysql-4.1.b17374/mysql-test/t/ctype_latin2_ch.test

  mysql-test/r/have_latin2_ch.require
    1.0 06/03/20 16:28:20 bar@stripped +0 -0
    BitKeeper file /usr/home/bar/mysql-4.1.b17374/mysql-test/r/have_latin2_ch.require

  mysql-test/r/ctype_latin2_ch.result
    1.0 06/03/20 16:28:20 bar@stripped +0 -0
    BitKeeper file /usr/home/bar/mysql-4.1.b17374/mysql-test/r/ctype_latin2_ch.result

  mysql-test/include/have_latin2_ch.inc
    1.1 06/03/20 16:28:19 bar@stripped +4 -0
    New BitKeeper file ``mysql-test/include/have_latin2_ch.inc''

  strings/ctype-czech.c
    1.55 06/03/20 16:28:19 bar@stripped +1 -1
    Use my_wildcmp_bin instead of case insensitive my_wildcmp_8bit

  strings/ctype-bin.c
    1.59 06/03/20 16:28:19 bar@stripped +4 -4
    Making my_wildcmp_bin public instead of static

  mysql-test/include/have_latin2_ch.inc
    1.0 06/03/20 16:28:19 bar@stripped +0 -0
    BitKeeper file /usr/home/bar/mysql-4.1.b17374/mysql-test/include/have_latin2_ch.inc

  include/m_ctype.h
    1.106 06/03/20 16:28:19 bar@stripped +5 -0
    Making my_wildcmp_bin public instead of static

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	bar
# Host:	bar.intranet.mysql.r18.ru
# Root:	/usr/home/bar/mysql-4.1.b17374

--- 1.105/include/m_ctype.h	2005-08-17 13:26:26 +05:00
+++ 1.106/include/m_ctype.h	2006-03-20 16:28:19 +04:00
@@ -342,6 +342,11 @@
 		    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);

--- 1.54/strings/ctype-czech.c	2005-08-17 13:26:28 +05:00
+++ 1.55/strings/ctype-czech.c	2006-03-20 16:28:19 +04:00
@@ -583,7 +583,7 @@
   my_strnncollsp_czech,
   my_strnxfrm_czech,
   my_like_range_czech,
-  my_wildcmp_8bit,
+  my_wildcmp_bin,
   my_strcasecmp_8bit,
   my_instr_simple,
   my_hash_sort_simple,

--- 1.58/strings/ctype-bin.c	2005-08-17 13:26:27 +05:00
+++ 1.59/strings/ctype-bin.c	2006-03-20 16:28:19 +04:00
@@ -269,10 +269,10 @@
 #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 */
   
--- New file ---
+++ mysql-test/include/have_latin2_ch.inc	06/03/20 16:28:19
-- require r/have_latin2_ch.require
disable_query_log;
show collation like "latin2_czech_cs";
enable_query_log;

--- New file ---
+++ mysql-test/r/ctype_latin2_ch.result	06/03/20 16:28:20
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

--- New file ---
+++ mysql-test/r/have_latin2_ch.require	06/03/20 16:28:20
Collation	Charset	Id	Default	Compiled	Sortlen
latin2_czech_cs	latin2	2		Yes	4

--- New file ---
+++ mysql-test/t/ctype_latin2_ch.test	06/03/20 16:28:20
-- 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

Thread
bk commit into 4.1 tree (bar:1.2472) BUG#17374bar20 Mar