From 12011166e3934f1d76f2d183a63cfe2ff9bde8e6 Mon Sep 17 00:00:00 2001 From: Thomas Steur Date: Mon, 18 Nov 2019 19:37:26 +1300 Subject: Fix socket configuration not applied in MySQLi (#15166) We have a `unix_socket` setting to connect using this setting instead of host & port. It is being used in the Mysqli Tracker DB but by the looks not in the MySQLi core db. Haven't tested it but should work and at least won't make it worse :) --- libs/Zend/Db/Adapter/Mysqli.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libs') diff --git a/libs/Zend/Db/Adapter/Mysqli.php b/libs/Zend/Db/Adapter/Mysqli.php index e94ec26b37..9eb3d7f482 100644 --- a/libs/Zend/Db/Adapter/Mysqli.php +++ b/libs/Zend/Db/Adapter/Mysqli.php @@ -346,6 +346,8 @@ class Zend_Db_Adapter_Mysqli extends Zend_Db_Adapter_Abstract } } + $socket = !empty($this->_config['unix_socket']) ? $this->_config['unix_socket'] : null; + // Suppress connection warnings here. // Throw an exception instead. $_isConnected = @mysqli_real_connect( @@ -355,7 +357,7 @@ class Zend_Db_Adapter_Mysqli extends Zend_Db_Adapter_Abstract $this->_config['password'], $this->_config['dbname'], $port, - $socket = null, + $socket, $enable_ssl ? $flags : null ); -- cgit v1.2.3