qqq
This commit is contained in:
@@ -160,7 +160,6 @@ class Connection extends Component
|
|||||||
}
|
}
|
||||||
|
|
||||||
[$client, $time] = $data;
|
[$client, $time] = $data;
|
||||||
file_put_contents('php://output', ((time() . ' ' . $time) . ' ' . $this->idle_time) . PHP_EOL, FILE_APPEND);
|
|
||||||
if ((time() - $time) < $this->idle_time && $this->canUse($client)) {
|
if ((time() - $time) < $this->idle_time && $this->canUse($client)) {
|
||||||
return $client;
|
return $client;
|
||||||
}
|
}
|
||||||
@@ -310,7 +309,6 @@ class Connection extends Component
|
|||||||
*/
|
*/
|
||||||
public function release(PDO $PDO): void
|
public function release(PDO $PDO): void
|
||||||
{
|
{
|
||||||
file_put_contents('php://output', '回收PDO连接. inTransaction ' . (int)$this->inTransaction() . $this->cds, FILE_APPEND);
|
|
||||||
if ($this->inTransaction()) {
|
if ($this->inTransaction()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -344,7 +342,6 @@ class Connection extends Component
|
|||||||
*/
|
*/
|
||||||
public function newConnect(): array
|
public function newConnect(): array
|
||||||
{
|
{
|
||||||
file_put_contents('php://output', '创建PDO连接.' . $this->cds, FILE_APPEND);
|
|
||||||
$options = array_merge($this->attributes, [
|
$options = array_merge($this->attributes, [
|
||||||
PDO::ATTR_CASE => PDO::CASE_NATURAL,
|
PDO::ATTR_CASE => PDO::CASE_NATURAL,
|
||||||
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
||||||
|
|||||||
Reference in New Issue
Block a user