You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: BINARY VARBINARY BLOB columns falsely report a character set in information_schema #31160
information_schema.COLUMNS reports CHARACTER_SET_NAME='binary' and COLLATION_NAME='binary' for BINARY, VARBINARY, and BLOB columns. MySQL reports both fields as SQL NULL because character-set metadata does not apply to these binary types.
Environment
Branch: official main
Commit: 5fe08a3307e246e1ab9951ab690b50557af0f509
Deployment: fresh isolated LOG/TN/CN cluster, SQL port 36601, 2026-10-26
Reference: isolated MySQL 8.3.0, local socket only
Steps to reproduce
CREATEDATABASEqa_binary_meta_repro;
CREATETABLEqa_binary_meta_repro.t (
id INTPRIMARY KEY,
bin BINARY(4) DEFAULT X'0102',
vb VARBINARY(8),
bl BLOB,
vc VARCHAR(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin
);
SELECT column_name, character_set_name, collation_name
FROMinformation_schema.columnsWHERE table_schema='qa_binary_meta_repro'AND table_name='t'ORDER BY ordinal_position;
Actual behavior
MatrixOne returns binary/binary for each of bin, vb, bl; MySQL 8.3 returns NULL/NULL. Reproduced with three independent fresh databases (3/3).
Expected behavior
Binary data types should have NULL in both character-set metadata columns; the VARCHAR utf8mb4_bin control should retain utf8mb4/utf8mb4_bin.
Stability and controls
Reproducer: 3/3 databases qa_defaults_1, _2, _3.
Happy path: the explicit text-column charset/collation matches MySQL; inserted BINARY(4) default is HEX=01020000 in both engines.
Unhappy path: a rejected invalid DECIMAL insert into the mixed fixture left one existing row intact and queryable.
The information_schema.COLUMNS projection in pkg/util/sysview/predefined.go maps internal_column_character_set(...) = 2 to the literal 'binary' for both metadata fields, conflating binary storage with a character set. This is separate from ENUM/SET length metadata in #30936.
Regression coverage
Add I_S metadata assertions for BINARY/VARBINARY and BLOB-family widths alongside a text-column control; verify after ALTER and CTAS where supported.
Activity
test(information_schema): align binary-family charset/collation expec…
fix(sysview): NULL charset/collation for binary-family columns and NU…
fix(sysview): serve frozen COLUMNS/STATISTICS identities below the pr…
Ariznawlll commentedon Oct 28, 2026
@aptend 想请教一下 #31160 和 #31163 在已有租户升级时的验收预期。
本次在隔离的 1 CN + 1 TN + 1 Log 环境,先用修复前
533e95796177d9eacdc909059ccf72b7ddd3ba5f创建 3 个租户,再保留数据切换到包含 #31461 的 mainf847803802289b2b2d0df4f0a2f842c2804b823a。在修复后服务已接受连接、后台维护尚未完成时,3 个已有租户各新建一张表并立即查询:二进制列的
CHARACTER_SET_NAME/COLLATION_NAME暂时仍为binary/binary;同时新表UPDATE_TIME/CHECK_TIME仍为非 NULL。这里是同一次升级启动中的 3 个租户,不是 3 次独立升级。后台
information schema columns/tables maintenance repaired account完成后,3 个租户的新旧表对应元数据均恢复为预期的 NULL;另一次隔离升级后的重启检查也保持正确。新建环境的原始场景及 MOTR 定向回归通过;更详细的本地升级证据和测试脚本已保留。请确认:
待确认后我再按约定完成验收;目前不将该窗口预先判定为新缺陷。相关 issue:#31163。
fix(bootstrap): remove view scan and enforce complete tenant initiali…
fix(sysview): publish declared COLUMNS metadata, numeric SUB_PART and…
Ariznawlll commentedon Nov 2, 2026
测试版本
87fe4e0c3ac3f9a98b308f8931fd3f8be345b076;Issue 修复代码已在该 main 中。127.0.0.1:6001,MatrixOne8.0.30-MatrixOne-v1.3.0。原问题验证
创建
BINARY(4)、VARBINARY(8)、BLOB和VARCHAR(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin后查询information_schema.COLUMNS:前三类二进制列的字符集和排序规则均为 SQL NULL,VARCHAR 保持utf8mb4/utf8mb4_bin。3 个独立数据库结果一致。Happy Path 覆盖
BINARY、VARBINARY、BLOB元数据查询。VARCHAR字符集/排序规则控制。18/18statements 通过。Unhappy Path 覆盖
ERROR 1050 (42S01)。NULL/NULL,没有产生错误元数据。白盒验证
已核对
information_schema.COLUMNS对二进制类型的元数据映射,以及普通字符列的字符集/排序规则映射。回归测试
已加入 matrixorigin/motr#304:
suites/14_issue_regression/issue_31160_binary_column_metadata。测试证据
MOTR
--repeat 3成功,累计18/18statements 通过;执行日志保存在本地 MOTR worktree 的var/log/下。测试结论
测试通过。
Ariznawlll commentedon Nov 2, 2026
测试结论更正
之前的测试通过结论和关闭操作过早,已重新打开 Issue。已运行的基础 SQL 和 MOTR 定向测试结果仍有效,但本地运行二进制的构建 SHA 尚未确认,不能将工作树的 SHA 当作运行版本;此前的 Happy/Unhappy 覆盖和完整 suite/CI 验证也不足以作为最终验收。需要在确认版本的官方 main 上补齐测试后再决定状态。
Ariznawlll commentedon Nov 3, 2026
结论
测试通过。二进制类型不再错误展示字符集和排序规则。
关键证据
git_version()确认为官方main@d61a7206c16b30baa4efc525eb6067c4364035aa。CHARACTER_SET_NAME、COLLATION_NAME为 NULL;VARCHAR 保留 utf8mb4 字符集和指定排序规则。二进制默认值、ALTER 新增列、CTAS 和视图元数据及读取均有对照;定向 MOTR 与独立公开 SQL 断言各重复 3 次通过。pkg/util/sysview的二进制类型与历史视图适配定向测试-count=3通过。issue_31160_binary_column_metadata与公开 SQL 断言均在 PR 中;PR headf110fd965d4e3c29a374704a286434a913c663c1的 4 项离线 CI 检查通过。此次本地为定向验证,不代表完整 MOTR 全量 suite 已运行。待解决点
无。
fix(sql): publish typed and expression column defaults in metadata (#…