Skip to content

Commit ba046de

Browse files
hrs-obarryvdh
authored andcommitted
In case of insert/update/delete query, do not explain barryvdh#888 (barryvdh#903)
*workaround*
1 parent f018476 commit ba046de

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

config/debugbar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
'timeline' => false, // Add the queries to the timeline
144144
'explain' => [ // Show EXPLAIN output on queries
145145
'enabled' => false,
146-
'types' => ['SELECT'], // ['SELECT', 'INSERT', 'UPDATE', 'DELETE']; for MySQL 5.6.3+
146+
'types' => ['SELECT'], // // workaround ['SELECT'] only. https://github.com/barryvdh/laravel-debugbar/issues/888 ['SELECT', 'INSERT', 'UPDATE', 'DELETE']; for MySQL 5.6.3+
147147
],
148148
'hints' => true, // Show hints for common mistakes
149149
],

src/DataCollector/QueryCollector.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,10 @@ public function setFindSource($value, array $middleware)
7070
public function setExplainSource($enabled, $types)
7171
{
7272
$this->explainQuery = $enabled;
73-
if($types){
74-
$this->explainTypes = $types;
75-
}
73+
// workaround ['SELECT'] only. https://github.com/barryvdh/laravel-debugbar/issues/888
74+
// if($types){
75+
// $this->explainTypes = $types;
76+
// }
7677
}
7778

7879
/**

0 commit comments

Comments
 (0)