Switched off load balancing
authorniekt0 <niekt0@kyberia.cz>
Fri, 22 Oct 2010 14:37:17 +0000 (16:37 +0200)
committerHarvie <tomas@mudrunka.cz>
Sun, 24 Oct 2010 01:43:04 +0000 (03:43 +0200)
wwwroot/inc/database.inc

index 53f698d5588c649bc8a6b65644ba3ec369cff10d..815f03fa66ce54e810d0ec2d29b44895ff9dfc68 100644 (file)
@@ -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);
 
This page took 0.095587 seconds and 4 git commands to generate.