summaryrefslogtreecommitdiff
path: root/it_dbi.class
diff options
context:
space:
mode:
authorUrban Müller2024-11-20 17:03:27 +0100
committerUrban Müller2024-11-20 17:03:27 +0100
commitdef7eaac8fc47b8e68b630a9530ed363cf159171 (patch)
tree211c1fbdad3d3af3dc514657a919ea4f8d4d0725 /it_dbi.class
parentbbc77d9fe769fe06f9669d234e634a8672bd2a37 (diff)
downloaditools-def7eaac8fc47b8e68b630a9530ed363cf159171.tar.gz
itools-def7eaac8fc47b8e68b630a9530ed363cf159171.tar.bz2
itools-def7eaac8fc47b8e68b630a9530ed363cf159171.zip
test tables are not replicated, local writes allowed (mail0367)
Diffstat (limited to 'it_dbi.class')
-rw-r--r--it_dbi.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/it_dbi.class b/it_dbi.class
index 12a4ef1..a82f356 100644
--- a/it_dbi.class
+++ b/it_dbi.class
@@ -569,7 +569,7 @@ function query($query, $p = array())
$this->_p['server'] = $p['server'] = $p['server_update'];
unset($this->_p['server_update'], $p['server_update'], $this->_link);
}
- else if ($p['server'] == "localhost" && $p['db'] == $GLOBALS['ULTRADB'] && preg_grep('/replicate-do/', (array)@it::file($GLOBALS['ULTRAHOME'] . "/etc/my.cnf")))
+ else if ($p['server'] == "localhost" && $p['db'] == $GLOBALS['ULTRADB'] && !it::match('^test_', $GLOBALS['ULTRADB']) && preg_grep('/replicate-do/', (array)@it::file($GLOBALS['ULTRAHOME'] . "/etc/my.cnf")))
if (($t = @it::file($GLOBALS['ULTRAHOME'] . "/doc/machines.txt")) && preg_grep("/^" . gethostname() . "/", array_slice($t, 2)))
it::error("local mysql write on a replication slave machine?");
}