Skip to content

test: add test case in debezium protocol#5606

Merged
ti-chi-bot[bot] merged 2 commits into
pingcap:masterfrom
wk989898:debeizum-0709
Jul 9, 2026
Merged

test: add test case in debezium protocol#5606
ti-chi-bot[bot] merged 2 commits into
pingcap:masterfrom
wk989898:debeizum-0709

Conversation

@wk989898

@wk989898 wk989898 commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

What problem does this PR solve?

Issue Number: close #5605

What is changed and how it works?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Questions

Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?

Release note

Please refer to [Release Notes Language Style Guide](https://pingcap.github.io/tidb-dev-guide/contribute-to-tidb/release-notes-style-guide.html) to write a quality release note.

If you don't think this PR needs a release note then fill it with `None`.

Summary by CodeRabbit

  • Tests
    • Updated database integration test data to cover an expanded table schema and additional insert/update scenarios.
    • Added coverage for rows with a new text field, a newly added column, and a default-value insert.

Signed-off-by: wk989898 <nhsmwk@gmail.com>
@ti-chi-bot ti-chi-bot Bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 9, 2026
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Updated the tp_time table test fixture in data.sql: added a c_txt column with corresponding insert statement updates, appended an ALTER TABLE adding c_newcol, and added an extra empty-row insert to exercise null datetime value handling.

Changes

tp_time test data update

Layer / File(s) Summary
Extend tp_time schema and DML
tests/integration_tests/debezium_basic/data/data.sql
Added c_txt column to tp_time, updated inserts to supply c_txt values, appended ALTER TABLE adding c_newcol, and added an extra empty-row insert to test null datetime handling.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested labels: lgtm, approved

Suggested reviewers: asddongmen

Poem

A column named c_txt hops into view,
c_newcol follows, with nulls to chew,
One empty row, a debezium test,
This bunny nibbles bugs with zest! 🐰
Hop, commit, and test anew!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The template is present, but key sections like changes, tests, questions, and release note are left unfilled. Fill in what changed, select and describe the tests run, answer the questions, and add a release note or 'None'.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The updated integration test data matches issue #5605 by covering the nullable datetime column added via ALTER TABLE and the empty-row insert that triggered the encode failure.
Out of Scope Changes check ✅ Passed The only touched file is the Debezium integration test fixture, which is directly aligned with the reported bug scenario.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title matches the main change: adding a Debezium protocol test case.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the integration test data in tests/integration_tests/debezium_basic/data/data.sql by adding a new column c_txt to the tp_time table, updating existing insert statements, and appending an ALTER TABLE statement to add another column c_newcol. The review feedback suggests formatting improvements to maintain consistency, specifically using lowercase for default null and adding a missing space in one of the insert statements.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

c_timestamp timestamp null,
c_time time null,
c_year year null,
c_txt varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To maintain consistency with the rest of the table definition (which uses lowercase null and lowercase SQL keywords), please use lowercase default null instead of uppercase DEFAULT NULL.

    c_txt varchar(255) COLLATE utf8mb4_general_ci default null,

insert into tp_time(c_date, c_datetime, c_timestamp, c_time, c_year)
values ('2020-02-20', '2020-02-20 02:20:20', '2020-02-20 02:20:20', '02:20:20', '2020');
insert into tp_time(c_date, c_datetime, c_timestamp, c_time, c_year, c_txt)
values ('2020-02-20', '2020-02-20 02:20:20', '2020-02-20 02:20:20', '02:20:20', '2020','cc');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There is a missing space after the comma before 'cc'. Please add a space to keep the formatting consistent with the other insert statements in this file.

values ('2020-02-20', '2020-02-20 02:20:20', '2020-02-20 02:20:20', '02:20:20', '2020', 'cc');

Signed-off-by: wk989898 <nhsmwk@gmail.com>
@ti-chi-bot ti-chi-bot Bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jul 9, 2026
@wk989898 wk989898 changed the title sink: add test case in debezium protocol test: add test case in debezium protocol Jul 9, 2026
@ti-chi-bot

ti-chi-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 3AceShowHand, lidezhu

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [3AceShowHand,lidezhu]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot Bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jul 9, 2026
@ti-chi-bot

ti-chi-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

[LGTM Timeline notifier]

Timeline:

  • 2026-07-09 08:22:02.137860335 +0000 UTC m=+269908.173955391: ☑️ agreed by 3AceShowHand.
  • 2026-07-09 08:22:09.272611699 +0000 UTC m=+269915.308706765: ☑️ agreed by lidezhu.

@ti-chi-bot

ti-chi-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

@wk989898: You cannot manually add or delete the cherry pick branch category labels. It will be added automatically by bot when the PR is created.

Details

In response to adding label named type/cherry-pick-for-release-nextgen-202603.

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.

@wk989898

wk989898 commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator Author

/retest

@ti-chi-bot ti-chi-bot Bot merged commit 99a351f into pingcap:master Jul 9, 2026
25 checks passed
@ti-chi-bot

Copy link
Copy Markdown
Member

In response to a cherrypick label: new pull request created to branch release-8.5: #5607.

@wk989898

wk989898 commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator Author

/cherry-pick release-nextgen-202603

@ti-chi-bot

Copy link
Copy Markdown
Member

@wk989898: new pull request created to branch release-nextgen-202603: #5609.

Details

In response to this:

/cherry-pick release-nextgen-202603

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.

wk989898 added a commit that referenced this pull request Jul 10, 2026
* init

Signed-off-by: wk989898 <nhsmwk@gmail.com>

* update

Signed-off-by: wk989898 <nhsmwk@gmail.com>

* update

Signed-off-by: wk989898 <nhsmwk@gmail.com>

---------

Signed-off-by: wk989898 <nhsmwk@gmail.com>
Co-authored-by: wk989898 <nhsmwk@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm need-cherry-pick-release-nextgen-202603 needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

debezium encode failed

4 participants