List:Commits« Previous MessageNext Message »
From:Sergey Vojtovich Date:March 29 2010 2:52pm
Subject:bzr commit into mysql-5.1-bugteam branch (svoj:3431) Bug#40980
View as plain text  
#At file:///home/svoj/devel/bzr-mysql/mysql-5.1-bugteam-bug40980/ based on revid:li-bing.song@stripped

 3431 Sergey Vojtovich	2010-03-29
      BUG#40980 - Drop table can remove another MyISAM table's
                  data and index files
      
      It was possible if DATA/INDEX DIRECTORY is pointing to
      symlinked MySQL data home directory.
      
      Do not allow to drop data/index files implicitly symlinked
      to data home directory.
     @ storage/myisam/mi_delete_table.c
        Do not allow to drop data/index files implicitly symlinked
        to data home directory.

    modified:
      storage/myisam/mi_delete_table.c
=== modified file 'storage/myisam/mi_delete_table.c'
--- a/storage/myisam/mi_delete_table.c	2006-12-31 00:32:21 +0000
+++ b/storage/myisam/mi_delete_table.c	2010-03-29 14:52:06 +0000
@@ -58,9 +58,14 @@ int mi_delete_table(const char *name)
 #endif /* USE_RAID */
 
   fn_format(from,name,"",MI_NAME_IEXT,MY_UNPACK_FILENAME|MY_APPEND_EXT);
+  if (my_is_symlink(from) && (*myisam_test_invalid_symlink)(from))
+    DBUG_RETURN(my_errno= HA_WRONG_CREATE_OPTION);
   if (my_delete_with_symlink(from, MYF(MY_WME)))
     DBUG_RETURN(my_errno);
+
   fn_format(from,name,"",MI_NAME_DEXT,MY_UNPACK_FILENAME|MY_APPEND_EXT);
+  if (my_is_symlink(from) && (*myisam_test_invalid_symlink)(from))
+    DBUG_RETURN(my_errno= HA_WRONG_CREATE_OPTION);
 #ifdef USE_RAID
   if (raid_type)
     DBUG_RETURN(my_raid_delete(from, raid_chunks, MYF(MY_WME)) ? my_errno : 0);


Attachment: [text/bzr-bundle] bzr/svoj@sun.com-20100329145206-ez75xj26rov0oe91.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (svoj:3431) Bug#40980Sergey Vojtovich29 Mar