fixed delete segment files

This commit is contained in:
mirocow 2016-02-16 18:19:38 +04:00
parent cf43e7931d
commit 60303b706f
1 changed files with 5 additions and 5 deletions

View File

@ -71,13 +71,13 @@ restore()
LOAD DATA LOCAL INFILE '$segment'
INTO TABLE $TABLE;
SET foreign_key_checks = 1; SET unique_checks = 1; SET sql_log_bin = 1;"
if [ -f "$segment" ]; then
f_log "Delete segment $segment"
rm "$segment"
fi
done
if [ -f "$segment" ]; then
f_log "Delete segment $segment"
rm "$segment"
fi
if [ ! -f "$DIR/$TABLE.txt.bz2" ]; then
f_log "> $TABLE"
bzip2 $DIR/$TABLE.txt