MySQL Compatibility Reference
Mist targets full syntax compatibility with MySQL 8.0, powered by the TiDB SQL parser.
✅ Full Supported
⚠️ Partial Limited
📝 Parsed No logic
❌ None Unsupported
Table Operations (DDL)
| Statement | Status | Notes / Supported Syntax |
|---|---|---|
| CREATE TABLE | Full | AUTO_INCREMENT, PRIMARY KEY, UNIQUE, NOT NULL, FOREIGN KEY, ENUM, SET, DATE, YEAR |
| ALTER TABLE | Full | ADD COLUMN, DROP COLUMN, MODIFY COLUMN, RENAME COLUMN |
| DROP TABLE | Full | IF EXISTS support |
| TRUNCATE TABLE | Full | Resets AUTO_INCREMENT counters |
| CREATE INDEX | Full | Unique and non-unique B-Tree indexes |
| DROP INDEX | Full | Removes index from table |
| RENAME TABLE | Full | Renames existing tables |
| SET | Parsed | Variable setting syntax (no execution logic) |
| LOCK TABLES | Parsed | Read/Write lock syntax (no execution logic) |
Data Manipulation (DML)
| Statement | Status | Supported Features |
|---|---|---|
| SELECT | Full | DISTINCT, Aliases, GROUP BY, HAVING, ORDER BY, LIMIT/OFFSET |
| INSERT / REPLACE | Full | Multi-row, INSERT..SELECT, REPLACE INTO, ON DUPLICATE KEY UPDATE |
| UPDATE | Full | Single table updates with WHERE clause |
| DELETE | Full | Single table deletes with WHERE clause |
| UNION | Full | UNION and UNION ALL across multiple SELECTs |
Transactions
| Feature | Status | Notes |
|---|---|---|
| COMMIT / ROLLBACK | Full | ACID guarantees for in-memory operations |
| Nested Transactions | Full | Recursive START TRANSACTION / BEGIN support |
| Savepoints | Full | SAVEPOINT and ROLLBACK TO SAVEPOINT |
| Isolation Levels | Parsed | Syntax recognized but defaults to serializable |
Aggregates & Grouping
| Feature | Status | Details |
|---|---|---|
| Aggregations | Full | COUNT, SUM, MIN, MAX, AVG |
| Grouping | Full | GROUP BY (multi-column), HAVING clause |
| Distinct Count | Full | COUNT(DISTINCT column) support |
Functions & Expressions
| Type | Status | Notable Examples |
|---|---|---|
| Calculated Columns | Full | price * quantity, age + 1, salary / 12 |
| String Functions | Full | UPPER, LOWER, CONCAT, LENGTH, SUBSTRING |
| Conditional | Full | IF(expr, v1, v2), CASE..WHEN..THEN..ELSE..END |
| Temporal | Full | NOW(), CURDATE(), YEAR(), MONTH(), DAY() |
| Mathematical | Full | ROUND, ABS, CEIL, FLOOR |
Filtering & Search
| Feature | Status | Syntax Support |
|---|---|---|
| WHERE Clause | Full | AND, OR, NOT, IN, BETWEEN, IS NULL |
| Pattern Matching | Full | LIKE (with % and _), NOT LIKE, REGEXP, RLIKE |
| Scalar Subqueries | Full | Non-correlated subqueries in SELECT and WHERE |
| Correlated Subqueries | Full | Access outer scope columns from inner query |
| Existential | Full | EXISTS (SELECT..), NOT EXISTS (SELECT..) |
| Case Sensitivity | Full | Case-insensitive regex with (?i) prefix |
Joins & Sets
| Feature | Status | Details |
|---|---|---|
| JOIN Types | Full | INNER JOIN, LEFT JOIN, RIGHT JOIN, CROSS JOIN |
| JOIN Conditions | Full | Standard ON and USING clauses |
| Self Joins | Full | Supported with table aliasing |
Migration from MySQL
Supported
- Standard CRUD and complex WHERE conditions
- Foreign keys with ON DELETE CASCADE
- Complex reporting with GROUP BY and HAVING
- Advanced JOINs with complex ON conditions
- UNION operations for result sets
Action Required
- Remove triggers, views, and stored procedures
- Add explicit transactions for batch operations
- Verify memory usage for extremely large datasets
Data Types
| Category | Status | Details |
|---|---|---|
| Numeric | Full | TINYINT, INT, BIGINT, DECIMAL, FLOAT, DOUBLE, BIT |
| String | Full | CHAR, VARCHAR, TEXT, LONGTEXT, ENUM, SET |
| Temporal | Full | DATE, DATETIME, TIMESTAMP, TIME, YEAR |
Technical Limitations
Operational
- In-Memory: Data is not persistent across restarts (unless using AOF).
- Single Schema: Limited to one database instance per engine.
- No Auth: No user authentication or permission management.
SQL Engine
- Complex Order By: Expression-based ordering (e.g.,
ORDER BY UPPER(name)) is not yet supported. - Stored Logic: No support for Triggers, Views, or Stored Procedures.
- Multi-Sort: Parsing multiple order-by columns is supported, but sorting logic is currently primary-column centric.