From: Date: April 28 2005 10:49am Subject: bk commit into 4.1 tree (msvensson:1.2208) BUG#9911 List-Archive: http://lists.mysql.com/internals/24439 X-Bug: 9911 Message-Id: <20050428084922.C1C8725DF80@blaudden.homeip.net> Below is the list of changes that have just been committed into a local 4.1 repository of msvensson. When msvensson 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.2208 05/04/28 10:49:18 msvensson@neptunus.(none) +3 -0 BUG#9911 After review fixes - Remove ha_archive::rename_table and move the fix to handler::rename_table sql/handler.cc 1.163 05/04/28 10:49:15 msvensson@neptunus.(none) +9 -5 Fix handler::rename_table so it does not care about if the file to rename is missing sql/examples/ha_archive.h 1.12 05/04/28 10:49:15 msvensson@neptunus.(none) +0 -1 Remove ha_archive::rename_table sql/examples/ha_archive.cc 1.22 05/04/28 10:49:15 msvensson@neptunus.(none) +0 -24 Remove ha_archive::rename_table # 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: msvensson # Host: neptunus.(none) # Root: /home/msvensson/mysql/bug9911 --- 1.162/sql/handler.cc 2005-04-16 02:40:26 +02:00 +++ 1.163/sql/handler.cc 2005-04-28 10:49:15 +02:00 @@ -1255,13 +1255,17 @@ int handler::rename_table(const char * from, const char * to) { - DBUG_ENTER("handler::rename_table"); - for (const char **ext=bas_ext(); *ext ; ext++) + int error= 0; + for (const char **ext= bas_ext(); *ext ; ext++) { - if (rename_file_ext(from,to,*ext)) - DBUG_RETURN(my_errno); + if (rename_file_ext(from, to, *ext)) + { + if ((error=my_errno) != ENOENT) + break; + error= 0; + } } - DBUG_RETURN(0); + return error; } /* --- 1.21/sql/examples/ha_archive.cc 2005-04-26 11:35:50 +02:00 +++ 1.22/sql/examples/ha_archive.cc 2005-04-28 10:49:15 +02:00 @@ -427,30 +427,6 @@ { static const char *ext[]= { ARZ, ARN, ARM, NullS }; return ext; } -/* - Rename all files that this handler defines in bas_ext list - - NOTE Don't care if the .arn file is missing -*/ -int ha_archive::rename_table(const char * from, const char * to) -{ - DBUG_ENTER("ha_archive::rename_table"); - for (const char **ext=bas_ext(); *ext ; ext++) - { - if (rename_file_ext(from,to,*ext)) - { - if (my_errno == ENOENT && - !my_strcasecmp(system_charset_info, *ext, ARN)) - continue; - - DBUG_RETURN(my_errno); - } - - } - DBUG_RETURN(0); -} - - /* When opening a file we: Create/get our shared structure. --- 1.11/sql/examples/ha_archive.h 2005-04-26 11:35:50 +02:00 +++ 1.12/sql/examples/ha_archive.h 2005-04-28 10:49:15 +02:00 @@ -124,7 +124,6 @@ int optimize(THD* thd, HA_CHECK_OPT* check_opt); THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to, enum thr_lock_type lock_type); - int rename_table(const char * from, const char * to); }; bool archive_db_init(void);