fixed delete segment files

This commit is contained in:
mirocow 2016-02-16 18:17:58 +04:00
parent 3dc75d5713
commit cf43e7931d
1 changed files with 5 additions and 5 deletions

View File

@ -116,13 +116,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/$BDD/$TABLE.txt.bz2" ]; then
f_log "> $TABLE"
bzip2 $DIR/$BDD/$TABLE.txt