MySQL Compatibility¶
This page compares the MySQL mode of MatrixOne Intelligence against native MySQL.
MatrixOne Intelligence is highly compatible with the MySQL 8.0 protocol, plus most of the commonly used MySQL 8.0 features and syntax. Common MySQL ecosystem tools — Navicat, MySQL Workbench, JDBC, and so on — also work. That said, because MatrixOne Intelligence has a different architecture and is still evolving, some features are not yet supported. This section walks through the differences with native MySQL across the following dimensions:
DDL statements
DCL statements
DML statements
Advanced SQL features
Data types
Indexes and constraints
Partition support
Functions and operators
Storage engine
Transactions
Security and privileges
Backup & restore
System variables
Programming languages
Ecosystem tools
DDL statements¶
DATABASE¶
Database / table names in Chinese characters are not supported.
ENCRYPTIONis parsed but has no effect.ALTER DATABASEis not supported.Only the
utf8mb4character set withutf8mb4_bincollation is supported by default; this cannot be changed.
TABLE¶
ENGINE=in a table definition is silently ignored.The
ALTER TABLEclausesCHANGE [COLUMN],MODIFY [COLUMN],RENAME COLUMN,ADD [CONSTRAINT [symbol]] PRIMARY KEY,DROP PRIMARY KEY, andALTER COLUMN ORDER BYcan be combined freely with each other but cannot be combined with other clauses.Temporary tables cannot be modified with
ALTER TABLE.A table created with
CREATE TABLE ... CLUSTER BY ...cannot be modified withALTER TABLE.ALTER TABLEdoes not supportPARTITIONoperations.Cluster by columnis supported — pre-sorts a column to speed up queries.
VIEW¶
The
WITH CHECK OPTIONclause is not supported.The
DEFINERandSQL SECURITYclauses are not supported.
SEQUENCE¶
MySQL does not support SEQUENCE objects. MatrixOne Intelligence does —
CREATE SEQUENCEworks with PostgreSQL-style syntax.auto_incrementandsequencecannot be used together on the same column; combining them raises an error.
DCL statements¶
ACCOUNT¶
Unlike the MatrixOne core, MatrixOne Intelligence has no separate ACCOUNT concept. Every instance you create within a region belongs to a single MatrixOne distributed cluster, and every instance is itself a separate ACCOUNT in the cluster — you cannot create another ACCOUNT inside an instance.
Privileges¶
GRANTsemantics differ from MySQL.REVOKEsemantics differ from MySQL.
SHOW¶
SHOWis not supported forTRIGGER,FUNCTION,EVENT,PROCEDURE,ENGINE, and similar objects.A few
SHOWcommands are accepted purely for syntactic compatibility and produce no output (e.g.SHOW STATUS / PRIVILEGES).Some commands have the same syntax as MySQL but behave differently because of the underlying architecture:
SHOW GRANTS,SHOW ERRORS,SHOW VARIABLES,SHOW PROCESSLIST.MatrixOne Intelligence ships some additional
SHOWcommands for its own management:SHOW BACKEND SERVERS,SHOW ACCOUNTS,SHOW ROLES,SHOW NODE LIST, and so on.
SET¶
The system-variable surface differs significantly from MySQL. Most are accepted only for syntactic compatibility. Variables you can actually set today:
ROLE,SQL_MODE,TIME_ZONE.
DML statements¶
SELECT¶
SELECT ... FOR UPDATE is currently single-table only.
INSERT¶
The
LOW_PRIORITY,DELAYED, andHIGH_PRIORITYmodifiers are not supported.
UPDATE¶
The
LOW_PRIORITYandIGNOREmodifiers are not supported.
DELETE¶
The
LOW_PRIORITY,QUICK, andIGNOREmodifiers are not supported.
Subqueries¶
INwith multi-level correlated subqueries is not supported.
LOAD¶
SETis supported but only in the formSET column_name = nullif(expr1, expr2).LOAD DATA LOCALworks on the client side, but you must add--local-infileto your connection arguments.JSONlinesimport is supported via dedicated syntax.Loading from object storage is supported via dedicated syntax.
EXPLAIN¶
The output format of
ExplainandExplain Analyzefollows PostgreSQL and differs significantly from MySQL.JSON output is not supported.
Other¶
REPLACEdoes not support aVALUES row_constructor_listform.
Advanced SQL features¶
Triggers are not supported.
Stored procedures are not supported.
The event scheduler is not supported.
User-defined functions are not supported.
Materialized views are not supported.
Data types¶
BOOL: unlike MySQL where boolean is reallyint, MatrixOne Intelligence has a true boolean type whose values can only betrueorfalse.DECIMAL: inDECIMAL(P, D), both the maximum precisionPand the decimal scaleDare 38 in MatrixOne Intelligence; MySQL allows up to 65 and 30 respectively.Floating point: MySQL deprecated
Float(M, D)andDouble(M, D)after 8.0.17, but MatrixOne Intelligence still supports them.DATETIME: MySQL ranges from'1000-01-01 00:00:00'to'9999-12-31 23:59:59'. MatrixOne Intelligence ranges from'0001-01-01 00:00:00'to'9999-12-31 23:59:59'.TIMESTAMP: MySQL ranges from'1970-01-01 00:00:01.000000'UTC to'2038-01-19 03:14:07.999999'UTC. MatrixOne Intelligence ranges from'0001-01-01 00:00:00'UTC to'9999-12-31 23:59:59'UTC.MatrixOne supports
UUID.MatrixOne supports vector types.
MatrixOne supports the
DATALINKtype.Spatial types are not supported.
The
SETtype is not supported.The
MEDIUMINTtype is not supported.
Indexes and constraints¶
MatrixOne supports vector indexes.
Secondary indexes are syntactically accepted but currently provide no actual speedup.
Foreign keys do not support
ON CASCADE DELETE.
Partition support¶
Six partition types are supported:
KEY,HASH,RANGE,RANGE COLUMNS,LIST,LIST COLUMNS.Partition pruning works for
KEYandHASH; the other four are not yet implemented.Subpartitions are syntactically accepted but not functional.
ADD / DROP / TRUNCATE PARTITIONis not yet supported.
Functions and operators¶
Aggregate functions¶
A MatrixOne Intelligence-specific
Medianfunction is supported.
CAST¶
Type-conversion rules differ significantly from MySQL — see CAST.
Window functions¶
Only
RANK,DENSE_RANK, andROW_NUMBERare supported.
JSON functions¶
Supported:
JQ(),JSON_UNQUOTE,JSON_QUOTE,JSON_EXTRACT,JSON_EXTRACT_FLOAT64(),JSON_EXTRACT_STRING(),JSON_ROW(),TRY_JQ().
System administration functions¶
Supported:
CURRENT_ROLE_NAME(),CURRENT_ROLE(),CURRENT_USER_NAME(),CURRENT_USER,PURGE_LOG().
Storage engine¶
The TAE storage engine in MatrixOne Intelligence is fully developed in-house. MySQL engines such as InnoDB and MyISAM are not supported.
TAE is the only storage engine; you don’t need
ENGINE=XXXto switch engines.
Security and privileges¶
Only
ALTER USERis supported for changing passwords.Setting per-user connection limits is not supported.
IP allowlists for connections are not supported.
Authorization for
LOADfrom a file is not supported.SELECT INTOto a file is partially supported viaCREATE STAGE.
Transactions¶
MatrixOne Intelligence defaults to pessimistic transactions.
Unlike MySQL, DDL statements in MatrixOne Intelligence are transactional — DDL operations can be rolled back inside a transaction.
Table-level
LOCK / UNLOCK TABLEis not supported.
Backup & restore¶
Physical backup via
mobackupis supported.Snapshot backup is supported.
mysqldumpis not supported; usemo-dumpinstead.binlogbackup is not supported.
System variables¶
MatrixOne’s
lower_case_table_nameshas 2 modes; the default is 1.MatrixOne’s
sql_modeonly supportsONLY_FULL_GROUP_BY.
Programming languages¶
The connectors and ORMs for Java, Python, C#, and Golang are largely supported. Connectors and ORMs for other languages may run into compatibility issues.
Other tools¶
Navicat, DBeaver, MySQL Workbench, and HeidiSQL mostly work, but the table-design feature is incomplete because of limited
ALTER TABLEcapabilities.The
xtrabackuptool is not supported.