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

Comparator incorrectly diffs default values with boolean type #3411

Closed
MouLingtao opened this issue Dec 14, 2018 · 3 comments
Closed

Comparator incorrectly diffs default values with boolean type #3411

MouLingtao opened this issue Dec 14, 2018 · 3 comments

Comments

@MouLingtao
Copy link

in commit 4389a25 we modified the comparison method for the default values of the columns.
However, after the revision, new problems have arisen.
We usually set the column's default value of the 'Boolean' type to false or true, but in MySQL, the Boolean is stored as tinyint, which has a value of 0 or 1, so in this new comparison method, the default value compare result is always false.

@MouLingtao
Copy link
Author

MouLingtao commented Dec 14, 2018

Sorry. I have translated it with Google, and I may not have stated it clearly. Please understand.
I posted the original Chinese words for reference.

在提交4389a25中,我们修改了列的默认值的比较方法。
但是,修改之后,出现了新的问题。
我们通常设置Boolean类型的列的默认值为true或false,而且在MySQL中,Boolean以tinyint存储的,它的默认值会被转化成1或0,所以在这个新的比较方法中,由于比较更加严格了,导致了默认值的比较结果恒定为假。因为false转化为string是空字符串,而不是"0"。

@morozov
Copy link
Member

morozov commented Dec 15, 2018

This must be a duplicate of #3377. Please try upgrading to v2.9.1.

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants