{"action":"created","issue":{"url":"https://api.github.com/repos/zendesk/maxwell/issues/112","labels_url":"https://api.github.com/repos/zendesk/maxwell/issues/112/labels{/name}","comments_url":"https://api.github.com/repos/zendesk/maxwell/issues/112/comments","events_url":"https://api.github.com/repos/zendesk/maxwell/issues/112/events","html_url":"https://github.com/zendesk/maxwell/issues/112","id":108637116,"number":112,"title":"Resetting AUTO_INCREMENT in ALTER statement causes crash","user":{"login":"Komnomnomnom","id":107748,"avatar_url":"https://avatars.githubusercontent.com/u/107748?v=3","gravatar_id":"","url":"https://api.github.com/users/Komnomnomnom","html_url":"https://github.com/Komnomnomnom","followers_url":"https://api.github.com/users/Komnomnomnom/followers","following_url":"https://api.github.com/users/Komnomnomnom/following{/other_user}","gists_url":"https://api.github.com/users/Komnomnomnom/gists{/gist_id}","starred_url":"https://api.github.com/users/Komnomnomnom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Komnomnomnom/subscriptions","organizations_url":"https://api.github.com/users/Komnomnomnom/orgs","repos_url":"https://api.github.com/users/Komnomnomnom/repos","events_url":"https://api.github.com/users/Komnomnomnom/events{/privacy}","received_events_url":"https://api.github.com/users/Komnomnomnom/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-28T11:11:49Z","updated_at":"2015-09-28T11:32:45Z","closed_at":null,"body":"Updating a table's AUTO_INCREMENT value causes maxwell to crash when it encounters the statement in the bin log.\r\n\r\nMaxwell 0.11.2\r\nMySQL 5.1.\r\n\r\nStatement to reproduce\r\n\r\n```sql\r\nALTER TABLE test_table AUTO_INCREMENT = 1\r\n```\r\n\r\n```sql\r\n11:01:31,725 DEBUG SchemaChange - SQL_PARSE <- \"ALTER TABLE test_table AUTO_INCREMENT = 1\"\r\nline 1:41 no viable alternative at input 'AUTO_INCREMENT'\r\n11:01:31,751 ERROR MysqlParserListener - (alter_specification AUTO_INCREMENT = 1)\r\n11:01:31,751 ERROR SchemaChange - Error parsing SQL: 'ALTER TABLE test_table AUTO_INCREMENT = 1'\r\ncom.zendesk.maxwell.schema.ddl.MaxwellSQLSyntaxError: AUTO_INCREMENT\r\n\tat com.zendesk.maxwell.schema.ddl.MysqlParserListener.visitErrorNode(MysqlParserListener.java:85)\r\n\tat org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:41)\r\n\tat org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:52)\r\n\tat org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:52)\r\n\tat org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:52)\r\n\tat org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:52)\r\n\tat org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:52)\r\n\tat com.zendesk.maxwell.schema.ddl.SchemaChange.parse(SchemaChange.java:67)\r\n\tat com.zendesk.maxwell.MaxwellParser.processQueryEvent(MaxwellParser.java:284)\r\n\tat com.zendesk.maxwell.MaxwellParser.getEvent(MaxwellParser.java:251)\r\n\tat com.zendesk.maxwell.MaxwellParser.run(MaxwellParser.java:93)\r\n\tat com.zendesk.maxwell.Maxwell.run(Maxwell.java:73)\r\n\tat com.zendesk.maxwell.Maxwell.main(Maxwell.java:79)\r\n```\r\n\r\nI assume Maxwell should be safe to ignore this, or does it track the auto increment value?"},"comment":{"url":"https://api.github.com/repos/zendesk/maxwell/issues/comments/143718453","html_url":"https://github.com/zendesk/maxwell/issues/112#issuecomment-143718453","issue_url":"https://api.github.com/repos/zendesk/maxwell/issues/112","id":143718453,"user":{"login":"Komnomnomnom","id":107748,"avatar_url":"https://avatars.githubusercontent.com/u/107748?v=3","gravatar_id":"","url":"https://api.github.com/users/Komnomnomnom","html_url":"https://github.com/Komnomnomnom","followers_url":"https://api.github.com/users/Komnomnomnom/followers","following_url":"https://api.github.com/users/Komnomnomnom/following{/other_user}","gists_url":"https://api.github.com/users/Komnomnomnom/gists{/gist_id}","starred_url":"https://api.github.com/users/Komnomnomnom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Komnomnomnom/subscriptions","organizations_url":"https://api.github.com/users/Komnomnomnom/orgs","repos_url":"https://api.github.com/users/Komnomnomnom/repos","events_url":"https://api.github.com/users/Komnomnomnom/events{/privacy}","received_events_url":"https://api.github.com/users/Komnomnomnom/received_events","type":"User","site_admin":false},"created_at":"2015-09-28T11:32:45Z","updated_at":"2015-09-28T11:32:45Z","body":"Note that as well as the standalone query above it's also valid SQL to update the `AUTO_INCREMENT` in a regular `ALTER` statement. e.g.\r\n\r\n```sql\r\nALTER TABLE `test_table`\r\n\tAUTO_INCREMENT=1,\r\n\tCHANGE COLUMN `test_col` `test_col` VARCHAR(21) NOT NULL COLLATE 'utf8_unicode_ci' FIRST;\r\n```\r\n\r\nThis also causes maxwell to crash.\r\n"}}