Skip to content

Commit

Permalink
In case of insert/update/delete query, do not explain #888 (#903)
Browse files Browse the repository at this point in the history
*workaround*
  • Loading branch information
hrs-o authored and barryvdh committed Feb 4, 2019
1 parent f018476 commit ba046de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/debugbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
'timeline' => false, // Add the queries to the timeline
'explain' => [ // Show EXPLAIN output on queries
'enabled' => false,
'types' => ['SELECT'], // ['SELECT', 'INSERT', 'UPDATE', 'DELETE']; for MySQL 5.6.3+
'types' => ['SELECT'], // // workaround ['SELECT'] only. https://github.com/barryvdh/laravel-debugbar/issues/888 ['SELECT', 'INSERT', 'UPDATE', 'DELETE']; for MySQL 5.6.3+
],
'hints' => true, // Show hints for common mistakes
],
Expand Down
7 changes: 4 additions & 3 deletions src/DataCollector/QueryCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@ public function setFindSource($value, array $middleware)
public function setExplainSource($enabled, $types)
{
$this->explainQuery = $enabled;
if($types){
$this->explainTypes = $types;
}
// workaround ['SELECT'] only. https://github.com/barryvdh/laravel-debugbar/issues/888
// if($types){
// $this->explainTypes = $types;
// }
}

/**
Expand Down

0 comments on commit ba046de

Please sign in to comment.