only run explain on selects
This commit is contained in:
parent
0535a3d15c
commit
0e7a283883
@ -45,7 +45,7 @@ class SQLProfilePlugin extends Plugin
|
||||
|
||||
function onStartDBQuery($obj, $query, &$result)
|
||||
{
|
||||
if (!$this->recursionGuard) {
|
||||
if (!$this->recursionGuard && preg_match('/\bselect\b/i', $query)) {
|
||||
$this->recursionGuard = true;
|
||||
$xobj = clone($obj);
|
||||
$explain = $xobj->query('EXPLAIN ' . $query);
|
||||
|
Loading…
Reference in New Issue
Block a user