From 964b5c8a27af84ccfce844c94bf7206fd450eb26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 18 Sep 2020 18:01:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- System/Pool/Connection.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/System/Pool/Connection.php b/System/Pool/Connection.php index 74a9f9b1..5b4513b4 100644 --- a/System/Pool/Connection.php +++ b/System/Pool/Connection.php @@ -363,7 +363,6 @@ class Connection extends Pool try { $link = new PDO($cds, $username, $password, [ PDO::ATTR_EMULATE_PREPARES => false, - // PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => TRUE, PDO::ATTR_CASE => PDO::CASE_NATURAL, PDO::ATTR_TIMEOUT => $this->timeout, ]); @@ -376,11 +375,10 @@ class Connection extends Pool $this->incr($coroutineName); return $link; } catch (\Throwable $exception) { - $this->error($cds . ' -> ' . $exception->getMessage()); + $this->addError($cds . ' -> ' . $exception->getMessage()); if ($exception->getCode() === 2006) { return $this->createConnect($coroutineName, $cds, $username, $password, $charset); } - $this->addError($cds . ' -> ' . $exception->getMessage()); throw new Exception($exception->getMessage()); } }