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

值由Null变为空字符串时,isUpdated属性为false #135

Closed
zhenghub opened this issue Dec 1, 2015 · 4 comments
Closed

值由Null变为空字符串时,isUpdated属性为false #135

zhenghub opened this issue Dec 1, 2015 · 4 comments
Labels
Milestone

Comments

@zhenghub
Copy link

zhenghub commented Dec 1, 2015

mysql版本是5.5
将一个varchar类型的列的值由NULL,改为''时,从canal获取的entry的column里,isupdated属性为false。看了下LogEventConverter,感觉是isUpdated方法有个bug。newValue为"",旧值为NULL时,旧的column.getValue()为""。

@agapple
Copy link
Member

agapple commented Dec 2, 2015

column.isNull()方法可以判断是否为null值

@zhenghub
Copy link
Author

zhenghub commented Dec 2, 2015

这是在otter中发现的,otter使用了canal的column.isUpdated方法来判断是否发生了变更,然后就有些列同步错误了。

agapple added a commit that referenced this issue Dec 2, 2015
@agapple
Copy link
Member

agapple commented Dec 2, 2015

多谢反馈,问题代码已经修复,下个版本可发布

@zhenghub
Copy link
Author

zhenghub commented Dec 2, 2015

不客气。期待canal与otter更加完善

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

No branches or pull requests

2 participants