diff options
author | Brion Vibber <brion@pobox.com> | 2010-12-17 12:08:46 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-12-17 12:08:46 -0800 |
commit | 0e7a283883bc82ca2dfa5426c254caf7d749252c (patch) | |
tree | 3b7ec5ac37ff84fbf8def4d9c7da0f2bfeed402f | |
parent | 0535a3d15c08cd847299e15df7a707b6658c6480 (diff) |
only run explain on selects
-rw-r--r-- | plugins/SQLProfile/SQLProfilePlugin.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/SQLProfile/SQLProfilePlugin.php b/plugins/SQLProfile/SQLProfilePlugin.php index 035c56c28..1e49d9005 100644 --- a/plugins/SQLProfile/SQLProfilePlugin.php +++ b/plugins/SQLProfile/SQLProfilePlugin.php @@ -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); |