From 4ca0a61344747d3fd013381821841b075d9aae89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Fri, 14 Jan 2022 16:06:31 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E6=94=B9=E5=90=8D"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit fdf58326 --- Connection.php | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/Connection.php b/Connection.php index 1019dd9..597e293 100644 --- a/Connection.php +++ b/Connection.php @@ -108,11 +108,29 @@ class Connection extends Component } $name = $connections->name('Mysql:' . $this->cds, true); for ($i = 0; $i < $pool; $i++) { - $connections->addItem($name, $connections->create($name, $config)()); + $connections->addItem($name, $connections->create($name, [ + 'cds' => $this->cds, + 'username' => $this->username, + 'password' => $this->password, + 'attributes' => $this->attributes, + 'connect_timeout' => $this->connect_timeout, + 'read_timeout' => $this->read_timeout, + 'dbname' => $this->database, + 'pool' => $this->pool + ])()); } $name = $connections->name('Mysql:' . $this->cds, false); for ($i = 0; $i < $pool; $i++) { - $connections->addItem($name, $connections->create($name, $config)()); + $connections->addItem($name, $connections->create($name, [ + 'cds' => $this->cds, + 'username' => $this->username, + 'password' => $this->password, + 'attributes' => $this->attributes, + 'connect_timeout' => $this->connect_timeout, + 'read_timeout' => $this->read_timeout, + 'dbname' => $this->database, + 'pool' => $this->pool + ])()); } }