summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-08-15 12:37:45 -0700
committerunknown <jimw@mysql.com>2005-08-15 12:37:45 -0700
commit96153160d95f83f9bb0e237f5607fabda4441e21 (patch)
treea82f8fdfe2f9d907eddaa4718eac8f87481e47b3 /myisam
parentf5c4ce0e648c0ab89943648a2995737ac2f3bf8f (diff)
parentaf93f4432eb6e4cafc4911aeb5f453ff0130403b (diff)
downloadmariadb-git-96153160d95f83f9bb0e237f5607fabda4441e21.tar.gz
Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into mysql.com:/home/jimw/my/mysql-5.0-clean myisam/myisampack.c: Auto merged mysql-test/r/metadata.result: Auto merged mysys/list.c: Auto merged mysys/thr_lock.c: Auto merged sql-common/client.c: Auto merged sql/sql_parse.cc: Auto merged sql/sql_test.cc: Auto merged sql/mysqld.cc: SCCS merged
Diffstat (limited to 'myisam')
-rw-r--r--myisam/myisampack.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/myisam/myisampack.c b/myisam/myisampack.c
index ba48cbf1b62..b3937ab9607 100644
--- a/myisam/myisampack.c
+++ b/myisam/myisampack.c
@@ -695,14 +695,22 @@ static int compress(PACK_MRG_INFO *mrg,char *result_table)
else
error=my_rename(new_name,org_name,MYF(MY_WME));
if (!error)
+ {
VOID(my_copystat(temp_name,org_name,MYF(MY_COPYTIME)));
+ if (tmp_dir[0])
+ VOID(my_delete(new_name,MYF(MY_WME)));
+ }
}
}
else
{
if (tmp_dir[0])
+ {
error=my_copy(new_name,org_name,
MYF(MY_WME | MY_HOLD_ORIGINAL_MODES | MY_COPYTIME));
+ if (!error)
+ VOID(my_delete(new_name,MYF(MY_WME)));
+ }
else
error=my_redel(org_name,new_name,MYF(MY_WME | MY_COPYTIME));
}