1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-13 04:04:12 +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

@@ -123,8 +123,7 @@ class mssqlnative extends \phpbb\db\driver\mssql_base
{
global $cache;
// EXPLAIN only in extra debug mode
if (defined('DEBUG'))
if ($this->debug_sql_explain)
{
$this->sql_report('start', $query);
}
@@ -146,7 +145,7 @@ class mssqlnative extends \phpbb\db\driver\mssql_base
// reset options for next query
$this->query_options = array();
if (defined('DEBUG'))
if ($this->debug_sql_explain)
{
$this->sql_report('stop', $query);
}
@@ -170,7 +169,7 @@ class mssqlnative extends \phpbb\db\driver\mssql_base
$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);
}