1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fixed memory leak with RAID tables

Fixed tests for RAID tables
Detect uninitialized mutexes on lock and destroy
This commit is contained in:
monty@mysql.com
2003-11-21 14:41:57 +02:00
parent 19b5da3247
commit d08945498e
6 changed files with 82 additions and 21 deletions

View File

@ -440,7 +440,6 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *db,
char filePath[FN_REFLEN];
TABLE_LIST *tot_list=0, **tot_list_next;
List<String> raid_dirs;
DBUG_ENTER("mysql_rm_known_files");
DBUG_PRINT("enter",("path: %s", org_path));
@ -516,17 +515,24 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *db,
deleted++;
}
}
List_iterator<String> it(raid_dirs);
String *dir;
if (thd->killed ||
(tot_list && mysql_rm_table_part2_with_lock(thd, tot_list, 1, 0, 1)))
{
/* Free memory for allocated raid dirs */
while ((dir= it++))
delete dir;
my_dirend(dirp);
DBUG_RETURN(-1);
}
List_iterator<String> it(raid_dirs);
String *dir;
while ((dir= it++))
{
if (rmdir(dir->c_ptr()) < 0)
found_other_files++;
delete dir;
}
my_dirend(dirp);
/*