tbrehm
2012-02-10 472bc938874596c78d52f10dd1e590cbb32e38ff
- Added a fix to allow that master and slave database in a multiserver setup can reached on the same mysql hostname.
2 files modified
4 ■■■■ changed files
server/lib/app.inc.php 2 ●●● patch | view | raw | blame | history
server/lib/classes/modules.inc.php 2 ●●● patch | view | raw | blame | history
server/lib/app.inc.php
@@ -54,7 +54,7 @@
                    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'];
server/lib/classes/modules.inc.php
@@ -83,7 +83,7 @@
        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 {