mysql/community-mysql-5.6.13-truncate-file.patch

22 lines
806 B
Diff
Raw Normal View History

2013-10-09 15:55:08 +00:00
Unneccesary use of Env module in Perl code in a test
Code used Env just to get the value of a single environment variable,
causing the test to fail on systems which does not have this
installed. This use is overkill, can easily be replaced by standard
access via the ENV hash.
diff -up mysql-test/include/truncate_file.inc.orig mysql-test/include/truncate_file.inc
--- mysql-test/include/truncate_file.inc.orig 2013-08-23 12:25:33.216534033 +0200
+++ mysql-test/include/truncate_file.inc 2013-08-23 12:15:34.583327832 +0200
@@ -9,8 +9,7 @@ if (!$file)
let TRUNCATE_FILE= $file;
perl;
-use Env;
-Env::import('TRUNCATE_FILE');
-open FILE, '>', $TRUNCATE_FILE || die "Can not open file $file";
+my $file= $ENV{'TRUNCATE_FILE'};
+open FILE, '>', $file || die "Can not open file $file";
close FILE;
EOF