-
Notifications
You must be signed in to change notification settings - Fork 191
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
sync-diff-inspector: change bit_xor to sum #671
Conversation
[REVIEW NOTIFICATION] This pull request has not been approved. To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Don't think SUM is better then XOR. 🤔 |
Yes, I think so. But So, how about using |
This is not related to UNIQUE column? |
It seems not as simple as I thought. 🥵 |
Change the content of the mysql> select BIT_XOR(cast(crc32(concat_ws('.', j, i, x, j,x, j)) as unsigned)) as CHECKSUM from db_test.t4;
+------------+
| CHECKSUM |
+------------+
| 2478727481 |
+------------+
1 row in set (0.01 sec)
mysql> select BIT_XOR(cast(crc32(concat_ws('.', j, i, x, j,x, j)) as unsigned)) as CHECKSUM from db_test.t5;
+------------+
| CHECKSUM |
+------------+
| 2478727481 |
+------------+
1 row in set (0.00 sec)
mysql> select * from db_test.t5;
+------+-------+------+
| i | j | x |
+------+-------+------+
| 1 | 10001 | 3 |
| 1 | 10011 | 3 |
+------+-------+------+
2 rows in set (0.00 sec)
mysql> select * from db_test.t4;
+------+-------+------+
| i | j | x |
+------+-------+------+
| 1 | 10001 | 2 |
| 1 | 10011 | 2 |
+------+-------+------+
2 rows in set (0.01 sec) Seems that |
What problem does this PR solve?
Issue Number: close #634
What is changed and how it works?
use
SUM
instead ofBIT_XOR
.Check List
Tests