mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-10 13:11:32 +00:00
pt-mysql-summary 2.0
This commit is contained in:
30
t/pt-mysql-summary/table_cache.sh
Normal file
30
t/pt-mysql-summary/table_cache.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
TEST=3
|
||||
TMPDIR=$TEST_TMPDIR
|
||||
|
||||
touch $TMPDIR/table_cache_tests
|
||||
|
||||
is \
|
||||
$(get_table_cache "$TMPDIR/table_cache_tests") \
|
||||
0 \
|
||||
"0 if neither table_cache nor table_open_cache are present"
|
||||
|
||||
cat <<EOF > $TMPDIR/table_cache_tests
|
||||
table_cache 5
|
||||
table_open_cache 4
|
||||
EOF
|
||||
|
||||
is \
|
||||
$(get_table_cache "$TMPDIR/table_cache_tests") \
|
||||
4 \
|
||||
"If there's a table_open_cache present, uses that"
|
||||
|
||||
cat <<EOF > $TMPDIR/table_cache_tests
|
||||
table_cache 5
|
||||
EOF
|
||||
|
||||
is \
|
||||
$(get_table_cache "$TMPDIR/table_cache_tests") \
|
||||
5 \
|
||||
"Otherwise, defaults to table_cache"
|
Reference in New Issue
Block a user