- Added a fix to allow that master and slave database in a multiserver setup can reached on the same mysql hostname.
| | |
| | | if we are in a multiserver setup |
| | | */ |
| | | |
| | | if($conf['dbmaster_host'] != '' && $conf['dbmaster_host'] != $conf['db_host']) { |
| | | if($conf['dbmaster_host'] != '' && ($conf['dbmaster_host'] != $conf['db_host'] || ($conf['dbmaster_host'] == $conf['db_host'] && $conf['dbmaster_database'] != $conf['db_database']))) { |
| | | $this->dbmaster = new db; |
| | | if($this->dbmaster->linkId) $this->dbmaster->closeConn(); |
| | | $this->dbmaster->dbHost = $conf['dbmaster_host']; |
| | |
| | | global $app,$conf; |
| | | |
| | | //* If its a multiserver setup |
| | | if($app->db->dbHost != $app->dbmaster->dbHost) { |
| | | if($app->db->dbHost != $app->dbmaster->dbHost || ($app->db->dbHost == $app->dbmaster->dbHost && $app->db->dbName != $app->dbmaster->dbName)) { |
| | | if($conf['mirror_server_id'] > 0) { |
| | | $sql = "SELECT * FROM sys_datalog WHERE datalog_id > ".$conf['last_datalog_id']." AND (server_id = ".$conf['server_id']." OR server_id = ".$conf['mirror_server_id']." OR server_id = 0) ORDER BY datalog_id"; |
| | | } else { |