Statements not supported yet
The statements and clauses that the Raft DB front-ends refuse today with error 1235 or 1064, and how to tell the two apart.
Raft DB does not run every statement of MySQL and MariaDB. This page lists what is refused today. The list is made from the parser (every place that refuses a statement as unsupported), the executors, and the decision records (D54 to D88). The coverage runs of the MySQL and MariaDB manuals are made by running the examples of the manuals against a real MySQL or MariaDB and Raft DB; they were generated before the later steps (views D70, routines D87, triggers D88 and others), so they still show statements as unsupported that work now. The code wins: when a source disagrees with the parser, trust the parser.
Two kinds of refusal#
| Error | Meaning | Text |
|---|---|---|
1235 (42000) | The statement is valid MySQL or MariaDB, and this version does not do it yet. It is refused rather than guessed. | This version of the Raft DB MySQL front-end doesn't yet support '<what>' |
1064 (42000) | The text is not valid for the parser: a syntax error, or a statement whose first word the parser does not know. The message gives the position. | Syntax error in the SQL statement; ... |
A statement refused with 1235 changes nothing.
Refused with error 1235#
Queries#
SELECT ... INTO OUTFILEandINTO DUMPFILEwrite nothing: error 1290.FETCH FIRST ... WITH TIES(MariaDB).- Window frames in
GROUPSmode. DISTINCTinside an ordinary function call; an aggregate over several expressions (exceptGROUP_CONCAT).- Parenthesised joins (
FROM (a JOIN b ON ...)). LIKE ... ESCAPE;COLLATEto a binary or case-sensitive collation.ORDER BYorLIMITafter aVALUESlist.- A function called inside a routine with a column of the row as an argument.
Data definition#
CREATE TABLE:FULLTEXTandSPATIALindexes, partitioning,REFERENCESinside a column definition,ON UPDATEas a column attribute.ALTER TABLE:ADD FULLTEXT,ADD SPATIAL, partition changes, adding anAUTO_INCREMENTorPRIMARY KEYcolumn, dropping or retyping a column of a unique key, renaming a unique key, changingAUTO_INCREMENTorPRIMARY KEYthroughMODIFY, moving a table to another database, a primary key change when the table has unique keys, adding an expression-default column or aNOT NULLdate, time or JSON column without default to a table that has rows,ALTER CHECK, and any change not in the grammar.RENAME TABLE(useALTER TABLE ... RENAME TO;RENAME USERworks).ALTER DATABASE,ALTER PROCEDURE,ALTER FUNCTION,ALTER EVENT,ALTER INSTANCE,ALTER SERVER,ALTER TABLESPACE.CREATE EVENT,CREATE ROLE,CREATE TABLESPACE,CREATE SERVER,CREATE LOGFILE GROUP,CREATE SPATIAL REFERENCE SYSTEM,CREATE RESOURCE GROUP,CREATE FULLTEXT INDEX,CREATE SPATIAL INDEX.DROP EVENT,DROP ROLE,DROP TABLESPACE,DROP SERVER,DROP LOGFILE GROUP,DROP SPATIAL REFERENCE SYSTEM,DROP RESOURCE GROUP.
Accounts and variables#
- Roles:
GRANT role TO user, proxy grants. GRANTandREVOKEon routines (ON PROCEDURE,ON FUNCTION).IDENTIFIED BY RANDOM PASSWORD.- Account options other than
ACCOUNT UNLOCKandREQUIRE NONE:REQUIRE SSL,PASSWORD EXPIRE,ACCOUNT LOCK, resource limits and the others. SET PERSIST,SET PERSIST_ONLY.
Administration and other#
LOAD DATA,LOAD XML,LOAD INDEX;KILL.ANALYZEandOPTIMIZEwithout the wordTABLE(MariaDBANALYZE SELECT,ANALYZE FORMAT=JSON).EXPLAIN ANALYZE;EXPLAIN FORMATother thanTRADITIONAL;EXPLAINof a statement other thanSELECT,UNION,INSERT,UPDATE,DELETE.- Every
SHOWnot in the list:SHOW MASTER STATUS,SHOW SLAVE STATUS,SHOW REPLICA STATUS,SHOW BINARY LOGS,SHOW BINLOG EVENTS,SHOW ENGINE ... STATUS,SHOW PRIVILEGES,SHOW CREATE USER,SHOW CREATE EVENT,SHOW PROFILE,SHOW PROFILES. - Cursors on prepared statements (
COM_STMT_FETCH). SQL SECURITY INVOKERrights checks; Oracle-style packages and%TYPE.
Refused with error 1064 (the parser does not know the statement or the clause)#
The parser knows the first word of the statements listed in this chapter. A statement that starts with any other word is a syntax error ("unknown statement"). In particular:
HANDLER,XA(distributed transactions),HELP,CHECKSUM TABLE,CACHE INDEX,BINLOG.- Replication and group replication control:
CHANGE REPLICATION SOURCE TO,CHANGE MASTER TO,START REPLICA/START SLAVE,STOP REPLICA/STOP SLAVE,START GROUP_REPLICATION,RESET,PURGE BINARY LOGS. - Plugin and server control:
INSTALL PLUGIN,UNINSTALL PLUGIN,INSTALL COMPONENT,CLONE,IMPORT TABLE,SHUTDOWN,RESTART. SIGNAL,RESIGNALandGET DIAGNOSTICSoutside a stored routine or trigger body (inside, they work).CHECKandREPAIRwithout the wordTABLE.SET ROLE,SET DEFAULT ROLE,SET RESOURCE GROUP,SET STATEMENT ... FOR(MariaDB).- Clauses the grammar of a statement does not have:
INSERT LOW_PRIORITY | HIGH_PRIORITY | DELAYED,INSERT ... PARTITION (...),INSERT ... AS alias,UPDATE/DELETE ... LIMIT offset, count,SELECT ... FETCHin the MySQL dialect,VALUES (...)withoutROWin the MySQL dialect andVALUES ROW(...)in the MariaDB dialect.
Accepted but without effect#
These are not refused, but they do not do what MySQL does:
FOR UPDATE,FOR SHARE,LOCK IN SHARE MODE,LOCK TABLES,LOCK INSTANCE: nothing is locked.FLUSH ...: nothing to flush.ENGINE=,CHARSET=,COLLATE,ROW_FORMAT=and other table, database and column options;ZEROFILL; index hints;USING BTREE.SET TRANSACTION ISOLATION LEVEL ...: the level is always read uncommitted.WITH CHECK OPTIONon views: stored, not enforced.INVISIBLEindexes: kept and used by reads.SHOW STATUS,SHOW ENGINES,SHOW EVENTS: fixed or empty answers.ANALYZE,OPTIMIZE,CHECK,REPAIR TABLE: answer as a healthy InnoDB table.- Privileges
EXECUTE,CREATE ROUTINE,ALTER ROUTINE,TRIGGER,EVENT: can be granted, not enforced.