List:Commits« Previous MessageNext Message »
From:ingo Date:March 7 2007 4:30pm
Subject:bk commit into 5.1 tree (istruewing:1.2468) BUG#26782
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of istruewing. When istruewing 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, 2007-03-07 16:30:13+01:00, istruewing@stripped +1 -0
  Bug#26782 - Patch: myisamchk -rq creates .MYI.MYI file
              on packed MyISAM tables
  
  When fixing the indexes with "myisamchk -rq" after compressing
  the table with "myisampack", an optionally supplied extension
  ".MYI" of the index file was not detected. The extension was
  appended unconditionally. The result was ".MYI.MYI".
  
  Now an extension is no longer appended if present already.
  Thanks to David Shrewsbury for providing this patch.
  
  Another problem was a misplaced parenthesis. We did never unpack
  the file name ("~/..") and always returned a real path.
  
  No test case. This is manually tested with the utilities
  "myisampack" and "myisamchk".

  storage/myisam/mi_create.c@stripped, 2007-03-07 16:30:10+01:00, istruewing@stripped +5
-3
    Bug#26782 - Patch: myisamchk -rq creates .MYI.MYI file
                on packed MyISAM tables
    Added code to detect existing extension on index file name.
    Thanks to David Shrewsbury for providing this patch.
    Additionally fixed an parenthesis. We did never unpack
    the file name and always returned real path.

# 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:	istruewing
# Host:	chilla.local
# Root:	/home/mydev/mysql-5.1-bug26782

--- 1.66/storage/myisam/mi_create.c	2007-03-07 16:30:21 +01:00
+++ 1.67/storage/myisam/mi_create.c	2007-03-07 16:30:21 +01:00
@@ -599,10 +599,12 @@ int mi_create(const char *name,uint keys
   }
   else
   {
+    char *iext= strrchr(name, '.');
+    int have_iext= iext && !strcmp(iext, MI_NAME_IEXT);
     fn_format(filename, name, "", MI_NAME_IEXT,
-              (MY_UNPACK_FILENAME |
-               (flags & HA_DONT_TOUCH_DATA) ? MY_RETURN_REAL_PATH : 0) |
-                MY_APPEND_EXT);
+              MY_UNPACK_FILENAME |
+              ((flags & HA_DONT_TOUCH_DATA) ? MY_RETURN_REAL_PATH : 0) |
+              (have_iext ? MY_REPLACE_EXT : MY_APPEND_EXT));
     linkname_ptr=0;
     /* Replace the current file */
     create_flag=MY_DELETE_OLD;
Thread
bk commit into 5.1 tree (istruewing:1.2468) BUG#26782ingo7 Mar