mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-23 12:47:56 +00:00
Parse InnoDB_trx_id as a string.
This commit is contained in:
@@ -9,7 +9,7 @@ BEGIN {
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use English qw(-no_match_vars);
|
||||
use Test::More tests => 80;
|
||||
use Test::More tests => 81;
|
||||
|
||||
use QueryRewriter;
|
||||
use EventAggregator;
|
||||
@@ -1906,6 +1906,24 @@ cmp_ok(
|
||||
"Saved no more than 1_000 CRCs"
|
||||
);
|
||||
|
||||
# #############################################################################
|
||||
# Bug 821694: pt-query-digest doesn't recognize hex InnoDB txn IDs
|
||||
# #############################################################################
|
||||
$ea = new EventAggregator(
|
||||
groupby => 'arg',
|
||||
worst => 'Query_time',
|
||||
unroll_limit => 5,
|
||||
type_for => {
|
||||
'InnoDB_trx_id' => 'string',
|
||||
},
|
||||
);
|
||||
parse_file('t/lib/samples/slowlogs/slow054.txt', $p, $ea);
|
||||
is(
|
||||
$ea->{result_classes}->{'SELECT * FROM foo WHERE id=1'}->{InnoDB_trx_id}->{cnt},
|
||||
8,
|
||||
"Parse InnoDB_trx_id as string"
|
||||
);
|
||||
|
||||
# #############################################################################
|
||||
# Done.
|
||||
# #############################################################################
|
||||
|
32
t/lib/samples/slowlogs/slow054.txt
Normal file
32
t/lib/samples/slowlogs/slow054.txt
Normal file
@@ -0,0 +1,32 @@
|
||||
# Time: 110208 12:00:01
|
||||
# Query_time: 0.000012 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
|
||||
# InnoDB_trx_id: 101
|
||||
SELECT * FROM foo WHERE id=1;
|
||||
# Time: 110208 12:00:01
|
||||
# Query_time: 0.000012 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
|
||||
# InnoDB_trx_id: 102
|
||||
SELECT * FROM foo WHERE id=1;
|
||||
# Time: 110208 12:00:01
|
||||
# Query_time: 0.000012 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
|
||||
# InnoDB_trx_id: 103
|
||||
SELECT * FROM foo WHERE id=1;
|
||||
# Time: 110208 12:00:01
|
||||
# Query_time: 0.000012 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
|
||||
# InnoDB_trx_id: 104
|
||||
SELECT * FROM foo WHERE id=1;
|
||||
# Time: 110208 12:00:01
|
||||
# Query_time: 0.000012 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
|
||||
# InnoDB_trx_id: 105
|
||||
SELECT * FROM foo WHERE id=1;
|
||||
# Time: 110208 12:00:01
|
||||
# Query_time: 0.000012 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
|
||||
# InnoDB_trx_id: 106
|
||||
SELECT * FROM foo WHERE id=1;
|
||||
# Time: 110208 12:00:01
|
||||
# Query_time: 0.000012 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
|
||||
# InnoDB_trx_id: A07
|
||||
SELECT * FROM foo WHERE id=1;
|
||||
# Time: 110208 12:00:01
|
||||
# Query_time: 0.000012 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
|
||||
# InnoDB_trx_id: A08
|
||||
SELECT * FROM foo WHERE id=1;
|
Reference in New Issue
Block a user