From: niekt0 Date: Fri, 22 Oct 2010 14:37:17 +0000 (+0200) Subject: Switched off load balancing X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=c6f21b69e8210bdd0e80cf87f1c2f06dfc848a75;p=mirrors%2FKyberia-bloodline.git Switched off load balancing --- diff --git a/wwwroot/inc/database.inc b/wwwroot/inc/database.inc index 53f698d..815f03f 100644 --- a/wwwroot/inc/database.inc +++ b/wwwroot/inc/database.inc @@ -65,7 +65,7 @@ function query($sql) { // if (preg_match("/^select/i",$sql) && (rand(0,1000)>MASTER2SLAVE) && $this->Master) { // every select query goes to onyx + opraveny regexp, aby matchoval vnorene selecty (br) - if (preg_match('/^\(?select/i',$sql) && $this->Master) { +/* if (preg_match('/^\(?select/i',$sql) && $this->Master) { $this->_linkId = false; $this->connect(SLAVE_HOST,SLAVE_USER,SLAVE_PASS,SLAVE_DATABASE); $this->Master = false; @@ -73,10 +73,10 @@ function query($sql) { } elseif (!preg_match("/^select/i",$sql) && !$this->Master) { - $this->_linkId = false; +*/ $this->_linkId = false; $this->connect(DB_HOST,DB_USER,DB_PASS,DB_DATABASE); $this->Master = true; - } +// } $this->_queryId = mysql_query($sql,$this->_linkId);