~percona-toolkit-dev/percona-toolkit/fix-empty-table-bug-987393

« back to all changes in this revision

Viewing changes to t/pt-mysql-summary/format_overall_db_stats.sh

  • Committer: Daniel Nichter
  • Date: 2012-04-03 16:14:55 UTC
  • mfrom: (217.6.22 2.0.3)
  • Revision ID: daniel@percona.com-20120403161455-ntv33vju9o6njtqv
Merge summary-tools-2.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash
2
 
 
3
 
TESTS=2
4
 
TMPDIR=$TEST_TMPDIR
5
 
 
6
 
cat <<EOF > $TMPDIR/expected
7
 
 
8
 
  Database Tables Views SPs Trigs Funcs   FKs Partn
9
 
  mysql        17                                  
10
 
  sakila       17     7   3     6     3    22     1
11
 
 
12
 
  Database MyISAM InnoDB
13
 
  mysql        17       
14
 
  sakila        2     15
15
 
 
16
 
  Database BTREE FULLTEXT
17
 
  mysql       24         
18
 
  sakila      63        1
19
 
 
20
 
             c   t   s   e   t   s   i   t   b   l   b   v   d   y   d   m
21
 
             h   i   e   n   i   m   n   e   l   o   i   a   a   e   e   e
22
 
             a   m   t   u   n   a   t   x   o   n   g   r   t   a   c   d
23
 
             r   e       m   y   l       t   b   g   i   c   e   r   i   i
24
 
                 s           i   l               b   n   h   t       m   u
25
 
                 t           n   i               l   t   a   i       a   m
26
 
                 a           t   n               o       r   m       l   i
27
 
                 m               t               b           e           n
28
 
                 p                                                       t
29
 
  Database === === === === === === === === === === === === === === === ===
30
 
  mysql     38   5   5  69   2   3  16   2   4   1   2                    
31
 
  sakila     1  15   1   3  19  26   3   4   1          45   4   1   7   2
32
 
 
33
 
EOF
34
 
format_overall_db_stats samples/mysql-schema-001.txt > $TMPDIR/got
35
 
no_diff $TMPDIR/got $TMPDIR/expected
36
 
 
37
 
 
38
 
cat <<EOF > $TMPDIR/expected
39
 
 
40
 
  Database Tables Views SPs Trigs Funcs   FKs Partn
41
 
  {chosen}      1                                  
42
 
 
43
 
  Database InnoDB
44
 
  {chosen}      1
45
 
 
46
 
  Database BTREE
47
 
  {chosen}     2
48
 
 
49
 
             t   v
50
 
             i   a
51
 
             n   r
52
 
             y   c
53
 
             i   h
54
 
             n   a
55
 
             t   r
56
 
  Database === ===
57
 
  {chosen}   1   1
58
 
 
59
 
EOF
60
 
format_overall_db_stats samples/mysql-schema-002.txt > $TMPDIR/got
61
 
no_diff $TMPDIR/got $TMPDIR/expected