diff options
author | Chad MILLER <chad@mysql.com> | 2008-12-17 15:01:34 -0500 |
---|---|---|
committer | Chad MILLER <chad@mysql.com> | 2008-12-17 15:01:34 -0500 |
commit | 926e5f6694d1bb1dd5b8074efd526fd8983b620f (patch) | |
tree | 14bfefa872195990d45ab8f3ee850730cd31ed1b /sql/sql_db.cc | |
parent | 27d35e3517a063c9259a0f8b9638bf3073cf020b (diff) | |
parent | 4d1a042df0c52fd7c721313ec84d39e2b2c0a2f6 (diff) | |
download | mariadb-git-926e5f6694d1bb1dd5b8074efd526fd8983b620f.tar.gz |
Merged from 5.0 (enterprise).
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r-- | sql/sql_db.cc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc index e25ede1be03..c3cf7429222 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -35,7 +35,7 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *db, const char *path, uint level, TABLE_LIST **dropped_tables); -static long mysql_rm_arc_files(THD *thd, MY_DIR *dirp, const char *org_path); +long mysql_rm_arc_files(THD *thd, MY_DIR *dirp, const char *org_path); static my_bool rm_dir_w_symlink(const char *org_path, my_bool send_error); /* Database options hash */ static HASH dboptions; @@ -906,7 +906,10 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *db, else if (file->name[0] == 'a' && file->name[1] == 'r' && file->name[2] == 'c' && file->name[3] == '\0') { - /* .frm archive */ + /* .frm archive: + Those archives are obsolete, but following code should + exist to remove existent "arc" directories. + */ char newpath[FN_REFLEN]; MY_DIR *new_dirp; strxmov(newpath, org_path, "/", "arc", NullS); @@ -1061,9 +1064,12 @@ static my_bool rm_dir_w_symlink(const char *org_path, my_bool send_error) RETURN > 0 number of removed files -1 error + + NOTE + A support of "arc" directories is obsolete, however this + function should exist to remove existent "arc" directories. */ -static long mysql_rm_arc_files(THD *thd, MY_DIR *dirp, - const char *org_path) +long mysql_rm_arc_files(THD *thd, MY_DIR *dirp, const char *org_path) { long deleted= 0; ulong found_other_files= 0; @@ -1105,6 +1111,7 @@ static long mysql_rm_arc_files(THD *thd, MY_DIR *dirp, { goto err; } + deleted++; } if (thd->killed) goto err; |