mysql - v8.0.19 maxwell- v1.24.1
Я выполнил несколько запросов на создание таблиц со значениями по умолчанию для полей.
CREATE TABLE `TableInfoTest` (
`table_name` varchar(100) NOT NULL,
`ttl` bigint(20) DEFAULT NULL,
`namespace` varchar(100) NOT NULL,
`environment` varchar(100) NOT NULL,
`version` bigint(20) DEFAULT NULL,
`primary_key` varchar(255) DEFAULT ('environment,namespace,table_name'),
`table_schema` json DEFAULT NULL,
`partition_key` varchar(100) DEFAULT NULL,
`partition_strategy` enum('HASH_BASED','RANGE_BASED') DEFAULT NULL,
`updated_time` bigint(20) DEFAULT NULL,
`created_time` bigint(20) DEFAULT NULL,
PRIMARY KEY (environment,namespace,table_name)
)'
Это работает правильно, и таблица создается. Однако maxwell завершается ошибкой со следующей ошибкой -
10:14:41,575 ERROR SchemaChange - Error parsing SQL: '/* ApplicationName=DataGrip 2019.3.3 */ CREATE TABLE `TableInfoTest` (
`table_name` varchar(100) NOT NULL,
`ttl` bigint(20) DEFAULT NULL,
`namespace` varchar(100) NOT NULL,
`environment` varchar(100) NOT NULL,
`version` bigint(20) DEFAULT NULL,
`primary_key` varchar(255) DEFAULT ('environment,namespace,table_name'),
`table_schema` json DEFAULT NULL,
`partition_key` varchar(100) DEFAULT NULL,
`partition_strategy` enum('HASH_BASED','RANGE_BASED') DEFAULT NULL,
`updated_time` bigint(20) DEFAULT NULL,
`created_time` bigint(20) DEFAULT NULL,
PRIMARY KEY (environment,namespace,table_name)
)'
10:14:41,576 ERROR AbstractSchemaStore - Error on bin log position Position[BinlogPosition[master.000149:750789115], lastHeartbeat=1583910759789]
com.zendesk.maxwell.schema.ddl.MaxwellSQLSyntaxError: (
at com.zendesk.maxwell.schema.ddl.MysqlParserListener.visitErrorNode(MysqlParserListener.java:93)
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 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:94)
at com.zendesk.maxwell.schema.ddl.SchemaChange.parse(SchemaChange.java:106)
at com.zendesk.maxwell.schema.AbstractSchemaStore.resolveSQL(AbstractSchemaStore.java:49)
at com.zendesk.maxwell.schema.MysqlSchemaStore.processSQL(MysqlSchemaStore.java:102)
at com.zendesk.maxwell.replication.BinlogConnectorReplicator.processQueryEvent(BinlogConnectorReplicator.java:316)
at com.zendesk.maxwell.replication.BinlogConnectorReplicator.processQueryEvent(BinlogConnectorReplicator.java:338)
at com.zendesk.maxwell.replication.BinlogConnectorReplicator.getRow(BinlogConnectorReplicator.java:610)
at com.zendesk.maxwell.replication.BinlogConnectorReplicator.work(BinlogConnectorReplicator.java:180)
at com.zendesk.maxwell.util.RunLoopProcess.runLoop(RunLoopProcess.java:34)
at com.zendesk.maxwell.Maxwell.startInner(Maxwell.java:223)
at com.zendesk.maxwell.Maxwell.start(Maxwell.java:156)
at com.zendesk.maxwell.Maxwell.main(Maxwell.java:244)
10:14:41,677 INFO BinlogConnectorLifecycleListener - Binlog disconnected.
10:14:41,678 INFO TaskManager - Stopping 5 tasks
10:14:41,678 ERROR TaskManager - cause:
com.zendesk.maxwell.schema.ddl.MaxwellSQLSyntaxError: (
at com.zendesk.maxwell.schema.ddl.MysqlParserListener.visitErrorNode(MysqlParserListener.java:93) ~[maxwell-1.19.2.jar:?]
at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:41) ~[maxwell-1.19.2.jar:?]
at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:52) ~[maxwell-1.19.2.jar:?]
at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:52) ~[maxwell-1.19.2.jar:?]
at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:52) ~[maxwell-1.19.2.jar:?]
at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:52) ~[maxwell-1.19.2.jar:?]
at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:52) ~[maxwell-1.19.2.jar:?]
at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:52) ~[maxwell-1.19.2.jar:?]
at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:52) ~[maxwell-1.19.2.jar:?]
at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:52) ~[maxwell-1.19.2.jar:?]
at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:52) ~[maxwell-1.19.2.jar:?]
По сути, кажется, что maxwell не может проанализировать операторы со значениями по умолчанию, отличными от NULL. Может кто-нибудь помочь мне понять, как я могу пропустить этот журнал? Когда я попытался добавить флаг --init_position, произошел сбой с ошибкой ava.lang.RuntimeException: Couldn't find database
, даже если запись создания БД существует в таблице схем maxwell.