From: Jon Olav Hauglid Date: November 15 2010 9:49am Subject: bzr commit into mysql-5.5-runtime branch (jon.hauglid:3184) Bug#57663 List-Archive: http://lists.mysql.com/commits/123860 X-Bug: 57663 Message-Id: <201011150951.oAF9pU1g025649@acsinet15.oracle.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0177410531076327601==" --===============0177410531076327601== MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline #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 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 it(raid_dirs); - String *dir; - while ((dir= it++)) - if (rmdir(dir->c_ptr()) < 0) - found_other_files++; - } my_dirend(dirp); if (dropped_tables) --===============0177410531076327601== MIME-Version: 1.0 Content-Type: text/bzr-bundle; charset="us-ascii"; name="bzr/jon.hauglid@stripped" Content-Transfer-Encoding: 7bit Content-Disposition: inline # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: jon.hauglid@stripped # target_branch: file:///export/home/x/mysql-5.5-runtime-prereq/ # testament_sha1: 6d2a02a3e2bfefe287be52f46652f5298a0047e7 # timestamp: 2010-11-15 10:49:36 +0100 # source_branch: file:///export/home/x/mysql-5.5-bugfixing/ # base_revision_id: kostja@stripped # # Begin bundle IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWVNW/9MAAbFfgECQWeP/935U 3Iq////wUAQmr1urXcOiydWBKJpEYp5GTKemIGiZI0GyZE0aGTZQEpE01TxiGmoGSABoNGgAAABk QNTQTCp+mSn5SbKZANAGnqADR+qDmATATIwAjExMJhMENMTTASSRpoBMp6RpiA9TEDQGgAABiTdN cNH6fveVlPYqRZLsYPUVUJLHrhfazuOagRk8cpeeMtnKdUVU/Pm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