This commit is contained in:
2021-02-20 13:35:17 +08:00
parent b140054ce9
commit 9ce45e39e8
6 changed files with 23 additions and 20 deletions
+4 -4
View File
@@ -98,8 +98,8 @@ class Connection extends Component
public function getConnect($sql = NULL): PDO
{
$connections = $this->connections();
$connections->initConnections($this->cds, true, $this->maxNumber);
$connections->initConnections($this->slaveConfig['cds'], false, $this->maxNumber);
$connections->initConnections('mysql', $this->cds, true, $this->maxNumber);
$connections->initConnections('mysql', $this->slaveConfig['cds'], false, $this->maxNumber);
$connections->setTimeout($this->timeout);
return $this->getPdo($sql);
@@ -113,8 +113,8 @@ class Connection extends Component
public function fill()
{
$connections = $this->connections();
$connections->initConnections($this->cds, true, $this->maxNumber);
$connections->initConnections($this->slaveConfig['cds'], false, $this->maxNumber);
$connections->initConnections('mysql', $this->cds, true, $this->maxNumber);
$connections->initConnections('mysql', $this->slaveConfig['cds'], false, $this->maxNumber);
}