Add full-primary MySQL mutation capture through a delegating database backend
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
调研方向
首先验证 stock WordPress、自定义 db.php 和托管主机所支持的部署边界。定义成功和已回滚的 DML 与 DDL、事务、身份标识,以及已捕获/未捕获的混合部署如何映射到规范持久化事件。完成的标准是验收标准已记录并经过测试,其中包括兼容的 wpdb 行为、恢复、基于 capability 的 Doctor 检测、不受支持主机的处理,以及保持不变的 SQLite 兼容性。
由索引模型根据 Issue 内容生成。
描述
Problem
The MySQL content backend can make selected posts file-primary through WordPress lifecycle events, but full MDI primary semantics also cover options, users, comments, schemas, and arbitrary plugin tables. Those writes can bypass WordPress content hooks and require successful database-level mutation capture.
This is a later child of #57. It follows the MySQL content backend and does not block it.
Desired Capability
Add a delegating MySQL backend that captures successful mutations at the WordPress database boundary while preserving normal MySQL execution:
WordPress wpdb
-> MDI delegating backend
-> normal MySQL execution
-> normalized successful mutation events
-> canonical persistence core
The backend owns MySQL result normalization, transactions, schema introspection, affected-resource discovery, and mutation capture. The canonical core remains SQL- and database-neutral.
Required Design Evidence
Before implementation, verify the supported deployment boundary for stock WordPress, custom db.php, and managed hosts. The backend must define:
- which direct
$wpdbwrites are captured; - transaction and rollback timing;
- read-after-write behavior;
- schema DDL handling;
- auto-increment identity reconstruction;
- mixed captured/uncaptured deployment behavior;
- operational recovery when canonical persistence fails after MySQL succeeds.
Acceptance Criteria
- Direct plugin
$wpdbDML and DDL mutations produce normalized canonical persistence events after successful execution. - Failed and rolled-back SQL produces no canonical state change.
- Options, users, comments, taxonomy state, and representative plugin schemas/tables reconstruct from canonical files into an empty supported MySQL database.
- Existing callers observe compatible
wpdbreturn values, errors, insert IDs, row counts, timing, and query logging. - Mixed-version deployment behavior is documented and tested.
- Doctor distinguishes full-primary MySQL from content-primary MySQL using capabilities, not mode-name assumptions.
- Hosts that cannot install the required database boundary receive an explicit unsupported result and retain content-primary operation.
- SQLite compatibility remains unchanged.
AI Assistance
OpenAI GPT-5.6 Sol via OpenCode was used to inspect MDI's existing full-state persistence guarantees and draft this issue. Chris Huber directed the architecture and remains responsible for the proposed capability boundary.
- 主要语言
- PHP
- 星标
- 7
- 派生
- 1
- 平均合并
- 26 分钟
- 30 天内合并 PR
- 26
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Automattic/markdown-database-integration 的其他 Issue
-
难度 5/5 一周以上 新手友好度 25/100
Automattic/markdown-database-integration#424 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 78/100
Automattic/markdown-database-integration#420 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
Automattic/markdown-database-integration#415 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 78/100
Automattic/markdown-database-integration#414 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 72/100
Automattic/markdown-database-integration#401 ·
维护者通常 1 天内回复
查看 Automattic/markdown-database-integration 的全部 Issue
相似的 Issue
-
难度 2/5 半天 新手友好度 68/100
components-web-app/docs#244 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
PrestaShopCorp/ps_eventbus#501 · 2 个 reaction ·
-
category::task maintenance priority::normal
难度 2/5 1-3 小时 新手友好度 62/100
e0ipso/schema-forms-php#58 ·
-
难度 2/5 1-3 小时 新手友好度 66/100
Automattic/blocks-engine#2866 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
community-scripts/ProxmoxVE#17944 · 1 条评论 ·
维护者通常 1 天内回复