MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
vardir_size_check.inc
1 --echo Check the size of the vardir
2 --echo The output size is in unit blocks
3 perl;
4 #!/usr/bin/perl
5 use warnings;
6 use strict;
7 use File::Find;
8 my $dir = $ENV{'MYSQLTEST_VARDIR'};
9 my $size = 0;
10 find( sub { $size += -f $_ ? -s _ : 0 }, $dir );
11 
12 if ( $size < 1717987000 )
13  { print "TRUE", "\n";}
14 else
15  { print "FALSE $size", "\n";}
16 
17 
18 ## Expected size for the VAR dir being changed for the PB2 runs
19 
20 ##if ( $size =~ /^496[\d]{5}$/ )
21 ## {
22 ## { print "TRUE", "\n";}
23 ## }
24 ##else
25 ## { print "FALSE $size", "\n";}
26 EOF