mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-09 08:02:48 +08:00
改进主从数据库的时候 开启事务始终操作主库
This commit is contained in:
@@ -927,7 +927,7 @@ abstract class Connection
|
|||||||
{
|
{
|
||||||
if (!empty($this->config['deploy'])) {
|
if (!empty($this->config['deploy'])) {
|
||||||
// 采用分布式数据库
|
// 采用分布式数据库
|
||||||
if ($master) {
|
if ($master || $this->transTimes) {
|
||||||
if (!$this->linkWrite) {
|
if (!$this->linkWrite) {
|
||||||
$this->linkWrite = $this->multiConnect(true);
|
$this->linkWrite = $this->multiConnect(true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user