Index: branches/5.2.x/core/kernel/utility/debugger.php =================================================================== diff -u -N -r15409 -r15435 --- branches/5.2.x/core/kernel/utility/debugger.php (.../debugger.php) (revision 15409) +++ branches/5.2.x/core/kernel/utility/debugger.php (.../debugger.php) (revision 15435) @@ -1,6 +1,6 @@ ProfilerData[$key]['subtitle'] = 'cachable'; } - if ( $func_arguments[7] ) { + if ( (string)$func_arguments[7] !== '' ) { $additional[] = Array ('name' => 'Server #', 'value' => $func_arguments[7]); } Index: branches/5.2.x/tools/debug_sample.php =================================================================== diff -u -N -r15409 -r15435 --- branches/5.2.x/tools/debug_sample.php (.../debug_sample.php) (revision 15409) +++ branches/5.2.x/tools/debug_sample.php (.../debug_sample.php) (revision 15435) @@ -1,6 +1,6 @@ defined('IS_INSTALL') && IS_INSTALL ? 0 : 1, // Profile SQL queries // 'DBG_SQL_EXPLAIN' => 1, // Explain every SQL query, that is retrieving data 'DBG_SQL_FAILURE' => isset($GLOBALS['pathtoroot']) && defined('IS_INSTALL') && IS_INSTALL ? 0 : 1, // treat sql errors as fatal errors except for installation process +// 'DBG_SQL_SERVERINFO' => 1, // Display database server info next each sql query in debugger 'DBG_SHOW_HTTPQUERY' => 1, // Show http query content (parsed user submit, GPC) 'DBG_SHOW_SESSIONDATA' => 1, // Show session data (at script finish) Index: branches/5.2.x/core/kernel/db/db_connection.php =================================================================== diff -u -N -r15338 -r15435 --- branches/5.2.x/core/kernel/db/db_connection.php (.../db_connection.php) (revision 15338) +++ branches/5.2.x/core/kernel/db/db_connection.php (.../db_connection.php) (revision 15435) @@ -1,6 +1,6 @@ serverInfoLine = $this->serverIndex . ' (' . $host . ')'; + } + + return parent::Connect($host, $user, $pass, $db, $force_new, $retry); + } + + /** * Queries db with $sql query supplied * and returns rows selected if any, false * otherwise. Optional parameter $key_field @@ -1100,7 +1131,7 @@ $first_cell = substr($first_cell, 0, 50) . ' ...'; } - $debugger->profileFinish('sql_' . $queryID, null, null, $this->getAffectedRows(), $first_cell, $this->_queryCount, $this->nextQueryCachable, $this->serverIndex); + $debugger->profileFinish('sql_' . $queryID, null, null, $this->getAffectedRows(), $first_cell, $this->_queryCount, $this->nextQueryCachable, $this->serverInfoLine); $debugger->profilerAddTotal('sql', 'sql_' . $queryID); $this->nextQueryCachable = false; } @@ -1113,7 +1144,7 @@ else { // set 2nd checkpoint: begin if ( $this->_profileSQLs ) { - $debugger->profileFinish('sql_' . $queryID, null, null, $this->getAffectedRows(), null, $this->_queryCount, $this->nextQueryCachable, $this->serverIndex); + $debugger->profileFinish('sql_' . $queryID, null, null, $this->getAffectedRows(), null, $this->_queryCount, $this->nextQueryCachable, $this->serverInfoLine); $debugger->profilerAddTotal('sql', 'sql_' . $queryID); $this->nextQueryCachable = false; } @@ -1170,7 +1201,7 @@ $first_cell = substr($first_cell, 0, 50) . ' ...'; } - $debugger->profileFinish('sql_' . $queryID, null, null, $this->getAffectedRows(), $first_cell, $this->_queryCount, $this->nextQueryCachable, $this->serverIndex); + $debugger->profileFinish('sql_' . $queryID, null, null, $this->getAffectedRows(), $first_cell, $this->_queryCount, $this->nextQueryCachable, $this->serverInfoLine); $debugger->profilerAddTotal('sql', 'sql_' . $queryID); $this->nextQueryCachable = false; } @@ -1181,7 +1212,7 @@ else { // set 2nd checkpoint: begin if ( $this->_profileSQLs ) { - $debugger->profileFinish('sql_' . $queryID, null, null, $this->getAffectedRows(), null, $this->_queryCount, $this->nextQueryCachable, $this->serverIndex); + $debugger->profileFinish('sql_' . $queryID, null, null, $this->getAffectedRows(), null, $this->_queryCount, $this->nextQueryCachable, $this->serverInfoLine); $debugger->profilerAddTotal('sql', 'sql_' . $queryID); $this->nextQueryCachable = false; }