Skip to content

fix: 保留 BLOB 参数类型并按二进制内容查询 - #285

Merged
maikebing merged 18 commits into
mainfrom
codex/issue271-binary-predicate
Oct 12, 2026
Merged

maikebing merged 18 commits into
mainfrom
codex/issue271-binary-predicate

Conversation

@maikebing

@maikebing maikebing commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

二进制参数此前被绑定为 Base64 STRING,关系表 BLOB 等值查询随后尝试比较 Byte[] 与 String 并失败。现在从 Core 参数绑定到远程 SQL 都保留二进制类型,使 EF Core 的普通等值与导航 Any/SequenceEqual 查询在数据库端执行。

变更点

  • 追加 BLOB 字面量类型,保留现有公共 LiteralExpression 构造函数;参数绑定复制字节快照,远程使用严格解析的 X'hex'。
  • 两个关系执行器对 BLOB =/!= 按内容比较,NULL 语义与既有索引/PK/EXISTS路径保留;BLOB排序继续明确拒绝。
  • 表达式格式化及远程事务 INSERT RETURNING 接受typed BLOB,不猜测任意字符串为Base64。

对应 ROADMAP

测试说明

  • 110 项不同测试通过:Core47、嵌入式/真实REST/精确h2c生命周期3、既有EF60;最终命名修改后同三项再次3/3。
  • 核实际DbType.Binary与byte[]、普通Eq和导航Any/SequenceEqual、多用户、NULL/空/高位/不同长度、64KiB、更新/删除/回滚、Server stop/dispose/reopen;真实EXPLAIN ANALYZE验证PK/secondary候选1行和EXISTS,无额外完整扫描。
  • 主智能体独立核最终源码、实际执行DLL及非空TRX;最终完整restore/原CI Format Check/default whitespace通过。
  • 五Jobs cleanupComplete=true;42精确身份零存活匹配,五独占TEMP单次回收且全部缺席。首轮8/10的新INSERT fixture错误与guard失败保留。
  • 第四且最后构建经根明确扩预算,仅作最终命名/样式复验;没有第五次构建。
  • NativeAOT完整发布、正式包/Chloe/ABP消费者和最大BLOB长度验收NOT_RUN或UNKNOWN;64KiB不代表最大能力。

是否破坏兼容

  • 是(说明原因及迁移方案)
  • 否

CHANGELOG 更新

  • 已更新 [Unreleased]。

当前刷新 head 773616e 合入 #284/#213/#269/#215/#267 与已合并 Outbox 前置,两个纯新增文档冲突保留双方内容;关系执行器自动合并由主智能体逐段审核。最终合并源码新增专项 Core 37/37(BLOB10、字符串聚合27),真实 TRX/DLL SHA 与全部旧成功/失败证据保留;原110项是此前来源证据,不重复加总为本次回归。最终完整 restore/原 CI Format Check 通过,精确推送后新 head CI 独立待核。正式发行、ABP/Chloe 等消费者和 NativeAOT 宿主验收仍未完成。

dependabot Bot and others added 18 commits October 3, 2026 00:34
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.38.1 to 4.38.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@v4.38.1...v4.38.2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.38.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
---
updated-dependencies:
- dependency-name: SkiaSharp
  dependency-version: 4.153.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
---
updated-dependencies:
- dependency-name: Microsoft.ML.OnnxRuntime
  dependency-version: 1.31.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
---
updated-dependencies:
- dependency-name: xunit.runner.visualstudio
  dependency-version: 4.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
@maikebing
maikebing merged commit 541a14c into main Oct 12, 2026
12 checks passed
@maikebing
maikebing deleted the codex/issue271-binary-predicate branch October 15, 2026 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant