mysqlnd (+ mysqli etc.) - expose the gtid to PHP in the OkPacket
还没有人认领这个 Issue。
- 主要语言
- C
- 星标
- 40.4k
- 派生
- 8.1k
- 平均合并
- 2 天 13 小时
- 30 天内合并 PR
- 96
描述
Description
Looks like the gtid is already being parsed, but not exposed in PHP. It would be great to just be able to access it from the OkPacket with something like packet->gtid or packet->state_changes->gtid.
why
I can use it to track what user did what gtid change to with a gtid aware cdc on mysql. This is already working on a nodejs server (using mysql2). From my PHP server, I can only track from my ORM with timestamp + table + primary-key-id instead of gtid.
The other state changes would also be helpful from PHP-land, e.g. database for limiting the number of pools I need to run in a multi-db environment, which i cant implement in PHP at all.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先跟踪 mysqlnd 如何通过 mysqli 解析并公开 MySQL OkPacket,重点关注现有的数据包和状态变更处理。完成的标准是 PHP 代码可以访问数据包 GTID,以及在已公开的情况下访问其他请求的状态变更;使用能够生成支持 GTID 的响应的 MySQL 设置验证行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- c, mysql
- 领域
- databases
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100