1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-01 22:40:39 +02:00

[ticket/12627] Add debug.sql_explain parameter

PHPBB3-12627
This commit is contained in:
Jakub Senko
2018-06-18 20:42:16 +02:00
parent 1d0046437b
commit bdff0f5590
14 changed files with 57 additions and 30 deletions

View File

@@ -173,8 +173,7 @@ class postgres extends \phpbb\db\driver\driver
{
global $cache;
// EXPLAIN only in extra debug mode
if (defined('DEBUG'))
if ($this->debug_sql_explain)
{
$this->sql_report('start', $query);
}
@@ -194,7 +193,7 @@ class postgres extends \phpbb\db\driver\driver
$this->sql_error($query);
}
if (defined('DEBUG'))
if ($this->debug_sql_explain)
{
$this->sql_report('stop', $query);
}
@@ -218,7 +217,7 @@ class postgres extends \phpbb\db\driver\driver
$this->open_queries[(int) $this->query_result] = $this->query_result;
}
}
else if (defined('DEBUG'))
else if ($this->debug_sql_explain)
{
$this->sql_report('fromcache', $query);
}