Repository navigation
Description
Is there an existing issue for the same bug?
- I have checked the existing issues.
ODBC umbrella issue: #26677
Branch Name
m-25908
Commit ID
The running server reports 8.0.30-MatrixOne-v25908.
Other Environment Information
- Hardware parameters: Apple Silicon ARM64, 10 logical CPUs
- OS type: macOS 15.5, Darwin 24.5.0
- Deployment: fresh local launch with etc/launch/launch.toml
- Client: MatrixOne ODBC derived from MySQL Connector/ODBC 9.7.0 through unixODBC 2.3.14
Actual Behavior
MatrixOne returns uppercase type names from information_schema.columns.DATA_TYPE, for example INT, VARCHAR, DECIMAL, and DATETIME.
MySQL Connector/ODBC 9.7 maps this field through a case-sensitive table containing lowercase MySQL type names. As a result, the public ODBC SQLColumns API reports SQL_UNKNOWN_TYPE (0) for almost every MatrixOne column. JSON happens to map because the upstream table contains both json and JSON entries.
Observed SQLColumns.DATA_TYPE values for a 20-column MatrixOne table:
id 0
c_tiny 0
c_small 0
c_int 0
c_big 0
c_dec 0
c_float 0
c_double 0
c_bool 0
c_date 0
c_time 0
c_dt 0
c_ts 0
c_char 0
c_varchar 0
c_text 0
c_binary 0
c_varbinary 0
c_blob 0
c_json -1
Direct result metadata from SELECT can still report useful types, so this defect is easy to miss in connection smoke tests. BI catalog discovery and Power BI Navigator use SQLColumns and can receive unknown types even though ordinary queries work.
Expected Behavior
MatrixOne information_schema compatibility should match MySQL casing for standardized string values, or MatrixOne should otherwise guarantee that MySQL-compatible connectors can consume them.
For the existing Connector/ODBC behavior, SQLColumns should report SQL_INTEGER, SQL_BIGINT, SQL_DECIMAL, SQL_TYPE_DATE, SQL_WVARCHAR or SQL_VARCHAR, SQL_VARBINARY, and the other corresponding ODBC types instead of SQL_UNKNOWN_TYPE.
Steps to Reproduce
Create a table:
CREATE DATABASE IF NOT EXISTS mo_odbc_deep;
CREATE TABLE mo_odbc_deep.type_probe (
id INT PRIMARY KEY,
name VARCHAR(128),
amount DECIMAL(20,6),
event_date DATE,
payload VARBINARY(128)
);Inspect MatrixOne information_schema:
SELECT column_name, data_type, column_type
FROM information_schema.columns
WHERE table_schema = "mo_odbc_deep"
AND table_name = "type_probe"
ORDER BY ordinal_position;Observed MatrixOne result:
id INT INT(32)
name VARCHAR VARCHAR(128)
amount DECIMAL DECIMAL(20,6)
event_date DATE DATE(0)
payload VARBINARY VARBINARY(128)
Then connect through MySQL Connector/ODBC 9.7 or the experimental MatrixOne ODBC driver and call SQLColumns for mo_odbc_deep.type_probe. Fetch result column 5, DATA_TYPE. Values are 0 rather than the expected ODBC type identifiers.
Additional information
Connector/ODBC 9.7 calls get_sql_data_type_from_str on the information_schema DATA_TYPE string. Its sql_data_types_map is case sensitive and predominantly lowercase.
A defensive MatrixOne ODBC workaround can normalize the server value before lookup, but matching MySQL information_schema behavior in MatrixOne would also protect other connectors that assume MySQL casing.
Suggested regression coverage:
- Compare string-valued information_schema columns with MySQL casing.
- Assert SQLColumns.DATA_TYPE for every MatrixOne scalar type.
- Cover both ANSI and Unicode ODBC driver variants.
- Keep direct SELECT result metadata and catalog metadata consistent.
Activity
fix: lowercase information_schema columns data types
slyunnn commentedon Aug 10, 2026
Regression and extended verification for #26680 (2026-08-10)
Follow-up to the ODBC
SQLColumnstype-mapping failure: verified theinformation_schema.columns.DATA_TYPEcompatibility fix and added MOTR regression coverage.
Verification environment
mainfa0ea95aa77b59a2947159baab31e7215d040e93fix(plan): support subqueries in left and right join ON clauses (#26763)test/issue-26680-information-schema-data-typef2f7c08eb0c61f3ff8ebf93bdf8401e8f0f4a8c4Regression validation
Ran the controlled CGo unit test:
Result: passed.
Confirmed the existing fix from fix: lowercase information_schema columns data types #26712 is present on main:
d129a85
fix: lowercase information_schema columns data types (fix: lowercase information_schema columns data types #26712)
Extended MOTR coverage
Added:
suites/14_issue_regression/t/issue_26680_information_schema_data_type.test
suites/14_issue_regression/r/issue_26680_information_schema_data_type.result
Covered information_schema.columns.DATA_TYPE and COLUMN_TYPE for:
Assertions include:
UNSIGNED(32), and type precision/length.
Test result
Recorded the expected result and reran it in comparison mode:
[ISSUE_26680_INFORMATION_SCHEMA_DATA_TYPE] success | stmts=7 ok=7 fail=0
Conclusion
The underlying compatibility bug is already fixed by #26712. The new MOTR regression protects the connector-facing
lowercase DATA_TYPE contract and prevents a future regression that would cause ODBC SQLColumns to return
SQL_UNKNOWN_TYPE for common MatrixOne column types.
Follow-up
Create the MOTR PR from:
https://github.com/matrixorigin/motr/pull/new/test/issue-26680-information-schema-data-type
Suggested resolution: merge the MOTR regression, reference #26712 as the product fix, and close #26680.
fix(plan): reject unsupported invisible columns (#26909)
fix(plan): reject unsupported invisible columns (matrixorigin#26909)
fix(plan): reject unsupported invisible columns (matrixorigin#26909)
fix(plan): reject unsupported invisible columns (matrixorigin#26909)