We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
测试表DDL: CREATE TABLE t_test ( id int(11) NOT NULL AUTO_INCREMENT, test mediumint(8) unsigned NOT NULL, test1 tinyint(3) unsigned DEFAULT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;
t_test
id
test
test1
主要配置如下: "config": { "name": "test-int", "prome-persist": false, "version": "1.0", "input": { "type": "mysql", "mode": "replication", "config": { "batch-per-second-limit": 10, "nr-scanner": 10, "source": { "host": "127.0.0.1", "password": "xxxx", "port": 3306, "username": "xxx" }, "table-configs": [ { "schema": "test", "table": "t_test" } ], "table-scan-batch": 1000 } }, "output": { "type": "mysql", "config": { "enable-ddl": true, "routes": [ { "match-schema": "test", "match-table": "t_test", "target-schema": "test", "target-table": "t_test_copy" } ], "target": { "host": "127.0.0.1", "password": "xxxx", "port": 3306, "username": "xxx" } } }, "scheduler": { "type": "batch-table-scheduler", "config": { "batch-size": 1, "nr-worker": 10, "queue-size": 1024, "sliding-window-size": 10240 } } }
开启任务之后执行下面的增量DML
DML: insert into t_test values(1,9999999,230);
结果如下 t_test数据
t_test_copy数据
PS:之前在使用go-mysql的时候tinyint 超过128 解析为负数的情况
The text was updated successfully, but these errors were encountered:
@Thy0108 问题是 medium int 是 24 位,golang 里没有原生的对应类型,用了 int32,导致转成 uint32 时候出现问题。 go-mysql replication 模块没问题,binlog 里不带符号的,但 canal 模块有同样的问题。 临时方案你们看能不能把 medium int 改了,其他整数类型都没问题的。我这边也想办法修一下。
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
测试表DDL:
CREATE TABLE
t_test
(id
int(11) NOT NULL AUTO_INCREMENT,test
mediumint(8) unsigned NOT NULL,test1
tinyint(3) unsigned DEFAULT NULL,PRIMARY KEY (
id
)) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;
主要配置如下:
"config": {
"name": "test-int",
"prome-persist": false,
"version": "1.0",
"input": {
"type": "mysql",
"mode": "replication",
"config": {
"batch-per-second-limit": 10,
"nr-scanner": 10,
"source": {
"host": "127.0.0.1",
"password": "xxxx",
"port": 3306,
"username": "xxx"
},
"table-configs": [
{
"schema": "test",
"table": "t_test"
}
],
"table-scan-batch": 1000
}
},
"output": {
"type": "mysql",
"config": {
"enable-ddl": true,
"routes": [
{
"match-schema": "test",
"match-table": "t_test",
"target-schema": "test",
"target-table": "t_test_copy"
}
],
"target": {
"host": "127.0.0.1",
"password": "xxxx",
"port": 3306,
"username": "xxx"
}
}
},
"scheduler": {
"type": "batch-table-scheduler",
"config": {
"batch-size": 1,
"nr-worker": 10,
"queue-size": 1024,
"sliding-window-size": 10240
}
}
}
开启任务之后执行下面的增量DML
DML:
insert into t_test values(1,9999999,230);
结果如下
t_test数据
t_test_copy数据
PS:之前在使用go-mysql的时候tinyint 超过128 解析为负数的情况
The text was updated successfully, but these errors were encountered: