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

tests(ticdc): fix canal_json_basic charset issue #4558

Merged
merged 10 commits into from
Feb 11, 2022

Conversation

Rustin170506
Copy link
Member

@Rustin170506 Rustin170506 commented Feb 10, 2022

What problem does this PR solve?

Issue Number: ref #4555

What is changed and how it works?

sync diff will concat_ws all fields when calculating checksum. This causes some string conversions. Then an error occurs during the conversion.

[2022/02/11 08:00:17.680 +00:00] [WARN] [utils.go:741] ["execute checksum query fail"] [query="SELECT COUNT(*) as CNT, BIT_XOR(CAST(CRC32(CONCAT_WS(',', `id`, `t_tinyint`, `t_tinyint_unsigned`, `t_smallint`, `t_smallint_unsigned`, `t_mediumint`, `t_mediumint_unsigned`, `t_int`, `t_int_unsigned`, `t_bigint`, `t_bigint_unsigned`, `t_boolean`, round(`t_float`, 5-floor(log10(abs(`t_float`)))), round(`t_double`, 14-floor(log10(abs(`t_double`)))), `t_decimal`, `t_char`, `t_varchar`, `c_binary`, `c_varbinary`, `t_tinytext`, `t_text`, `t_mediumtext`, `t_longtext`, `t_tinyblob`, `t_blob`, `t_mediumblob`, `t_longblob`, `t_date`, `t_datetime`, `t_timestamp`, `t_time`, `t_enum`, `t_set`, `t_json`, CONCAT(ISNULL(`id`), ISNULL(`t_tinyint`), ISNULL(`t_tinyint_unsigned`), ISNULL(`t_smallint`), ISNULL(`t_smallint_unsigned`), ISNULL(`t_mediumint`), ISNULL(`t_mediumint_unsigned`), ISNULL(`t_int`), ISNULL(`t_int_unsigned`), ISNULL(`t_bigint`), ISNULL(`t_bigint_unsigned`), ISNULL(`t_boolean`), ISNULL(round(`t_float`, 5-floor(log10(abs(`t_float`))))), ISNULL(round(`t_double`, 14-floor(log10(abs(`t_double`))))), ISNULL(`t_decimal`), ISNULL(`t_char`), ISNULL(`t_varchar`), ISNULL(`c_binary`), ISNULL(`c_varbinary`), ISNULL(`t_tinytext`), ISNULL(`t_text`), ISNULL(`t_mediumtext`), ISNULL(`t_longtext`), ISNULL(`t_tinyblob`), ISNULL(`t_blob`), ISNULL(`t_mediumblob`), ISNULL(`t_longblob`), ISNULL(`t_date`), ISNULL(`t_datetime`), ISNULL(`t_timestamp`), ISNULL(`t_time`), ISNULL(`t_enum`), ISNULL(`t_set`), ISNULL(`t_json`))))AS UNSIGNED)) as CHECKSUM FROM `test`.`multi_data_type` WHERE ((TRUE) AND (TRUE));"] [args=null] [error="Error 3854: Cannot convert string '\\x89PNG\r\n...' from binary to utf8mb4"]

This value is not a valid utf8 value.
image

So I modified it for now. The exact reason why it worked before the default charset change is still under investigation.

Check List

Tests

  • Integration test

Code changes

None

Side effects

None

Related changes

None

Release note


None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Feb 10, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • amyangfei
  • overvenus

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-triage-completed labels Feb 10, 2022
@Rustin170506
Copy link
Member Author

/run-all-tests

@ti-chi-bot ti-chi-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 10, 2022
@Rustin170506
Copy link
Member Author

/run-kafka-integration-test

@Mini256
Copy link
Member

Mini256 commented Feb 10, 2022

/check-issue-triage-complete

@Rustin170506
Copy link
Member Author

/run-kafka-integration-test

@ti-chi-bot ti-chi-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 10, 2022
@overvenus
Copy link
Member

/run-kafka-integration-test

@Rustin170506
Copy link
Member Author

/run-kafka-integration-test

1 similar comment
@Rustin170506
Copy link
Member Author

/run-kafka-integration-test

@Rustin170506
Copy link
Member Author

/run-all-tests

@Rustin170506 Rustin170506 changed the title tests(ticdc): fix canal_json_basic collation issue tests(ticdc): fix canal_json_basic charset issue Feb 11, 2022
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Feb 11, 2022
@amyangfei
Copy link
Contributor

sync diff will concat_ws all fields when calculating checksum. This causes some string conversions. Then an error occurs during the conversion.

Is this a bug of sync-diff?

@Rustin170506
Copy link
Member Author

sync diff will concat_ws all fields when calculating checksum. This causes some string conversions. Then an error occurs during the conversion.

Is this a bug of sync-diff?

I think this is a bug in tidb, because the sql is executed in tidb.

@amyangfei
Copy link
Contributor

sync diff will concat_ws all fields when calculating checksum. This causes some string conversions. Then an error occurs during the conversion.

Is this a bug of sync-diff?

I think this is a bug in tidb, because the sql is executed in tidb.

Do we have a linked issue in TiDB

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Feb 11, 2022
@Rustin170506
Copy link
Member Author

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 52aa725

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Feb 11, 2022
@ti-chi-bot
Copy link
Member

@hi-rustin: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@Rustin170506
Copy link
Member Author

/run-verify

@ti-chi-bot ti-chi-bot merged commit 7bcfae4 into pingcap:master Feb 11, 2022
zhaoxinyu pushed a commit to zhaoxinyu/ticdc that referenced this pull request Feb 16, 2022
@Rustin170506 Rustin170506 deleted the rustin-patch-test-fix branch August 15, 2022 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants