mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Merge bk@192.168.21.1:mysql-4.1-opt
into mysql.com:/home/hf/work/mysql-4.1.15428
This commit is contained in:
@@ -1366,7 +1366,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;
|
||||
@@ -2063,7 +2064,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)
|
||||
@@ -2431,7 +2433,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)
|
||||
|
||||
@@ -44,7 +44,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)
|
||||
|
||||
Reference in New Issue
Block a user