summaryrefslogtreecommitdiff
path: root/myisam/myisampack.c
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-03-22 14:03:42 +0200
committerunknown <monty@hundin.mysql.fi>2002-03-22 14:03:42 +0200
commite7d138ecc250ccae8ccc86f2e5b10d8cb0c9dec7 (patch)
tree41557706d9a6634dd90773de01ff3d7a12fd8d5f /myisam/myisampack.c
parentbb4c1bf5a42eccac2e04051c9147d733e18daf8d (diff)
downloadmariadb-git-e7d138ecc250ccae8ccc86f2e5b10d8cb0c9dec7.tar.gz
Fix for bug in WHERE key='j' or key='J'
Docs/manual.texi: Changelog myisam/myisampack.c: Delete tmp file on error. mysql-test/r/range.result: Updated test case mysql-test/t/range.test: Updated test case
Diffstat (limited to 'myisam/myisampack.c')
-rw-r--r--myisam/myisampack.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/myisam/myisampack.c b/myisam/myisampack.c
index 98fa8fcb377..81ae77738ea 100644
--- a/myisam/myisampack.c
+++ b/myisam/myisampack.c
@@ -251,7 +251,7 @@ static struct option long_options[] =
static void print_version(void)
{
- printf("%s Ver 1.11 for %s on %s\n",my_progname,SYSTEM_TYPE,MACHINE_TYPE);
+ printf("%s Ver 1.12 for %s on %s\n",my_progname,SYSTEM_TYPE,MACHINE_TYPE);
}
static void usage(void)
@@ -594,10 +594,7 @@ static int compress(PACK_MRG_INFO *mrg,char *result_table)
else
{
if (tmp_dir[0])
- {
- if (!(error=my_copy(new_name,org_name,MYF(MY_WME))))
- VOID(my_delete(new_name,MYF(MY_WME)));
- }
+ error=my_copy(new_name,org_name,MYF(MY_WME));
else
error=my_rename(new_name,org_name,MYF(MY_WME));
if (!error)
@@ -607,13 +604,8 @@ static int compress(PACK_MRG_INFO *mrg,char *result_table)
else
{
if (tmp_dir[0])
- {
-
- if (!(error=my_copy(new_name,org_name,
- MYF(MY_WME | MY_HOLD_ORIGINAL_MODES
- | MY_COPYTIME))))
- VOID(my_delete(new_name,MYF(MY_WME)));
- }
+ error=my_copy(new_name,org_name,
+ MYF(MY_WME | MY_HOLD_ORIGINAL_MODES | MY_COPYTIME));
else
error=my_redel(org_name,new_name,MYF(MY_WME | MY_COPYTIME));
}
@@ -627,6 +619,7 @@ static int compress(PACK_MRG_INFO *mrg,char *result_table)
if (error)
{
VOID(fprintf(stderr,"Aborting: %s is not compressed\n",org_name));
+ VOID(my_delete(new_name,MYF(MY_WME)));
DBUG_RETURN(-1);
}
if (write_loop || verbose)