Revert "改名"

This reverts commit fdf58326
This commit is contained in:
2022-01-17 11:31:26 +08:00
parent 5b22955966
commit 22194bbdbc
+19 -19
View File
@@ -106,25 +106,25 @@ class Connection extends Component
if (!empty($this->slaveConfig) && $this->cds != $this->slaveConfig['cds']) { if (!empty($this->slaveConfig) && $this->cds != $this->slaveConfig['cds']) {
$connections->initConnections('Mysql:' . $this->slaveConfig['cds'], false, $pool); $connections->initConnections('Mysql:' . $this->slaveConfig['cds'], false, $pool);
} }
$name = $connections->name('Mysql:' . $this->cds, true); // $name = $connections->name('Mysql:' . $this->cds, true);
//
$config = $this->_config(); // $config = $this->_config();
for ($i = 0; $i < $pool; $i++) { // for ($i = 0; $i < $pool; $i++) {
$connections->addItem($name, $connections->create($name, $config)()); // $connections->addItem($name, $connections->create($name, $config)());
} // }
//
if (empty($this->slaveConfig)) { // if (empty($this->slaveConfig)) {
return; // return;
} // }
//
$config['cds'] = $this->slaveConfig['cds']; // $config['cds'] = $this->slaveConfig['cds'];
$config['username'] = $this->slaveConfig['username']; // $config['username'] = $this->slaveConfig['username'];
$config['password'] = $this->slaveConfig['password']; // $config['password'] = $this->slaveConfig['password'];
//
$name = $connections->name('Mysql:' . $config['cds'], false); // $name = $connections->name('Mysql:' . $config['cds'], false);
for ($i = 0; $i < $pool; $i++) { // for ($i = 0; $i < $pool; $i++) {
$connections->addItem($name, $connections->create($name, $config)()); // $connections->addItem($name, $connections->create($name, $config)());
} // }
} }