Summary
Marino does not parse the CLONE statement used by InnoDB's clone plugin to either snapshot the current instance to a local directory or copy a remote donor instance.
MySQL version
Introduced in MySQL 8.0.17.
Current state in marino
grep -in '\\bCLONE\\b' parser/parser.y parser/keywords.go returns no matches.
Example SQL
Local clone (snapshot the current data dir):
CLONE LOCAL DATA DIRECTORY = '/var/lib/mysql-clone';
Remote clone from a donor:
CLONE INSTANCE FROM 'donor_user'@'donor.example':3306
IDENTIFIED BY 'donor_password';
Remote clone with DATA DIRECTORY and SSL options:
CLONE INSTANCE FROM 'repl'@'donor.example':3306
IDENTIFIED BY 'p'
DATA DIRECTORY = '/var/lib/mysql-clone'
REQUIRE SSL;
CLONE INSTANCE FROM 'repl'@'donor.example':3306
IDENTIFIED BY 'p'
REQUIRE NO SSL;
Validation
CLONE LOCAL DATA DIRECTORY = '/tmp/clone-target-...'; parses and (with the clone plugin loaded) executes against MySQL 9.2.0 Community. The remote CLONE INSTANCE FROM form parses (server returned ER_CLONE_DONOR_NOT_IN_LIST — not ER_PARSE_ERROR — confirming syntactic acceptance).
Notes for the implementer
Summary
Marino does not parse the
CLONEstatement used by InnoDB's clone plugin to either snapshot the current instance to a local directory or copy a remote donor instance.MySQL version
Introduced in MySQL 8.0.17.
Current state in marino
grep -in '\\bCLONE\\b' parser/parser.y parser/keywords.goreturns no matches.Example SQL
Local clone (snapshot the current data dir):
Remote clone from a donor:
Remote clone with
DATA DIRECTORYand SSL options:Validation
CLONE LOCAL DATA DIRECTORY = '/tmp/clone-target-...';parses and (with the clone plugin loaded) executes against MySQL 9.2.0 Community. The remoteCLONE INSTANCE FROMform parses (server returnedER_CLONE_DONOR_NOT_IN_LIST— notER_PARSE_ERROR— confirming syntactic acceptance).Notes for the implementer
CLONEas a keyword (likely non-reserved).CloneStmtAST with two flavors: local (withDATA DIRECTORYpath) and instance (donor user-host-port +IDENTIFIED BY+ optionalDATA DIRECTORY+REQUIRE [NO] SSL).