Repository navigation
Open
Open
Copy link
Labels
kind/compatibilityThe compatibility with mysql 8.0 should be discussed further.kind/featurepriority/p1Medium priority feature that should be implemented in this version
Milestone
Description
Overview
MatrixOne v3.0 lacks support for several Data Manipulation Language (DML) features that provide syntactic convenience in MySQL 8.0.
Environment
- MatrixOne Version: 8.0.30-MatrixOne-v3.0:5e4210029
- Reference: https://dev.mysql.com/doc/refman/8.0/en/sql-statements.html
1. DO Statement
Current Behavior
DO SLEEP(0.1);Error:
ERROR 20105 (HY000): not supported: do SLEEP(0.1)
Expected Behavior (MySQL 8.0)
Execute expressions without returning results.
Workaround
Use SELECT (though it returns a result set):
SELECT SLEEP(0.1);2. SELECT INTO Variable
Current Behavior
SELECT id INTO @var FROM t1 LIMIT 1;Error:
ERROR 1064 (HY000): SQL parser error
Expected Behavior (MySQL 8.0)
Assign query result directly to user variable.
Workaround
Use SET with subquery:
SET @var = (SELECT id FROM t1 LIMIT 1);3. Row Subqueries (Row Constructor Comparison)
Current Behavior
SELECT * FROM t1 WHERE (id, name) = (SELECT id, name FROM t2 LIMIT 1);Error:
ERROR 20203 (HY000): invalid argument operator =, bad value [TUPLE TUPLE]
Expected Behavior (MySQL 8.0)
Compare row values for multi-column matching.
Workaround
Expand to individual column comparisons:
SELECT * FROM t1
WHERE id = (SELECT id FROM t2 LIMIT 1)
AND name = (SELECT name FROM t2 LIMIT 1);
-- Or use JOIN
SELECT t1.* FROM t1
JOIN t2 ON t1.id = t2.id AND t1.name = t2.name;4. VALUES Statement (MySQL 8.0.19+)
Current Behavior
VALUES (1, 'a'), (2, 'b');Error:
ERROR 1064 (HY000): SQL parser error
Expected Behavior (MySQL 8.0)
Return row values as a table (similar to SELECT without FROM).
Workaround
Use SELECT with UNION ALL:
SELECT 1, 'a' UNION ALL SELECT 2, 'b';5. TABLE Statement (MySQL 8.0.19+)
Current Behavior
TABLE t1;Error:
ERROR 1064 (HY000): SQL parser error
Expected Behavior (MySQL 8.0)
Shortcut for SELECT * FROM t1.
Workaround
Use standard SELECT:
SELECT * FROM t1;Priority Assessment
| Feature | Priority | Impact | Common Usage |
|---|---|---|---|
| Row Subqueries | Medium | Medium | Multi-column comparison in ORM queries |
| SELECT INTO | Low | Medium | Stored procedures (not supported anyway) |
| VALUES | Low | Low | Modern SQL syntax sugar |
| TABLE | Low | Low | Syntax sugar |
| DO | Low | Low | Expression execution |
Recommendation
Row Subqueries has medium priority as it's commonly generated by ORM frameworks for multi-column comparisons.
Metadata
Metadata
Assignees
Labels
kind/compatibilityThe compatibility with mysql 8.0 should be discussed further.kind/featurepriority/p1Medium priority feature that should be implemented in this version
Activity