Skip to content

Support CLONE statement (CLONE LOCAL / CLONE INSTANCE FROM) #26

@kyleconroy

Description

@kyleconroy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions