In case of insert/update/delete query, do not explain #888 (#903)

*workaround*
This commit is contained in:
Hiroshi Onozaki 2019-02-04 19:23:43 +09:00 committed by Barry vd. Heuvel
parent f0184766a9
commit ba046deba5
2 changed files with 5 additions and 4 deletions

View File

@ -143,7 +143,7 @@ return [
'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
],

View File

@ -70,9 +70,10 @@ class QueryCollector extends PDOCollector
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;
// }
}
/**