MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
innodb_stats_comp_index.inc
1 --echo ===============
2 --echo Check the stats of the table
3 --echo Check the size of the ibd file
4 --echo ===============
5 
6 -- echo # testcase : pass = 1 fail = 0
7 SELECT count(*) > 0 as "compress_stat"
8 FROM information_schema.innodb_cmp_per_index
9 WHERE
10 compress_ops_ok BETWEEN @inl_val AND 1000
11 AND compress_ops BETWEEN @inl_val AND 1000
12 AND table_name='tab5' AND database_name='test'
13 AND index_name like 'idx%' ;
14 
15 perl;
16  my $dir = $ENV{'MYSQLD_DATADIR'}."test";
17  my $size;
18  opendir(DIR, $dir) or die $!;
19  while (my $file = readdir(DIR))
20  {
21 
22  next unless ($file =~ m/\.ibd$/);
23  $size = -s "$dir/$file";
24  print "The size of the tab5.ibd file: $size\n";
25  }
26  close(DIR);
27  exit(0)
28 EOF