改进主从数据库的时候 开启事务始终操作主库

This commit is contained in:
thinkphp
2017-04-10 20:59:55 +08:00
parent 2be45bfd29
commit 513473b3cb

View File

@@ -927,7 +927,7 @@ abstract class Connection
{
if (!empty($this->config['deploy'])) {
// 采用分布式数据库
if ($master) {
if ($master || $this->transTimes) {
if (!$this->linkWrite) {
$this->linkWrite = $this->multiConnect(true);
}