go-mysql-server's goal is to be a drop-in replacement for MySQL, with every query and statement that works in MySQL behaving identically in go-mysql-server. For most syntax and technical questions, you should feel free to refer to the MySQL user manual. Please file issues with any incompatibilities you discover.
- BOOLEAN
- INTEGER
- TINYINT
- SMALLINT
- MEDIUMINT
- INT
- BIGINT
- DECIMAL
- FLOAT
- DOUBLE
- BIT
- DATE
- TIME
- DATETIME
- TIMESTAMP
- YEAR
- CHAR
- VARCHAR
- BINARY
- VARBINARYX
- BLOB
- TINYTEXT
- TEXT
- MEDIUMTEXT
- LONGTEXT
- ENUM
- SET
- JSON
- DELETE
- INSERT
- REPLACE
- SELECT
- SUBQUERIES
- UPDATE
- ADD COLUMN
- ALTER COLUMN
- ALTER TABLE
- CHANGE COLUMN
- CREATE INDEX
- CREATE TABLE
- CREATE VIEW
- DESCRIBE TABLE
- DROP COLUMN
- DROP INDEX
- DROP TABLE
- DROP VIEW
- MODIFY COLUMN
- RENAME COLUMN
- SHOW CREATE TABLE
- SHOW CREATE VIEW
- SHOW DATABASES
- SHOW SCHEMAS
- SHOW TABLES
- BEGIN
- COMMIT
- LOCK TABLES
- START TRANSACTION
- UNLOCK TABLES
- SET
- EXPLAIN
- USE
- WHERE
- HAVING
- LIMIT
- OFFSET
- GROUP BY
- ORDER BY
- DISTINCT
- ALL
- AND
- NOT
- OR
- IF
- CASE / WHEN
- NULLIF
- COALESCE
- IFNULL
- LIKE
- IN / NOT IN
- IS NULL / IS NOT NULL
- INTERVAL
- Scalar subqueries
- Column ordinal references (standard MySQL extension)
- !=
- ==
- >
- <
- >=
- <=
- BETWEEN
- IN
- NOT IN
- REGEXP
- IS NOT NULL
- IS NULL
- AVG
- COUNT and COUNT(DISTINCT)
- MAX
- MIN
- SUM (always returns DOUBLE)
- CROSS JOIN
- INNER JOIN
- LEFT INNER JOIN
- RIGHT INNER JOIN
- NATURAL JOIN
- + (including between dates and intervals)
- - (including between dates and intervals)
- *
- /
- <<
- >>
- &
- |
- ^
- div
- %
Supported both as a table and as expressions but they can't access the parent query scope.
See README.md for the list of supported functions.
The engine is missing many features. The most important ones are noted below. Our goal over time is 100% compatibility, which means adding support for the items in this list.
Some features are relatively easy to support, some are more difficult. Please browse / file issues explaining your use case to make your case for prioritizing missing features, or feel free to discuss an implementation plan with us and submit a PR.
- Prepared statements / Execute
- Outer joins
AUTO INCREMENT
- Transaction snapshotting / rollback
- Check constraint
- Window functions
- Common table expressions (CTEs)
- Stored procedures
- Events
- Cursors
- Triggers
- Users / privileges /
GRANT
/REVOKE
(via SQL) CREATE TABLE AS
DO
HANDLER
IMPORT TABLE
LOAD DATA
/LOAD XML
SELECT FOR UPDATE
TABLE
(alternate select syntax)TRUNCATE
- Alter index
- Alter view
- Create function