From 6598a22d870b8fdc58b2d5a63be6024a48aaefb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=93=AD=E6=98=95?= <715557344@qq.com> Date: Thu, 16 May 2024 21:20:02 +0800 Subject: [PATCH] Added `Premature end of data` into `DetectsLostConnections`. (#6763) --- CHANGELOG-3.0.md | 18 +++++++++++++++++- CHANGELOG-3.1.md | 4 ++++ docs/en/changelog/3.0.md | 18 ++++++++++++++++++ docs/zh-cn/changelog/3.0.md | 20 +++++++++++++++++++- src/database/src/DetectsLostConnections.php | 2 ++ 5 files changed, 60 insertions(+), 2 deletions(-) diff --git a/CHANGELOG-3.0.md b/CHANGELOG-3.0.md index daf246536..bd20da39a 100644 --- a/CHANGELOG-3.0.md +++ b/CHANGELOG-3.0.md @@ -1,4 +1,20 @@ -# v3.0.47 - TBD +# v3.0.49 - 2024-05-16 + +## Added + +- [#6764](https://github.com/hyperf/hyperf/pull/6764) Added `Premature end of data` into `DetectsLostConnections`. + +# v3.0.48 - 2024-04-17 + +## Fixed + +- [#6693](https://github.com/hyperf/hyperf/pull/6693) Fixed bug that socket-io cannot parse data with `?` but without `query`. + +# v3.0.47 - 2024-01-11 + +## Optimized + +- [#6455](https://github.com/hyperf/hyperf/pull/6455) Optimized code of Hyperf\SocketIOServer\Parser\Decoder::decode(). # v3.0.46 - 2023-11-30 diff --git a/CHANGELOG-3.1.md b/CHANGELOG-3.1.md index 597a6fa3d..909262692 100644 --- a/CHANGELOG-3.1.md +++ b/CHANGELOG-3.1.md @@ -1,5 +1,9 @@ # v3.1.23 - TBD +## Added + +- [#6763](https://github.com/hyperf/hyperf/pull/6763) Added `Premature end of data` into `DetectsLostConnections`. + # v3.1.22 - 2024-05-16 ## Fixed diff --git a/docs/en/changelog/3.0.md b/docs/en/changelog/3.0.md index 697564244..24e4da333 100644 --- a/docs/en/changelog/3.0.md +++ b/docs/en/changelog/3.0.md @@ -1,5 +1,23 @@ # Changelogs +# v3.0.49 - 2024-05-16 + +## Added + +- [#6764](https://github.com/hyperf/hyperf/pull/6764) Added `Premature end of data` into `DetectsLostConnections`. + +# v3.0.48 - 2024-04-17 + +## Fixed + +- [#6693](https://github.com/hyperf/hyperf/pull/6693) Fixed bug that socket-io cannot parse data with `?` but without `query`. + +# v3.0.47 - 2024-01-11 + +## Optimized + +- [#6455](https://github.com/hyperf/hyperf/pull/6455) Optimized code of Hyperf\SocketIOServer\Parser\Decoder::decode(). + # v3.0.46 - 2023-11-30 ## Fixed diff --git a/docs/zh-cn/changelog/3.0.md b/docs/zh-cn/changelog/3.0.md index 5ac8515ae..d7cc06f93 100644 --- a/docs/zh-cn/changelog/3.0.md +++ b/docs/zh-cn/changelog/3.0.md @@ -1,8 +1,26 @@ # 版本更新记录 +# v3.0.49 - 2024-05-16 + +## Added + +- [#6764](https://github.com/hyperf/hyperf/pull/6764) 当遇到 `Premature end of data` 错误时,则认为当前数据库连接不可用,下次从连接池中取出来时,会被重连。 + +# v3.0.48 - 2024-04-17 + +## 修复 + +- [#6693](https://github.com/hyperf/hyperf/pull/6693) 修复使用 `socket-io` 时,如果没有传入 `query` 会在 `data` 中存在 `?` 的情况下解析出错的问题。 + +# v3.0.47 - 2024-01-11 + +## 优化 + +- [#6455](https://github.com/hyperf/hyperf/pull/6455) 优化 `Hyperf\SocketIOServer\Parser\Decoder::decode()` 的代码实现。 + # v3.0.46 - 2023-11-30 -## Fixed +## 修复 - [#6321](https://github.com/hyperf/hyperf/pull/6321) 修复使用 `tracer` 组件时,`jaeger` 无法正确展示 `HTTP` 状态码的问题。 diff --git a/src/database/src/DetectsLostConnections.php b/src/database/src/DetectsLostConnections.php index a110334ab..86956d9ca 100644 --- a/src/database/src/DetectsLostConnections.php +++ b/src/database/src/DetectsLostConnections.php @@ -52,6 +52,8 @@ trait DetectsLostConnections // SSL: Connection timed out // SQLSTATE[HY000] [2002] Connection timed out 'timed out', + // PDOStatement::execute(): Premature end of data + 'Premature end of data', ]); } }