List:Commits« Previous MessageNext Message »
From:bar Date:March 23 2006 10:29am
Subject:bk commit into 4.1 tree (bar:1.2474)
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.2474 06/03/23 14:29:43 bar@stripped +5 -0
  Merge abarkov@stripped:/home/bk/mysql-4.1
  into  mysql.com:/usr/home/bar/mysql-4.1.b15376

  strings/ctype-ucs2.c
    1.47 06/03/23 14:29:28 bar@stripped +0 -0
    Auto merged

  strings/ctype-gb2312.c
    1.59 06/03/23 14:29:27 bar@stripped +0 -0
    Auto merged

  strings/ctype-euc_kr.c
    1.62 06/03/23 14:29:27 bar@stripped +0 -0
    Auto merged

  strings/ctype-bin.c
    1.60 06/03/23 14:29:26 bar@stripped +0 -0
    Auto merged

  include/m_ctype.h
    1.107 06/03/23 14:29:26 bar@stripped +0 -0
    Auto merged

# 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.b15376/RESYNC

--- 1.106/include/m_ctype.h	2005-12-12 21:32:42 +04:00
+++ 1.107/include/m_ctype.h	2006-03-23 14:29:26 +04:00
@@ -351,6 +351,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.61/strings/ctype-euc_kr.c	2005-12-09 16:35:57 +04:00
+++ 1.62/strings/ctype-euc_kr.c	2006-03-23 14:29:27 +04:00
@@ -8601,7 +8601,7 @@
     return MY_CS_ILUNI;
   
   if (s+2>e)
-    return MY_CS_TOOSMALL;
+    return MY_CS_TOOSMALL2;
   
   s[0]=code>>8;
   s[1]=code&0xFF;
@@ -8617,7 +8617,7 @@
   int hi=s[0];
   
   if (s >= e)
-    return MY_CS_TOOFEW(0);
+    return MY_CS_TOOSMALL;
   
   if (hi<0x80)
   {
@@ -8626,10 +8626,10 @@
   }
   
   if (s+2>e)
-    return MY_CS_TOOFEW(0);
+    return MY_CS_TOOSMALL2;
   
   if (!(pwc[0]=func_ksc5601_uni_onechar((hi<<8)+s[1])))
-    return MY_CS_ILSEQ;
+    return -2;
   
   return 2;
 }

--- 1.58/strings/ctype-gb2312.c	2005-12-09 16:34:08 +04:00
+++ 1.59/strings/ctype-gb2312.c	2006-03-23 14:29:27 +04:00
@@ -5651,7 +5651,7 @@
     return MY_CS_ILUNI;
   
   if (s+2>e)
-    return MY_CS_TOOSMALL;
+    return MY_CS_TOOSMALL2;
   
   code|=0x8080;
   s[0]=code>>8;
@@ -5668,7 +5668,7 @@
   hi=(int) s[0];
   
   if (s >= e)
-    return MY_CS_TOOFEW(0);
+    return MY_CS_TOOSMALL;
   
   if (hi<0x80)
   {
@@ -5677,10 +5677,10 @@
   }
   
   if (s+2>e)
-    return MY_CS_TOOFEW(0);
+    return MY_CS_TOOSMALL2;
   
   if (!(pwc[0]=func_gb2312_uni_onechar(((hi<<8)+s[1])&0x7F7F)))
-    return MY_CS_ILSEQ;
+    return -2;
   
   return 2;
 }

--- 1.59/strings/ctype-bin.c	2005-12-12 21:38:59 +04:00
+++ 1.60/strings/ctype-bin.c	2006-03-23 14:29:26 +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 */
   

--- 1.46/strings/ctype-ucs2.c	2005-12-12 21:39:18 +04:00
+++ 1.47/strings/ctype-ucs2.c	2006-03-23 14:29:28 +04:00
@@ -1352,11 +1352,48 @@
   return t_is_prefix ? (int) (t - te) : (int) ((se-s) - (te-t));
 }
 
-static int my_strnncollsp_ucs2_bin(CHARSET_INFO *cs, 
+static int my_strnncollsp_ucs2_bin(CHARSET_INFO *cs __attribute__((unused)), 
                                    const uchar *s, uint slen, 
                                    const uchar *t, uint tlen)
 {
-  return my_strnncoll_ucs2_bin(cs,s,slen,t,tlen,0);
+  const uchar *se, *te;
+  uint minlen;
+
+  /* extra safety to make sure the lengths are even numbers */
+  slen= (slen >> 1) << 1;
+  tlen= (tlen >> 1) << 1;
+
+  se= s + slen;
+  te= t + tlen;
+
+  for (minlen= min(slen, tlen); minlen; minlen-= 2)
+  {
+    int s_wc= s[0] * 256 + s[1];
+    int t_wc= t[0] * 256 + t[1];
+    if ( s_wc != t_wc )
+      return  s_wc > t_wc ? 1 : -1;
+
+    s+= 2;
+    t+= 2;
+  }
+
+  if (slen != tlen)
+  {
+    int swap= 1;
+    if (slen < tlen)
+    {
+      s= t;
+      se= te;
+      swap= -1;
+    }
+
+    for ( ; s < se ; s+= 2)
+    {
+      if (s[0] || s[1] != ' ')
+        return (s[0] == 0 && s[1] < ' ') ? -swap : swap;
+    }
+  }
+  return 0;
 }
 
 
Thread
bk commit into 4.1 tree (bar:1.2474)bar23 Mar