Lose dependency on File::Slurp append_file and prepend_file

This commit is contained in:
Brian Fraser fraserb@gmail.com
2012-11-12 10:37:13 -03:00
parent 31ca347984
commit d63fd536f0

View File

@@ -443,13 +443,12 @@ SKIP: {
# Truncate the .myi file to corrupt it
truncate($myi, 4096);
use File::Slurp qw( prepend_file append_file write_file );
use File::Slurp qw( write_file );
# Corrupt the .frm file
open my $urand_fh, q{<}, "/dev/urandom"
or die "Cannot open /dev/urandom";
prepend_file($frm, scalar(<$urand_fh>));
append_file($frm, scalar(<$urand_fh>));
write_file($frm, scalar(<$urand_fh>), slurp_file($frm), scalar(<$urand_fh>));
close $urand_fh;
$dbh3->do("FLUSH TABLES");