改名
This commit is contained in:
@@ -170,11 +170,9 @@ abstract class Pool extends Component
|
|||||||
}
|
}
|
||||||
$channel = $this->_items[$name];
|
$channel = $this->_items[$name];
|
||||||
if ($channel->isEmpty()) {
|
if ($channel->isEmpty()) {
|
||||||
return $this->createClient($name, $callback);
|
|
||||||
|
|
||||||
$this->createByCallback($name, $callback);
|
$this->createByCallback($name, $callback);
|
||||||
}
|
}
|
||||||
return $channel->pop(0.002);
|
$connection = $channel->pop(0.002);
|
||||||
if (!$this->checkCanUse($name, $connection)) {
|
if (!$this->checkCanUse($name, $connection)) {
|
||||||
return $this->createClient($name, $callback);
|
return $this->createClient($name, $callback);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -159,10 +159,10 @@ class Connection extends Pool
|
|||||||
$link->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false);
|
$link->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false);
|
||||||
$link->setAttribute(PDO::ATTR_ORACLE_NULLS, PDO::NULL_EMPTY_STRING);
|
$link->setAttribute(PDO::ATTR_ORACLE_NULLS, PDO::NULL_EMPTY_STRING);
|
||||||
|
|
||||||
$charset = $config['charset'] ?? 'utf8mb4';
|
// $charset = $config['charset'] ?? 'utf8mb4';
|
||||||
if (!empty($charset)) {
|
// if (!empty($charset)) {
|
||||||
$link->query('SET NAMES ' . $charset);
|
// $link->query('SET NAMES ' . $charset);
|
||||||
}
|
// }
|
||||||
|
|
||||||
// $this->printClients($config['cds'], '', '');
|
// $this->printClients($config['cds'], '', '');
|
||||||
// $this->increment($name);
|
// $this->increment($name);
|
||||||
|
|||||||
Reference in New Issue
Block a user