Skip to content

Semicolon in string is not allowed with x-multi-statement option #1323

@Siarhei-Hanchuk

Description

@Siarhei-Hanchuk

Describe the Bug
If option x-multi-statement is enabled for clickhouse, there is not allowed to use semicolon in strings

Steps to Reproduce
Steps to reproduce the behavior:

  1. My migrations look like
CREATE DICTIONARY default.some_dictionary
(
    id Int32,
    name String
)
PRIMARY KEY id
SOURCE(HTTP(URL 'http://localhost/some_dictionary.csv' FORMAT 'CSVWithNames'))
LIFETIME(MIN 86400 MAX 864000)
LAYOUT(COMPLEX_KEY_HASHED())
SETTINGS(format_csv_delimiter = ';');
  1. I ran migrate with the following options:
    migrate -source file://./migrations -database "clickhouse://localhost:9000/database?x-multi-statement=true" up
  2. See error
error: migration failed in line 0: CREATE DICTIONARY default.some_dictionary
(
    id Int32,
    name String
)
PRIMARY KEY id
SOURCE(HTTP(URL 'http://localhost/some_dictionary.csv' FORMAT 'CSVWithNames'))
LIFETIME(MIN 86400 MAX 864000)
LAYOUT(COMPLEX_KEY_HASHED())
SETTINGS(format_csv_delimiter = '; (details: code: 62, message: Single quoted string is not closed: Syntax error: failed at position 286 (';) (line 10, col 33): ';.)

Expected Behavior
A clear and concise description of what you expected to happen.

Migrate Version
v4.19.0, binary, from docker image (https://hub.docker.com/r/migrate/migrate)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions