We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 0e7a2838 authored by Brion Vibber's avatar Brion Vibber

only run explain on selects

parent 0535a3d1
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment