diff options
author | unknown <holyfoot/hf@mysql.com/deer.(none)> | 2006-09-25 16:44:53 +0500 |
---|---|---|
committer | unknown <holyfoot/hf@mysql.com/deer.(none)> | 2006-09-25 16:44:53 +0500 |
commit | fe9f7980b7cb848c10368137d0c05dca2044f3d2 (patch) | |
tree | 768b7191e2bd33c795921a2f7d677a880bfe11b0 | |
parent | 54bb1045ca5fdcba99c3f8f8dfcb6a7139917614 (diff) | |
parent | feb9cc2f156de97233f345730a22c82ae51a0827 (diff) | |
download | mariadb-git-fe9f7980b7cb848c10368137d0c05dca2044f3d2.tar.gz |
Merge mysql.com:/home/hf/work/mysql-4.1.15428
into mysql.com:/home/hf/work/mysql-5.0-mrg
myisam/mi_check.c:
Auto merged
mysys/my_chsize.c:
Auto merged
-rw-r--r-- | myisam/mi_check.c | 9 | ||||
-rw-r--r-- | mysys/my_chsize.c | 4 |
2 files changed, 9 insertions, 4 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c index a3195ebce7f..5a81d221d2a 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -1370,7 +1370,8 @@ int mi_repair(MI_CHECK *param, register MI_INFO *info, param->temp_filename); goto err; } - if (filecopy(param,new_file,info->dfile,0L,new_header_length, + if (new_header_length && + filecopy(param,new_file,info->dfile,0L,new_header_length, "datafile-header")) goto err; info->s->state.dellink= HA_OFFSET_ERROR; @@ -2072,7 +2073,8 @@ int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info, param->temp_filename); goto err; } - if (filecopy(param, new_file,info->dfile,0L,new_header_length, + if (new_header_length && + filecopy(param, new_file,info->dfile,0L,new_header_length, "datafile-header")) goto err; if (param->testflag & T_UNPACK) @@ -2440,7 +2442,8 @@ int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info, param->temp_filename); goto err; } - if (filecopy(param, new_file,info->dfile,0L,new_header_length, + if (new_header_length && + filecopy(param, new_file,info->dfile,0L,new_header_length, "datafile-header")) goto err; if (param->testflag & T_UNPACK) diff --git a/mysys/my_chsize.c b/mysys/my_chsize.c index 9760de29a08..fe0d0ffa607 100644 --- a/mysys/my_chsize.c +++ b/mysys/my_chsize.c @@ -46,7 +46,9 @@ int my_chsize(File fd, my_off_t newlength, int filler, myf MyFlags) DBUG_PRINT("my",("fd: %d length: %lu MyFlags: %d",fd,(ulong) newlength, MyFlags)); - oldsize = my_seek(fd, 0L, MY_SEEK_END, MYF(MY_WME+MY_FAE)); + if ((oldsize = my_seek(fd, 0L, MY_SEEK_END, MYF(MY_WME+MY_FAE))) == newlength) + DBUG_RETURN(0); + DBUG_PRINT("info",("old_size: %ld", (ulong) oldsize)); if (oldsize > newlength) |