List:Commits« Previous MessageNext Message »
From:bar Date:January 13 2006 12:39pm
Subject:bk commit into 5.0 tree (bar:1.2013)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 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.2013 06/01/13 16:39:33 bar@stripped +3 -0
  Merge mysql.com:/usr/home/bar/mysql-4.1.b15377
  into  mysql.com:/usr/home/bar/mysql-5.0

  strings/ctype-gb2312.c
    1.62 06/01/13 16:39:24 bar@stripped +0 -0
    Auto merged

  strings/ctype-euc_kr.c
    1.65 06/01/13 16:39:24 bar@stripped +0 -0
    Auto merged

  ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
    1.80 06/01/13 16:39:24 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-5.0/RESYNC

--- 1.64/strings/ctype-euc_kr.c	2005-10-13 19:09:55 +05:00
+++ 1.65/strings/ctype-euc_kr.c	2006-01-13 16:39:24 +04:00
@@ -8635,6 +8635,41 @@
 }
 
 
+/*
+  Returns well formed length of a EUC-KR string.
+*/
+static uint
+my_well_formed_len_euckr(CHARSET_INFO *cs __attribute__((unused)),
+                         const char *b, const char *e,
+                         uint pos, int *error)
+{
+  const char *b0= b;
+  const char *emb= e - 1; /* Last possible end of an MB character */
+
+  *error= 0;
+  while (pos-- && b < e)
+  {
+    if ((uchar) b[0] < 128)
+    {
+      /* Single byte ascii character */
+      b++;
+    }
+    else  if (b < emb && iseuc_kr(*b) && iseuc_kr(b[1]))
+    {
+      /* Double byte character */
+      b+= 2;
+    }
+    else
+    {
+      /* Wrong byte sequence */
+      *error= 1;
+      break;
+    }
+  }
+  return (uint) (b - b0);
+}
+
+
 static MY_COLLATION_HANDLER my_collation_ci_handler =
 {
   NULL,			/* init */
@@ -8657,7 +8692,7 @@
   mbcharlen_euc_kr,
   my_numchars_mb,
   my_charpos_mb,
-  my_well_formed_len_mb,
+  my_well_formed_len_euckr,
   my_lengthsp_8bit,
   my_numcells_8bit,
   my_mb_wc_euc_kr,	/* mb_wc   */

--- 1.61/strings/ctype-gb2312.c	2005-10-13 19:10:00 +05:00
+++ 1.62/strings/ctype-gb2312.c	2006-01-13 16:39:24 +04:00
@@ -5686,6 +5686,41 @@
 }
 
 
+/*
+  Returns well formed length of a EUC-KR string.
+*/
+static uint
+my_well_formed_len_gb2312(CHARSET_INFO *cs __attribute__((unused)),
+                          const char *b, const char *e,
+                          uint pos, int *error)
+{
+  const char *b0= b;
+  const char *emb= e - 1; /* Last possible end of an MB character */
+
+  *error= 0;
+  while (pos-- && b < e)
+  {
+    if ((uchar) b[0] < 128)
+    {
+      /* Single byte ascii character */
+      b++;
+    }
+    else  if (b < emb && isgb2312head(*b) && isgb2312tail(b[1]))
+    {
+      /* Double byte character */
+      b+= 2;
+    }
+    else
+    {
+      /* Wrong byte sequence */
+      *error= 1;
+      break;
+    }
+  }
+  return (uint) (b - b0);
+}
+
+
 static MY_COLLATION_HANDLER my_collation_ci_handler =
 {
   NULL,			/* init */
@@ -5708,7 +5743,7 @@
   mbcharlen_gb2312,
   my_numchars_mb,
   my_charpos_mb,
-  my_well_formed_len_mb,
+  my_well_formed_len_gb2312,
   my_lengthsp_8bit,
   my_numcells_8bit,
   my_mb_wc_gb2312,	/* mb_wc      */
Thread
bk commit into 5.0 tree (bar:1.2013)bar13 Jan