mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
Added connection information to _debug_message.php.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9286 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
415bdcb357
commit
bebb46c072
2 changed files with 11 additions and 2 deletions
|
|
@ -63,6 +63,7 @@
|
|||
var $errno = 0; ///< error code (0 means no error)
|
||||
var $errstr = ''; ///< error message
|
||||
var $query = ''; ///< query string of latest executed query
|
||||
var $connection = '';
|
||||
var $elapsed_time = 0; ///< elapsed time of latest executed query
|
||||
var $elapsed_dbclass_time = 0; ///< elapsed time of latest executed query
|
||||
|
||||
|
|
@ -244,6 +245,7 @@
|
|||
|
||||
$log['query'] = $this->query;
|
||||
$log['elapsed_time'] = $elapsed_time;
|
||||
$log['connection'] = $this->connection;
|
||||
|
||||
// leave error log if an error occured (if __DEBUG_DB_OUTPUT__ is defined)
|
||||
if($this->isError()) {
|
||||
|
|
@ -614,6 +616,7 @@
|
|||
if($type == master){
|
||||
if(!$this->master_db['is_connected'])
|
||||
$this->_connect($type);
|
||||
$this->connection = 'Master ' . $this->master_db['db_hostname'];
|
||||
return $this->master_db["resource"];
|
||||
}
|
||||
|
||||
|
|
@ -622,6 +625,8 @@
|
|||
|
||||
if(!$this->slave_db[$indx]['is_connected'])
|
||||
$this->_connect($type, $indx);
|
||||
|
||||
$this->connection = 'Slave ' . $this->slave_db[$indx]['db_hostname'];
|
||||
return $this->slave_db[$indx]["resource"];
|
||||
}
|
||||
|
||||
|
|
@ -765,6 +770,9 @@
|
|||
$connection["resource"] = $result;
|
||||
$connection["is_connected"] = true;
|
||||
|
||||
// Save connection info for db logs
|
||||
$this->connection = ucfirst($type) . ' ' . $connection["db_hostname"];
|
||||
|
||||
$this->_afterConnect($result);
|
||||
}
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue