diff --git a/bin/pt-mysql-summary b/bin/pt-mysql-summary index 815d2571..94039a76 100755 --- a/bin/pt-mysql-summary +++ b/bin/pt-mysql-summary @@ -2096,10 +2096,9 @@ section_innodb () { local bp_dirt="$(get_var Innodb_buffer_pool_pages_dirty "$status_file")" local bp_fill=$((${bp_pags} - ${bp_free})) - local mysql_version=$(get_var version "$variables_file" | awk -F'-' '{print $1}') - local transaction_isolation_var="tx_isolation" - if [ "$mysql_version" '>' "5.7.19" ]; then # true if version >= 5.7.20 - transaction_isolation_var="transaction_isolation" + local transaction_isolation_var="transaction_isolation" + if [ "$version" '<' "5.7.20" ]; then # false if version >= 5.7.20 + transaction_isolation_var="tx_isolation" fi name_val "Buffer Pool Fill" "$(fuzzy_pct ${bp_fill} ${bp_pags})" diff --git a/lib/bash/report_mysql_info.sh b/lib/bash/report_mysql_info.sh index d6a5df73..79315b2f 100644 --- a/lib/bash/report_mysql_info.sh +++ b/lib/bash/report_mysql_info.sh @@ -1016,10 +1016,9 @@ section_innodb () { local bp_fill=$((${bp_pags} - ${bp_free})) # dynamically allocate variable name - transaction_isolation - local mysql_version=$(get_var version "$variables_file" | awk -F'-' '{print $1}') - local transaction_isolation_var="tx_isolation" - if [ "$mysql_version" '>' "5.7.19" ]; then # true if version >= 5.7.20 - transaction_isolation_var="transaction_isolation" + local transaction_isolation_var="transaction_isolation" + if [ "$version" '<' "5.7.20" ]; then # false if version >= 5.7.20 + transaction_isolation_var="tx_isolation" fi name_val "Buffer Pool Fill" "$(fuzzy_pct ${bp_fill} ${bp_pags})" diff --git a/t/pt-mysql-summary/samples/expected_output_temp_enc008.txt b/t/pt-mysql-summary/samples/expected_output_temp_enc008.txt index d080fcc1..c8b560ee 100644 --- a/t/pt-mysql-summary/samples/expected_output_temp_enc008.txt +++ b/t/pt-mysql-summary/samples/expected_output_temp_enc008.txt @@ -259,7 +259,7 @@ Specify --databases or --all-databases to dump and summarize schemas Thread Concurrency | 0 Concurrency Tickets | 5000 Commit Concurrency | 0 - Txn Isolation Level | + Txn Isolation Level | REPEATABLE-READ Adaptive Flushing | ON Adaptive Checkpoint | Checkpoint Age | 69k diff --git a/t/pt-mysql-summary/samples/expected_output_temp_enc009.txt b/t/pt-mysql-summary/samples/expected_output_temp_enc009.txt index ec502f21..ff0763f9 100644 --- a/t/pt-mysql-summary/samples/expected_output_temp_enc009.txt +++ b/t/pt-mysql-summary/samples/expected_output_temp_enc009.txt @@ -264,7 +264,7 @@ Specify --databases or --all-databases to dump and summarize schemas Thread Concurrency | 0 Concurrency Tickets | 5000 Commit Concurrency | 0 - Txn Isolation Level | + Txn Isolation Level | REPEATABLE-READ Adaptive Flushing | ON Adaptive Checkpoint | Checkpoint Age | 0