Skip to content

Commit

Permalink
ConnectionPanel: bypasses SqlPreprocessor for explain to avoid double…
Browse files Browse the repository at this point in the history
… processing [Closes #259]
  • Loading branch information
dg committed Jul 10, 2020
1 parent b45e33a commit 1f457f6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Bridges/DatabaseTracy/ConnectionPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ public function getTab(): string

public function getPanel(): ?string
{
$this->disabled = true;
if (!$this->count) {
return null;
}
Expand All @@ -125,7 +124,7 @@ public function getPanel(): ?string
if (!$error && $this->explain && $command === 'select') {
try {
$cmd = is_string($this->explain) ? $this->explain : 'EXPLAIN';
$explain = $connection->queryArgs("$cmd $sql", $params)->fetchAll();
$explain = (new Nette\Database\ResultSet($connection, "$cmd $sql", $params))->fetchAll();
} catch (\PDOException $e) {
}
}
Expand Down

0 comments on commit 1f457f6

Please sign in to comment.