MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:ramil Date:April 26 2005 10:43am
Subject:bk commit into 5.0 tree (ramil:1.1887) BUG#9756
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of ram. When ram 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.1887 05/04/26 15:43:20 ramil@stripped +1 -0
  A fix (bug #9756: mysql client failing on dumps containing certain \ sequences).

  mysys/charset.c
    1.137 05/04/26 15:43:15 ramil@stripped +7 -7
    A fix (bug #9756: mysql client failing on dumps containing certain \ sequences).
    As 'to_end' points to the last position we should use '>' comparison 
    instead of '>=' there.
    'l' replaced with 'tmp_length' (in order not to mix 'l' with '1').

# 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:	ramil
# Host:	gw.mysql.r18.ru
# Root:	/usr/home/ram/work/mysql-5.0

--- 1.136/mysys/charset.c	2005-03-17 15:27:29 +04:00
+++ 1.137/mysys/charset.c	2005-04-26 15:43:15 +05:00
@@ -581,15 +581,15 @@
   {
     char escape=0;
 #ifdef USE_MB
-    int l;
-    if (use_mb_flag && (l= my_ismbchar(charset_info, from, end)))
+    int tmp_length;
+    if (use_mb_flag && (tmp_length= my_ismbchar(charset_info, from, end)))
     {
-      if (to + l >= to_end)
+      if (to + tmp_length > to_end)
       {
         overflow=1;
         break;
       }
-      while (l--)
+      while (tmp_length--)
 	*to++= *from++;
       from--;
       continue;
@@ -605,7 +605,7 @@
      multi-byte character into a valid one. For example, 0xbf27 is not
      a valid GBK character, but 0xbf5c is. (0x27 = ', 0x5c = \)
     */
-    if (use_mb_flag && (l= my_mbcharlen(charset_info, *from)) > 1)
+    if (use_mb_flag && (tmp_length= my_mbcharlen(charset_info, *from)) > 1)
       escape= *from;
     else
 #endif
@@ -634,7 +634,7 @@
     }
     if (escape)
     {
-      if (to + 2 >= to_end)
+      if (to + 2 > to_end)
       {
         overflow=1;
         break;
@@ -644,7 +644,7 @@
     }
     else
     {
-      if (to + 1 >= to_end)
+      if (to + 1 > to_end)
       {
         overflow=1;
         break;
Thread
bk commit into 5.0 tree (ramil:1.1887) BUG#9756ramil26 Apr