summaryrefslogtreecommitdiff
path: root/sql/sql_db.cc
diff options
context:
space:
mode:
authorunknown <acurtis@pcgem.rdg.cyberkinetica.com>2004-11-10 15:07:11 +0000
committerunknown <acurtis@pcgem.rdg.cyberkinetica.com>2004-11-10 15:07:11 +0000
commitc52a4685698e9c630d97075d898294185fb91883 (patch)
treede1fa1728e015b8f24570971ae1ceb8920b875d4 /sql/sql_db.cc
parent0ffae6f6985c32b39f11e075eeb3c7572c220e7e (diff)
downloadmariadb-git-c52a4685698e9c630d97075d898294185fb91883.tar.gz
Bug#6031 - To drop database you have to execute DROP DATABASE command twice.
DROP DATABASE failed because of file ext not in TYPELIB of known extensions. General solution - construct a TYPELIB at runtime instead of a static list. mysql-test/r/ndb_basic.result: Bug#6031 New test for bug mysql-test/t/ndb_basic.test: Bug#6031 New test for bug sql/ha_ndbcluster.cc: Cosmetic fix sql/handler.cc: Bug#6031 New function - ha_known_exts() We can construct TYPELIB of known db file extensions. sql/handler.h: Bug#6031 New function - ha_known_exts() sql/sql_db.cc: Bug#6031 We use a constructed list of known extensions instead of a static list
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r--sql/sql_db.cc7
1 files changed, 1 insertions, 6 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index e50796f2a33..350a7432990 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -30,11 +30,6 @@ const char *del_exts[]= {".frm", ".BAK", ".TMD",".opt", NullS};
static TYPELIB deletable_extentions=
{array_elements(del_exts)-1,"del_exts", del_exts, NULL};
-const char *known_exts[]=
-{".ISM",".ISD",".ISM",".MRG",".MYI",".MYD",".db", ".ibd", NullS};
-static TYPELIB known_extentions=
-{array_elements(known_exts)-1,"known_exts", known_exts, NULL};
-
static long mysql_rm_known_files(THD *thd, MY_DIR *dirp,
const char *db, const char *path,
uint level);
@@ -737,7 +732,7 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *db,
extension= fn_ext(file->name);
if (find_type(extension, &deletable_extentions,1+2) <= 0)
{
- if (find_type(extension, &known_extentions,1+2) <= 0)
+ if (find_type(extension, ha_known_exts(),1+2) <= 0)
found_other_files++;
continue;
}