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
[Compatibility]: OCT exposes DECIMAL instead of a bounded character result #28466
Latest main at a9d3b8b857c44f1249e682c91d4d62a914eb7d20. MySQL control: 8.3.0.
What is different
MatrixOne exposes OCT() as DECIMAL(38,0), while MySQL exposes its octal representation as VARCHAR(65). The difference becomes persistent schema through CTAS and is also visible through views/client result metadata.
Reproduction
CREATETABLEsrc(i BIGINT, d DOUBLE);
INSERT INTO src VALUES (12, 12.5);
CREATETABLEderivedASSELECT OCT(i) AS oi, OCT(d) AS od FROM src;
SHOW CREATE TABLE derived;
SELECT COLUMN_NAME, DATA_TYPE, COLUMN_TYPE,
CHARACTER_MAXIMUM_LENGTH, NUMERIC_PRECISION, NUMERIC_SCALE
FROMINFORMATION_SCHEMA.COLUMNSWHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME ='derived'ORDER BY ORDINAL_POSITION;
CREATEVIEWvASSELECT OCT(i) AS oi FROM src;
SELECT DATA_TYPE, COLUMN_TYPE, CHARACTER_MAXIMUM_LENGTH,
NUMERIC_PRECISION, NUMERIC_SCALE
FROMINFORMATION_SCHEMA.COLUMNSWHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME ='v';
Every OCT overload in the function registry returns types.T_decimal128.ToType(), and each executor writes a Decimal128. CTAS and view derivation therefore persist a numeric type instead of the function's character result domain.
Expected behavior
OCT() should expose a bounded character result compatible with MySQL so that CTAS, views, UNION/type propagation, client metadata, and downstream string operations see the correct domain.
Activity
Ariznawlll commentedon Sep 9, 2026
在同步后的最新
main(f0c31cd4b830be32442cf329e0a3fb08aa9c16c3)重新执行 3 轮 CTAS 与 view 元数据检查:MatrixOne 的OCT(INT)/OCT(DOUBLE)仍派生为DECIMAL(38,0),MySQL 8.3 为VARCHAR(65);值输出与原报告一致。fix: align OCT compatibility and result metadata (#28533)
Ariznawlll commentedon Sep 11, 2026
测试版本
maine7d46d6dfb27696211ca828c55e245d3bd1b634d原问题验证
在隔离数据库中连续执行 3 轮
BIGINT、DOUBLE 输入的OCT,并创建 CTAS 表和 View。查询information_schema.columns:CTAS 与 View 的oi、od四个输出列均为VARCHAR(65),未再出现DECIMAL(38,0)元数据。Happy Path 覆盖
12/12.5的 OCT 值均为14,并可在CONCAT(OCT(i), ':x')和LENGTH(OCT(d))中作为字符结果使用。oct_derived与 Viewoct_view的BIGINT、DOUBLE OCT 输出均为varchar、VARCHAR(65)、长度65。Unhappy Path 覆盖
-12/-12.5、零以及BIGINT最大值均完成 OCT 转换并返回稳定字符结果。白盒验证
不适用:本次为真实 MatrixOne 服务上的 SQL 黑盒验收;修复实现已随 MatrixOne PR #28533 合入当前 main。
回归测试
14_issue_regression.issue_28465_28466_oct_compatibility./motr --repeat 3 14_issue_regression.issue_28465_28466_oct_compatibility,3/3 通过,72 条 SQL 均成功。测试证据
information_schema.schemata,隔离测试库残留数为0。测试结论
测试通过。
fix: align OCT compatibility and result metadata (matrixorigin#28533)
fix: align OCT compatibility and result metadata (matrixorigin#28533)
fix: align OCT compatibility and result metadata (matrixorigin#28533)