MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Sergey Vojtovich Date:April 27 2006 7:51am
Subject:bk commit into 5.0 tree (svoj:1.2099) BUG#17810
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of svoj. When svoj 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.2099 06/04/27 12:51:33 svoj@april.(none) +1 -0
  BUG#17810 - REPAIR says ok, CHECK says broken (repeatable)
  
  Write operations on tables created in 4.x with index on variable
  length column results in index crash. Even REPAIR TABLE wasn't able
  to fix broken index.
  
  Problem was that packed key length size wasn't restored correctly.
  In 5.0 packed key length size is either 1 or 2. In 4.x this length
  is always 2, but is saved as 0.
  
  This fix ensures that key length size is restored correctly for 4.x
  tables.

  myisam/mi_key.c
    1.49 06/04/27 12:51:29 svoj@april.(none) +1 -1
    Ensure that pack_length is either 1 or 2 (compatibility with 4.x).

# 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:	svoj
# Host:	april.(none)
# Root:	/home/svoj/devel/mysql/BUG17810/mysql-5.0

--- 1.48/myisam/mi_key.c	2006-03-10 18:04:04 +04:00
+++ 1.49/myisam/mi_key.c	2006-04-27 12:51:29 +05:00
@@ -127,7 +127,7 @@
     }
     if (keyseg->flag & HA_VAR_LENGTH_PART)
     {
-      uint pack_length= keyseg->bit_start;
+      uint pack_length= (keyseg->bit_start == 1 ? 1 : 2);
       uint tmp_length= (pack_length == 1 ? (uint) *(uchar*) pos :
                         uint2korr(pos));
       pos+= pack_length;			/* Skip VARCHAR length */
Thread
bk commit into 5.0 tree (svoj:1.2099) BUG#17810Sergey Vojtovich27 Apr