From 30598aa25847872fba44042f4cfeefc866b1d6f6 Mon Sep 17 00:00:00 2001 From: Bruce Dou Date: Tue, 13 Dec 2022 12:51:06 +0000 Subject: [PATCH] fix pdo pool client --- ext-src/php_swoole_library.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ext-src/php_swoole_library.h b/ext-src/php_swoole_library.h index a632c9f4e..d5648bce4 100644 --- a/ext-src/php_swoole_library.h +++ b/ext-src/php_swoole_library.h @@ -2,7 +2,7 @@ * Generated by build-library.php, Please DO NOT modify! */ -/* $Id: 19668965fb5df74d799cefa05913535916135160 */ +/* $Id: cb70a4a2095192922ecf06f6e57cd2f1e7a5a0cb */ static const char* swoole_library_source_constants = "\n" @@ -2784,15 +2784,20 @@ static const char* swoole_library_source_core_database_pdo_pool = " {\n" " $this->config = $config;\n" " parent::__construct(function () {\n" + " $driver = $this->config->getDriver();\n" " return new PDO(\n" - " \"{$this->config->getDriver()}:\" .\n" + " \"{$driver}:\" .\n" " (\n" " $this->config->hasUnixSocket() ?\n" " \"unix_socket={$this->config->getUnixSocket()};\" :\n" " \"host={$this->config->getHost()};\" . \"port={$this->config->getPort()};\"\n" " ) .\n" " \"dbname={$this->config->getDbname()};\" .\n" - " \"charset={$this->config->getCharset()}\",\n" + " (\n" + " $driver !== 'pgsql' ?\n" + " \"charset={$this->config->getCharset()}\" :\n" + " ''\n" + " ),\n" " $this->config->getUsername(),\n" " $this->config->getPassword(),\n" " $this->config->getOptions()\n"