summaryrefslogtreecommitdiff
path: root/sql/sql_db.cc
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-12-06 01:54:17 +0200
committerunknown <monty@donna.mysql.com>2000-12-06 01:54:17 +0200
commit7bdbe353f8faaafe7b3aa0fde23ba328fe641d31 (patch)
tree48459cdee327cbd4422e9b2c74f5472a1f1aa1b7 /sql/sql_db.cc
parentca1c47067cda61666d531991c0be771444bbc14d (diff)
downloadmariadb-git-7bdbe353f8faaafe7b3aa0fde23ba328fe641d31.tar.gz
Added innobase handler files + other updates for innobase
Docs/manual.texi: Changelog client/mysql.cc: Added optional argument to --i-am-a-dummy sql/handler.cc: Fix for innobase sql/handler.h: Fix for innobase sql/sql_class.cc: Fix for innobase sql/sql_db.cc: Fixed that DROP DATABASE works on OS/2
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r--sql/sql_db.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index 85732863732..4ac78a9853e 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -182,6 +182,7 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *path,
char newpath[FN_REFLEN];
MY_DIR *new_dirp;
strxmov(newpath,path,"/",file->name,NullS);
+ unpack_filename(newpath,newpath);
if ((new_dirp = my_dir(newpath,MYF(MY_DONT_SORT))))
{
DBUG_PRINT("my",("New subdir found: %s", newpath));
@@ -199,6 +200,7 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *path,
continue;
}
strxmov(filePath,path,"/",file->name,NullS);
+ unpack_filename(filePath,filePath);
if (my_delete(filePath,MYF(MY_WME)))
{
net_printf(&thd->net,ER_DB_DROP_DELETE,filePath,my_error);
@@ -223,6 +225,8 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *path,
if (!found_other_files)
{
#ifdef HAVE_READLINK
+ char tmp_path[FN_REFLEN];
+ path=unpack_filename(tmp_path,path);
int linkcount = readlink(path,filePath,sizeof(filePath)-1);
if (linkcount > 0) // If the path was a symbolic link
{
@@ -238,6 +242,10 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *path,
path=filePath;
}
#endif
+ /* Remove last FN_LIBCHAR to not cause a probelm on OS/2 */
+ char *pos=strend(path);
+ if (pos > path && pos[-1] == FN_LIBCHAR)
+ *--pos=0;
/* Don't give errors if we can't delete 'RAID' directory */
if (rmdir(path) < 0 && !level)
{