#At file:///export/home/x/mysql-5.5-runtime-prereq/ based on revid:kostja@stripped
3184 Jon Olav Hauglid 2010-11-15
Bug #57663 Concurrent statement using stored function and DROP DATABASE
breaks SBR
This pre-requisite patch removes obsolete and dead code used to remove
raid subdirctories and files during DROP DATABASE code.
Other parts of the raid code have already been removed in WL#5498.
modified:
sql/sql_db.cc
=== modified file 'sql/sql_db.cc'
--- a/sql/sql_db.cc 2010-11-12 12:56:21 +0000
+++ b/sql/sql_db.cc 2010-11-15 09:49:31 +0000
@@ -932,8 +932,7 @@ exit:
}
/*
- Removes files with known extensions plus all found subdirectories that
- are 2 hex digits (raid directories).
+ Removes files with known extensions.
thd MUST be set when calling this function!
*/
@@ -945,7 +944,6 @@ static long mysql_rm_known_files(THD *th
ulong found_other_files=0;
char filePath[FN_REFLEN];
TABLE_LIST *tot_list=0, **tot_list_next_local, **tot_list_next_global;
- List<String> raid_dirs;
DBUG_ENTER("mysql_rm_known_files");
DBUG_PRINT("enter",("path: %s", org_path));
@@ -964,36 +962,7 @@ static long mysql_rm_known_files(THD *th
(file->name[1] == '.' && !file->name[2])))
continue;
- /* Check if file is a raid directory */
- if ((my_isdigit(system_charset_info, file->name[0]) ||
- (file->name[0] >= 'a' && file->name[0] <= 'f')) &&
- (my_isdigit(system_charset_info, file->name[1]) ||
- (file->name[1] >= 'a' && file->name[1] <= 'f')) &&
- !file->name[2] && !level)
- {
- char newpath[FN_REFLEN], *copy_of_path;
- MY_DIR *new_dirp;
- String *dir;
- uint length;
-
- strxmov(newpath,org_path,"/",file->name,NullS);
- length= unpack_filename(newpath,newpath);
- if ((new_dirp = my_dir(newpath,MYF(MY_DONT_SORT))))
- {
- DBUG_PRINT("my",("New subdir found: %s", newpath));
- if ((mysql_rm_known_files(thd, new_dirp, NullS, newpath,1,0)) < 0)
- goto err;
- if (!(copy_of_path= (char*) thd->memdup(newpath, length+1)) ||
- !(dir= new (thd->mem_root) String(copy_of_path, length,
- &my_charset_bin)) ||
- raid_dirs.push_back(dir))
- goto err;
- continue;
- }
- found_other_files++;
- continue;
- }
- else if (file->name[0] == 'a' && file->name[1] == 'r' &&
+ if (file->name[0] == 'a' && file->name[1] == 'r' &&
file->name[2] == 'c' && file->name[3] == '\0')
{
/* .frm archive:
@@ -1075,14 +1044,6 @@ static long mysql_rm_known_files(THD *th
(tot_list && mysql_rm_table_part2(thd, tot_list, 1, 0, 1, 1)))
goto err;
- /* Remove RAID directories */
- {
- List_iterator<String> it(raid_dirs);
- String *dir;
- while ((dir= it++))
- if (rmdir(dir->c_ptr()) < 0)
- found_other_files++;
- }
my_dirend(dirp);
if (dropped_tables)
Attachment: [text/bzr-bundle] bzr/jon.hauglid@oracle.com-20101115094931-ttdznsfiqms0w0gb.bundle