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

canal_json don't support nil value for uint64 #4736

Closed
Tracked by #4737
maxshuang opened this issue Mar 2, 2022 · 1 comment · Fixed by #4741
Closed
Tracked by #4737

canal_json don't support nil value for uint64 #4736

maxshuang opened this issue Mar 2, 2022 · 1 comment · Fixed by #4741
Labels
affects-5.4 area/ticdc Issues or PRs related to TiCDC. severity/critical type/bug The issue is confirmed as a bug.

Comments

@maxshuang
Copy link
Contributor

maxshuang commented Mar 2, 2022

What did you do?

  1. Setup kafka inetgration test
  2. Create table t1(id int primary key, c1 unsigned int);
  3. insert into t1(id) values(1);

What did you expect to see?

kafka sink work normally

What did you see instead?

Error like:
[2022/03/01 18:27:11.489 +08:00] [PANIC] [canal.go:167] [“unsigned value not in type uint64”] [column="{“name”:“mch_id”,“type”:8,“flag”:193,“value”:null}"]

Detail:
trigger senarios:
column define default null at creating + insert without explicit column

if !mysql.HasNotNullFlag(col.Flag) {

image

switch v := c.Value.(type) {

image

Versions of the cluster

Upstream TiDB cluster version (execute SELECT tidb_version(); in a MySQL client):

v5.4.0

Upstream TiKV version (execute tikv-server --version):

v5.4.0

TiCDC version (execute cdc version):

v5.4.0
@maxshuang maxshuang added type/bug The issue is confirmed as a bug. area/ticdc Issues or PRs related to TiCDC. labels Mar 2, 2022
@3AceShowHand
Copy link
Contributor

[column="{“name”:“mch_id”,“type”:8,“flag”:193,“value”:null}"]

Flag = 193 = 128 + 64 + 1 == UnsignedFlag | NullableFlag | BinaryFlag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-5.4 area/ticdc Issues or PRs related to TiCDC. severity/critical type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants