Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL index rename is erroring #376

Closed
leeparayno opened this issue Jul 8, 2016 · 2 comments
Closed

MySQL index rename is erroring #376

leeparayno opened this issue Jul 8, 2016 · 2 comments

Comments

@leeparayno
Copy link

When performing Rails migrations one of our migrations is performing a MySQL index rename, and the syntax is failing to be parsed and maxwell exits.

6:02:52,432 INFO AbstractSchemaStore - storing schema @BinlogPosition[master.000001:173968538] after applying "ALTER TABLE quote_request_follow_on_data CHANGE model_name model_class_name varchar(255) DEFAULT NULL"
16:02:52,493 ERROR MysqlParserListener - (table_name INDEX index_quote_request_follow_on_data_on_model_name TO index_quote_request_follow_on_data_on_model_class_name)
16:02:52,494 ERROR SchemaChange - Error parsing SQL: 'ALTER TABLE quote_request_follow_on_data RENAME INDEX index_quote_request_follow_on_data_on_model_name TO index_quote_request_follow_on_data_on_model_class_name'
com.zendesk.maxwell.schema.ddl.MaxwellSQLSyntaxError: INDEX
at com.zendesk.maxwell.schema.ddl.MysqlParserListener.visitErrorNode(MysqlParserListener.java:84)
at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:41)
at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:52)
at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:52)
at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:52)
at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:52)
at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:52)
at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:52)
at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:52)
at com.zendesk.maxwell.schema.ddl.SchemaChange.parseSQL(SchemaChange.java:79)
at com.zendesk.maxwell.schema.ddl.SchemaChange.parse(SchemaChange.java:91)
at com.zendesk.maxwell.schema.AbstractSchemaStore.resolveSQL(AbstractSchemaStore.java:33)
at com.zendesk.maxwell.schema.MysqlSchemaStore.processSQL(MysqlSchemaStore.java:47)
at com.zendesk.maxwell.MaxwellReplicator.processQueryEvent(MaxwellReplicator.java:324)
at com.zendesk.maxwell.MaxwellReplicator.getRow(MaxwellReplicator.java:303)
at com.zendesk.maxwell.MaxwellReplicator.work(MaxwellReplicator.java:114)
at com.zendesk.maxwell.RunLoopProcess.runLoop(RunLoopProcess.java:31)
at com.zendesk.maxwell.Maxwell.run(Maxwell.java:76)
at com.zendesk.maxwell.Maxwell.main(Maxwell.java:82)

@osheroff
Copy link
Collaborator

osheroff commented Jul 9, 2016

ok, this is new syntax in 5.7 it seems. Will fix this, need to also generate a bunch of test SQL from 5.7's test suite.

osheroff pushed a commit that referenced this issue Jul 14, 2016
This is a bugfix release, which fixes:
- #376, a problem parsing
  RENAME INDEX
- #371, a problem with the
  SERIAL datatype
- #362, we now preserve the
  original casing of columns
- #373, we were incorrectly
  expecting heartbeats to work under 5.1
osheroff pushed a commit that referenced this issue Jul 14, 2016
This is a bugfix release, which fixes:
- #376, a problem parsing
  RENAME INDEX
- #371, a problem with the
  SERIAL datatype
- #362, we now preserve the
  original casing of columns
- #373, we were incorrectly
  expecting heartbeats to work under 5.1
@osheroff
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants