mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-08 07:08:57 +00:00
Merge pull request #721 from oblitorum/PT-2277_impossible_on_condition
PT-2277 - fix pt-visual-explain for 'Impossible ON condition' case
This commit is contained in:
@@ -330,7 +330,7 @@ sub transform {
|
||||
# Dispatch to a class method to generate the tree.
|
||||
# ##################################################################
|
||||
my $no_matching_row = join('|',
|
||||
"Impossible (?:WHERE|HAVING)(?: noticed after reading const tables)?",
|
||||
"Impossible (?:WHERE|HAVING|ON)(?: noticed after reading const tables| condition)?",
|
||||
'No matching.*row',
|
||||
'(?:unique|const) row not found',
|
||||
);
|
||||
@@ -499,6 +499,13 @@ sub ref_or_null {
|
||||
|
||||
sub const {
|
||||
my ( $self, $row ) = @_;
|
||||
if ( !$row->{key} ) {
|
||||
return {
|
||||
type => 'Constant table access',
|
||||
rows => $row->{rows},
|
||||
children => [$self->table($row)]
|
||||
}
|
||||
}
|
||||
return $self->index_access($row, 'Constant index lookup');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user