summaryrefslogtreecommitdiffstats
path: root/mysql-test/include/truncate_file.inc
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/include/truncate_file.inc')
-rw-r--r--mysql-test/include/truncate_file.inc11
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/include/truncate_file.inc b/mysql-test/include/truncate_file.inc
new file mode 100644
index 00000000..fe88cb05
--- /dev/null
+++ b/mysql-test/include/truncate_file.inc
@@ -0,0 +1,11 @@
+# truncate a giving file, all contents of the file are be cleared
+
+if (!$TRUNCATE_FILE)
+{
+ die TRUNCATE_FILE is not set;
+}
+
+perl;
+open FILE, '>', $ENV{TRUNCATE_FILE} or die "open(>$ENV{TRUNCATE_FILE}): $!";
+close FILE;
+EOF