Repository navigation
feat: MySQL/MariaDB ↔ PostgreSQL 受控邏輯搬移(07) - #50
Merged
Merged
Conversation
MySQL DDL 會隱含提交,不能套用原本整批交易回滾。新增本輪專屬 staging、分批 DML 與 schema/SHA256 校驗,驗證後以單一 RENAME 發布;殘留或發布結果不明時列出物件並禁止盲重試,不刪除既有資料。 只開放已核對的 signed bigint、NO PAD binary 文字、binary 與整數主鍵/普通索引子集。catalog 和 SHOW CREATE TABLE 拒絕不支援語意,Avalonia 顯示版本與恢復限制。加入正式 Core 的隔離 MySQL 8.4/MariaDB 11.4 雙向及故障回歸,CI 保留實際版本、image digest 和來源雜湊。版本與發布仍維持 hold。
只有 MySQL 的內建 PRIMARY 要轉成 PostgreSQL 預設名稱。PostgreSQL 也能有明確命名為 PRIMARY 的 constraint,不能只看字串便更名;預檢碰撞、DDL 與目標結構驗證統一帶入來源引擎。 正式 PG catalog 搬移驗證保留名稱,真正執行 ON CONFLICT ON CONSTRAINT PRIMARY 成功;同一隔離 fixture 再確認 MySQL/MariaDB 雙向與故障路徑。Release build、33/33 smoke 及 Avalonia handlers 通過。
Collaborator
Author
|
最終head 501d2cd 五平台全部success,已核對API與Linux/Windows job log。Windows build/smoke 240通過;cross Linux既有provider 56/56,另有真正PG16.15↔MySQL8.4.11/MariaDB11.4.13新fixture,各1007列+空表、故障/取消/殘留/發布ack lost與PG明確PRIMARY名稱全部PASS。CI run:Windows38528154449、cross38528154637(Linux115733338177)。 命名映射補正後,再以同一最終正式來源跑PG17.10↔14.24及16.15+SQLite seed/roundtrip,兩組成功且全部source hash匹配;證據/tmp/mysqlpunk-07-501d2cd-pg14與/tmp/mysqlpunk-07-501d2cd-pg16的evidence.json、migration.log。新MySQL fixture同樣hash匹配,3個容器清理成功;PG兩組各2個容器清理成功。 審查確認:只有MySQL內建PRIMARY才映射預設PG名稱;MySQL DDL未聲稱ROLLBACK,寫入後取消/不確定狀態禁止盲重試,不自動刪 staging;未知或不支援schema拒絕。PR可正常合併,沒有繞過保護/review。版本仍1.0.0.22,release hold;未測process crash、真SSH/UI MySQL、PG15與其他MySQL版本配對,也未宣稱全引擎完成。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
這輪做什麼/為什麼
MySQL/MariaDB DDL 隱含 commit,不能沿用 PG/SQLite 的整批 DDL 交易。新增正式 Core 與 Avalonia 雙向搬移:空目標、本輪 staging、分批 DML、結構/SHA256 驗證、單一 multi-table RENAME 與發布後驗證。殘留為 StagingRemains,發布 ack lost/斷線為 Uncertain,兩者禁止盲重試;不刪除既有物件、不修改權限。
精確子集
MySQL 8.4.x/MariaDB 11.4.x ↔ PG14–17;signed bigint、longblob/bytea、longtext utf8mb4 NO PAD binary/text C,整數單欄/複合 PK 與具名普通升冪索引。文字與 binary 可作欄位,但不放行 MySQL 配對的文字/binary 索引鍵。其他寬度/unsigned、時間/decimal、identity/default、FK/CHECK/UNIQUE、prefix/expression/descending/invisible、trigger/procedure/event、partition 等 catalog+完整 SHOW CREATE TABLE grammar fail closed;PG 自訂 PK 名稱往 MySQL 拒絕。完整範圍與技術限制見 docs/LOGICAL_MIGRATION_MATRIX.md。
本機正式來源驗證
CI/剩餘界線
新head CI Linux新增可重跑 tests/Run-MySqlLogicalMigration.py,四平台編譯,artifact保留合成fixture evidence;既有56/56 provider suite與這輪新fixture分開。Windows與跨平台結果以本PR精確head為準,尚在等待。
PG15/其他MySQL與MariaDB版本配對、真SSH/UI MySQL、process/engine crash、其他引擎配對未驗證;未宣稱任意資料庫無損轉换。使用已授權合成容器、loopback隨機ports/ownership label/tmpfs,無真資料、無新權限/安全設定。
Release hold不變:沒有版更、tag、Release-Now或發布。整體跨引擎需求仍分階段,待獨立驗收。