]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/SQLProfile/SQLProfilePlugin.php
only run explain on selects
[quix0rs-gnu-social.git] / plugins / SQLProfile / SQLProfilePlugin.php
index 035c56c2806d4372e55c0ce3a72deef8f71b2d03..1e49d9005ee981aa87199f2841601c9b6eb16dfc 100644 (file)
@@ -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);