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)
|
function onStartDBQuery($obj, $query, &$result)
|
||||||
{
|
{
|
||||||
if (!$this->recursionGuard) {
|
if (!$this->recursionGuard && preg_match('/\bselect\b/i', $query)) {
|
||||||
$this->recursionGuard = true;
|
$this->recursionGuard = true;
|
||||||
$xobj = clone($obj);
|
$xobj = clone($obj);
|
||||||
$explain = $xobj->query('EXPLAIN ' . $query);
|
$explain = $xobj->query('EXPLAIN ' . $query);
|
||||||
|
Loading…
Reference in New Issue
Block a user