Skip to content

Schema Parsing - InvalidSchemaError for a valid schema change #2244

@croconut

Description

@croconut

so this is valid sql for a drop db.table command:

drop table actualdb.`otherdbcopy.``otherdbtable`; 

but it looks like maxwell doesnt parse 2 backticks in a row as an escaped backtick.

this fails on 1.44.0 / 1.43.2 with the below error

com.zendesk.maxwell.schema.ddl.InvalidSchemaError: Couldn't find table 'otherdbcopy.``otherdbtable' in database actualdb
	at com.zendesk.maxwell.schema.Database.findTableOrThrow(Database.java:55)
	at com.zendesk.maxwell.schema.ddl.ResolvedTableDrop.apply(ResolvedTableDrop.java:19)
	at com.zendesk.maxwell.schema.AbstractSchemaStore.resolveSQL(AbstractSchemaStore.java:60)
	at com.zendesk.maxwell.schema.MysqlSchemaStore.processSQL(MysqlSchemaStore.java:102)
	at com.zendesk.maxwell.replication.BinlogConnectorReplicator.processQueryEvent(BinlogConnectorReplicator.java:385)
	at com.zendesk.maxwell.replication.BinlogConnectorReplicator.processQueryEvent(BinlogConnectorReplicator.java:407)
	at com.zendesk.maxwell.replication.BinlogConnectorReplicator.getRow(BinlogConnectorReplicator.java:738)
	at com.zendesk.maxwell.replication.BinlogConnectorReplicator.work(BinlogConnectorReplicator.java:235)
	at com.zendesk.maxwell.util.RunLoopProcess.runLoop(RunLoopProcess.java:34)
	at com.zendesk.maxwell.Maxwell.startInner(Maxwell.java:302)
	at com.zendesk.maxwell.Maxwell.start(Maxwell.java:227)
	at com.zendesk.maxwell.Maxwell.main(Maxwell.java:337)

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