mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-11 05:29:30 +00:00
Merge fix-dl-ts-bug-1195034.
This commit is contained in:
@@ -4804,6 +4804,11 @@ sub parse_deadlocks {
|
|||||||
|
|
||||||
# Extract some miscellaneous data from the deadlock.
|
# Extract some miscellaneous data from the deadlock.
|
||||||
my ( $ts ) = $dl_text =~ m/^$s$/m;
|
my ( $ts ) = $dl_text =~ m/^$s$/m;
|
||||||
|
if ( !$ts ) {
|
||||||
|
# https://bugs.launchpad.net/percona-toolkit/+bug/1195034
|
||||||
|
# 130624 17:39:24TOO DEEP OR LONG SEARCH IN THE LOCK TABLE ...
|
||||||
|
($ts) = $dl_text =~ m/^${s}TOO DEEP/m;
|
||||||
|
}
|
||||||
my ( $year, $mon, $day, $hour, $min, $sec ) = $ts =~ m/^((?:\d\d)?\d\d)-?(\d\d)-?(\d\d) +(\d+):(\d+):(\d+)$/;
|
my ( $year, $mon, $day, $hour, $min, $sec ) = $ts =~ m/^((?:\d\d)?\d\d)-?(\d\d)-?(\d\d) +(\d+):(\d+):(\d+)$/;
|
||||||
if ( length($year) == 2 ) {
|
if ( length($year) == 2 ) {
|
||||||
$year += 2000;
|
$year += 2000;
|
||||||
|
@@ -15,6 +15,8 @@ use PerconaTest;
|
|||||||
use Sandbox;
|
use Sandbox;
|
||||||
require "$trunk/bin/pt-deadlock-logger";
|
require "$trunk/bin/pt-deadlock-logger";
|
||||||
|
|
||||||
|
use Data::Dumper;
|
||||||
|
|
||||||
# #############################################################################
|
# #############################################################################
|
||||||
# https://bugs.launchpad.net/percona-toolkit/+bug/903443
|
# https://bugs.launchpad.net/percona-toolkit/+bug/903443
|
||||||
# pt-deadlock-logger crashes on MySQL 5.5
|
# pt-deadlock-logger crashes on MySQL 5.5
|
||||||
@@ -119,6 +121,21 @@ is_deeply(
|
|||||||
"Bug 1082104: pt-deadlock-logger shows host as user when the username has a dash in the name",
|
"Bug 1082104: pt-deadlock-logger shows host as user when the username has a dash in the name",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
# #############################################################################
|
||||||
|
# https://bugs.launchpad.net/percona-toolkit/+bug/1195034
|
||||||
|
# pt-deadlock-logger error: Use of uninitialized value $ts in pattern match
|
||||||
|
# #############################################################################
|
||||||
|
|
||||||
|
$innodb_status_sample = load_file("t/pt-deadlock-logger/samples/bug_1195034.txt");
|
||||||
|
my $deadlocks = pt_deadlock_logger::parse_deadlocks($innodb_status_sample);
|
||||||
|
|
||||||
|
is_deeply(
|
||||||
|
$deadlocks,
|
||||||
|
{
|
||||||
|
},
|
||||||
|
"Bug 1195034: TOO DEEP OR LONG SEARCH IN THE LOCK TABLE WAITS-FOR GRAPH"
|
||||||
|
) or diag(Dumper($deadlocks));
|
||||||
|
|
||||||
# #############################################################################
|
# #############################################################################
|
||||||
# Done.
|
# Done.
|
||||||
# #############################################################################
|
# #############################################################################
|
||||||
|
14
t/pt-deadlock-logger/samples/bug_1195034.txt
Normal file
14
t/pt-deadlock-logger/samples/bug_1195034.txt
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
------------------------
|
||||||
|
LATEST DETECTED DEADLOCK
|
||||||
|
------------------------
|
||||||
|
130624 17:39:24TOO DEEP OR LONG SEARCH IN THE LOCK TABLE WAITS-FOR GRAPH, WE WILL ROLL BACK FOLLOWING TRANSACTION
|
||||||
|
|
||||||
|
*** TRANSACTION:
|
||||||
|
TRANSACTION 3BF88F886, ACTIVE 0 sec setting auto-inc lock
|
||||||
|
mysql tables in use 1, locked 1
|
||||||
|
1 lock struct(s), heap size 376, 0 row lock(s)
|
||||||
|
MySQL thread id 23512694, OS thread handle 0x5055b940, query id 734303798 10.10.10.1 host update
|
||||||
|
INSERT INTO gr_v3_response_log (query_key, time_received, time_to_respond, status, raw_response, api_host, api_path, api_client) VALUES ('...
|
||||||
|
*** WAITING FOR THIS LOCK TO BE GRANTED:
|
||||||
|
TABLE LOCK table `db`.`gr_v3_response_log` trx id 3BF88F886 lock mode AUTO-INC waiting
|
Reference in New Issue
Block a user