matrixorigin / matrixorigin/matrixone
[Bug]: DATA BRANCH DIFF detail output fails with 'unsupported mysql type 0' on DECIMAL columns (Cloud v4.1.4, regression of #24847)
- Dominant language
- Go
- Stars
- 1.9k
- Forks
- 311
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 768
Description
### Is there an existing issue for the same bug?
- [x] I have checked the existing issues.
Closely related: #24847 reported the same symptom on MatrixOne Cloud `v3.0.11` and was closed on 2026-07-14 after fixes landed via #24894 (main), #24895 (4.0-dev) and #24876 (3.0-dev). The bug now reproduces again on MatrixOne Cloud `v4.1.4`, so this appears to be either a regression or a release line that did not pick up the fix. Filing a new issue rather than commenting on the closed one.
### Branch Name
Release branch for v4.1.4 (server version `8.0.30-MatrixOne-v4.1.4`, MatrixOne Cloud free tier)
### Commit ID
Unknown — managed MatrixOne Cloud instance; version string is `8.0.30-MatrixOne-v4.1.4`
### Other Environment Information
```markdown
- Hardware parameters: MatrixOne Cloud free tier instance (managed)
- OS type: n/a (cloud service), client on macOS via mysql client
- Others: server version reported by `SELECT VERSION()`: 8.0.30-MatrixOne-v4.1.4
```
### Actual Behavior
`DATA BRANCH DIFF` in detail (row-level) mode fails when the table contains a `DECIMAL` column:
```
mysql> DATA BRANCH DIFF n_br AGAINST n;
ERROR 20101 (HY000): internal error: unsupported mysql type 0
```
(MySQL wire type 0 = `MYSQL_TYPE_DECIMAL`.)
Control experiments on the same instance:
- The identical scenario with the column type changed to `INT`, `VARCHAR`, `DOUBLE`, or `DATE` returns the row-level diff correctly.
- `DATA BRANCH DIFF n_br AGAINST n OUTPUT SUMMARY;` works fine even on the DECIMAL table — only the detail (full-row) output path is broken.
### Expected Behavior
Detail-mode `DATA BRANCH DIFF` should serialize `DECIMAL` columns like any other column type and return the row-level diff, e.g. one `UPDATE` row for `id=1` in the reproduction below — as it already does for `INT`/`VARCHAR`/`DOUBLE`/`DATE` columns, and as verified fixed on main/4.0-dev in #24847.
### Steps to Reproduce
```markdown
Run on MatrixOne Cloud free tier, server version 8.0.30-MatrixOne-v4.1.4:
CREATE TABLE n (id INT PRIMARY KEY, x DECIMAL(10,2));
INSERT INTO n VALUES (1, 1.5), (2, 2.5);
DATA BRANCH CREATE TABLE n_br FROM n;
UPDATE n_br SET x = 9.9 WHERE id = 1;
-- detail mode: FAILS
DATA BRANCH DIFF n_br AGAINST n;
-- ERROR 20101 (HY000): internal error: unsupported mysql type 0
-- summary mode: works
DATA BRANCH DIFF n_br AGAINST n OUTPUT SUMMARY;
```
### Additional information
- Same symptom as #24847, which was reproduced on Cloud `v3.0.11` and closed as fixed (verified on a main-branch build, commit `0bfda60`); fix PRs: #24894 (main), #24895 (4.0-dev), #24876 (3.0-dev). Since `v4.1.4` is newer than those fixes, this looks like a regression in the 4.1 line (or the release/cloud build missing the fix).
- Workaround on v4.1.4: use `OUTPUT SUMMARY`, or avoid `DECIMAL` columns in the diffed projection.
Contributor guide
Assessment
This issue has not been assessed yet.