diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-01-02 21:57:22 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-01-02 21:57:22 +0200 |
commit | 016caa3d202ee1f020ff84613b345c8f3bacdce3 (patch) | |
tree | 0d146b64709becc47a89359615555ae16102fede /mysql-test/include | |
parent | 7e4c185c774cabaa1912760e143d9385ce959eea (diff) | |
parent | 51e4650ed0644ed88cf5d542bd0cab50e7ea0343 (diff) | |
download | mariadb-git-016caa3d202ee1f020ff84613b345c8f3bacdce3.tar.gz |
Merge 10.0 into 10.1
Diffstat (limited to 'mysql-test/include')
-rw-r--r-- | mysql-test/include/truncate_file.inc | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/mysql-test/include/truncate_file.inc b/mysql-test/include/truncate_file.inc index 2326d6c0b94..fe88cb05bd9 100644 --- a/mysql-test/include/truncate_file.inc +++ b/mysql-test/include/truncate_file.inc @@ -1,16 +1,11 @@ # truncate a giving file, all contents of the file are be cleared -if (!$file) +if (!$TRUNCATE_FILE) { - --echo Please assign a file name to $file!! - exit; + die TRUNCATE_FILE is not set; } -let TRUNCATE_FILE= $file; - perl; -use Env; -Env::import('TRUNCATE_FILE'); -open FILE, '>', $TRUNCATE_FILE || die "Can not open file $file"; +open FILE, '>', $ENV{TRUNCATE_FILE} or die "open(>$ENV{TRUNCATE_FILE}): $!"; close FILE; EOF |