MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Sergey Vojtovich Date:August 17 2006 4:28pm
Subject:bk commit into 4.1 tree (svoj:1.2528) BUG#19702
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 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@stripped, 2006-08-17 21:23:00+05:00, svoj@stripped +1 -0
  BUG#19702 - Using myisampack/myisamchk on a FULLTEXT indexed
              table results in table corrupt
  
  Fulltext key has always two keysegs, thus we need to update
  FT_SEGS (last) element from seg array in case of compressed table.
  Also we must update ft2_keyinfo.

  myisam/mi_packrec.c@stripped, 2006-08-17 21:22:57+05:00, svoj@stripped +14 -6
    Fulltext key has always two keysegs, thus we need to update
    FT_SEGS (last) element from seg array in case of compressed table.
    Also we must update ft2_keyinfo.

# 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:	may.pils.ru
# Root:	/home/svoj/devel/mysql/BUG19702/mysql-4.1

--- 1.28/myisam/mi_packrec.c	2006-08-17 21:28:26 +05:00
+++ 1.29/myisam/mi_packrec.c	2006-08-17 21:28:27 +05:00
@@ -16,7 +16,7 @@
 
 	/* Functions to compressed records */
 
-#include "myisamdef.h"
+#include "fulltext.h"
 
 #define IS_CHAR ((uint) 32768)		/* Bit if char (not offset) in tree */
 
@@ -228,11 +228,19 @@
   {
     for (i=0 ; i < share->base.keys ; i++)
     {
-      share->keyinfo[i].keylength+=(uint16) diff_length;
-      share->keyinfo[i].minlength+=(uint16) diff_length;
-      share->keyinfo[i].maxlength+=(uint16) diff_length;
-      share->keyinfo[i].seg[share->keyinfo[i].keysegs].length=
-	(uint16) rec_reflength;
+      MI_KEYDEF *keyinfo= &share->keyinfo[i];
+      keyinfo->keylength+= (uint16) diff_length;
+      keyinfo->minlength+= (uint16) diff_length;
+      keyinfo->maxlength+= (uint16) diff_length;
+      keyinfo->seg[keyinfo->flag & HA_FULLTEXT ?
+                   FT_SEGS : keyinfo->keysegs].length= (uint16) rec_reflength;
+    }
+    if (share->ft2_keyinfo.seg)
+    {
+      MI_KEYDEF *ft2_keyinfo= &share->ft2_keyinfo;
+      ft2_keyinfo->keylength+= (uint16) diff_length;
+      ft2_keyinfo->minlength+= (uint16) diff_length;
+      ft2_keyinfo->maxlength+= (uint16) diff_length;
     }
   }
 
Thread
bk commit into 4.1 tree (svoj:1.2528) BUG#19702Sergey Vojtovich17 Aug