ss_get_mysql_stats.php converts 5.6 transaction and purged value from hexadecimal to decimal but these values are in decimal to begin with
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Monitoring Plugins |
Fix Released
|
Medium
|
Roman Vynar |
Bug Description
SHOW ENGINE INNODB STATUS on 5.5:
------------
TRANSACTIONS
------------
Trx id counter 69D8E
Purge done for trx's n:o < 69D8E undo n:o < 0
SHOW ENGINE INNODB STATUS on 5.6
------------
TRANSACTIONS
------------
Trx id counter 508056
Purge done for trx's n:o < 508056 undo n:o < 0 state: running but idle
Code:
# TRANSACTIONS
elseif ( strpos($line, 'Trx id counter') === 0 ) {
# The beginning of the TRANSACTIONS section: start counting
# transactions
# Trx id counter 0 1170664159
# Trx id counter 861B144C
$txn_seen = TRUE;
}
elseif ( strpos($line, 'Purge done for trx') === 0 ) {
# Purge done for trx's n:o < 0 1170663853 undo n:o < 0 0
# Purge done for trx's n:o < 861B135D undo n:o < 0
$purged_to = make_bigint(
= big_sub(
}
Modified to debug:
# TRANSACTIONS
elseif ( strpos($line, 'Trx id counter') === 0 ) {
# The beginning of the TRANSACTIONS section: start counting
# transactions
# Trx id counter 0 1170664159
# Trx id counter 861B144C
echo ("Row 3: ".strval(
echo ("Transaction No: ". make_bigint(
$txn_seen = TRUE;
}
elseif ( strpos($line, 'Purge done for trx') === 0 ) {
# Purge done for trx's n:o < 0 1170663853 undo n:o < 0 0
# Purge done for trx's n:o < 861B135D undo n:o < 0
$purged_to = make_bigint(
echo ("Purged to: ". $purged_to ."\n" );
= big_sub(
}
Test:
php ss_get_
Row 3: 69D8E
Transaction No: 433550
Purged to: 433550
php ss_get_
Row 3: 508056
Transaction No: 5275734
Purged to: 5275734
So, the second output of ss_get_
select conv('508056'
+------
| conv('508056'
+------
| 5275734 |
+------
1 row in set (0.00 sec)
tags: | added: i61665 |
Changed in percona-monitoring-plugins: | |
status: | Confirmed → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Roman Vynar (roman-vynar) |
Changed in percona-monitoring-plugins: | |
status: | In Progress → Fix Committed |
Changed in percona-monitoring-plugins: | |
status: | Fix Committed → Fix Released |
Verified.
With 5.5
------------
TRANSACTIONS
------------
Trx id counter E56834
Purge done for trx's n:o < E56833 undo n:o < 0
History list length 1729
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0, not started
MySQL thread id 9, OS thread handle 0x7ffff4184700, query id 133 localhost root
show engine innodb status
nilnandan. joshi@bm- support01: ~/percona- monitoring- plugins- 1.1.5/cacti/ scripts$ php ss_get_ mysql_stats. php --host 127.0.0.1 --user root --pass msandbox --port 5545 --items innodb_transactions --nocache
Row 3: E56834
Transaction No: 15034420
Purged to: 15034419
With 5.6
------------
TRANSACTIONS
------------
Trx id counter 230598
Purge done for trx's n:o < 230598 undo n:o < 0 state: running but idle
History list length 663
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0, not started
MySQL thread id 35, OS thread handle 0x7ffdbc0c7700, query id 800057 localhost root init
show engine innodb status
nilnandan. joshi@bm- support01: ~/percona- monitoring- plugins- 1.1.5/cacti/ scripts$ php ss_get_ mysql_stats. php --host 127.0.0.1 --user root --pass msandbox --port 5625 --items innodb_transactions --nocache
Row 3: 230598
Transaction No: 2295192
Purged to: 2295192
mysql> select conv('230598' ,16,10) ; ------- ------- --+ ,16,10) | ------- ------- --+ ------- ------- --+
+------
| conv('230598'
+------
| 2295192 |
+------
1 row in set (0.08 sec)
mysql>