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

Fix the compatibility issue in func FunctionIPv4NumToString #8210

Merged
merged 12 commits into from
Oct 19, 2023

Conversation

solotzg
Copy link
Contributor

@solotzg solotzg commented Oct 18, 2023

What problem does this PR solve?

Issue Number: close #8211
Problem Summary:

CREATE TABLE t0(c0 INT);
ALTER TABLE t0 SET TIFLASH REPLICA 1;
SELECT SLEEP(5);

SELECT /*+ READ_FROM_STORAGE(TIKV[t0])*/t0.c0 FROM t0 WHERE INET_NTOA(t0.c0);
SELECT /*+ READ_FROM_STORAGE(TIFLASH[t0])*/t0.c0 FROM t0 WHERE INET_NTOA(t0.c0); -- ERROR 1105 (HY000): other error for mpp stream: Code: 43, e.displayText() = DB::Exception: Illegal type Int32 of argument of function IPv4NumToString, expected UInt32, e.what() = DB::Exception,

FunctionIPv4NumToString only supports argument whose type is UInt32.

What is changed and how it works?

  • Make FunctionIPv4NumToString support unsigned integer data type.
  • MySQL will return NULL and warning if failed to cast into 4 bytes unsigned integer(include Out of range). Under MPP mode, TiFlash will omit warning.
    • Warning 1411: Incorrect integer value: '?.?.?' for function inet_ntoa

Check List

Tests

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

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Fix the compatibility issue in expression `inet_ntoa()`

Signed-off-by: Zhigao Tong <[email protected]>
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed do-not-merge/needs-linked-issue labels Oct 18, 2023
@solotzg solotzg changed the title Fix tidb 46598 FunctionIPv4NumToString supports integer data type(size <= 4 bytes) Oct 18, 2023
1
Signed-off-by: Zhigao Tong <[email protected]>
@solotzg
Copy link
Contributor Author

solotzg commented Oct 18, 2023

/cc @windtalker

@ti-chi-bot ti-chi-bot bot requested a review from windtalker October 18, 2023 09:42
@solotzg solotzg marked this pull request as draft October 19, 2023 01:12
@ti-chi-bot ti-chi-bot bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 19, 2023
@solotzg solotzg removed the request for review from windtalker October 19, 2023 01:13
2
Signed-off-by: TONG, Zhigao <[email protected]>
3
Signed-off-by: Zhigao Tong <[email protected]>
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 19, 2023
@solotzg solotzg marked this pull request as ready for review October 19, 2023 05:02
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 19, 2023
6
Signed-off-by: Zhigao Tong <[email protected]>
@solotzg solotzg changed the title FunctionIPv4NumToString supports integer data type(size <= 4 bytes) FunctionIPv4NumToString supports unsigned integer (size <= 4 bytes) Oct 19, 2023
7
Signed-off-by: Zhigao Tong <[email protected]>
@ti-chi-bot ti-chi-bot bot removed the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 19, 2023
@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. and removed do-not-merge/needs-triage-completed release-note-none Denotes a PR that doesn't merit a release note. labels Oct 19, 2023
@solotzg solotzg requested a review from guo-shaoge October 19, 2023 09:45
Copy link
Contributor

@yibin87 yibin87 left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Oct 19, 2023
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Oct 19, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-10-19 09:08:13.635393849 +0000 UTC m=+1907291.222503996: ☑️ agreed by windtalker.
  • 2023-10-19 09:50:59.672997373 +0000 UTC m=+1909857.260107503: ☑️ agreed by yibin87.

@solotzg
Copy link
Contributor Author

solotzg commented Oct 19, 2023

/approve

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Oct 19, 2023

@solotzg: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

  • Currently the CI jobs are not prow job style, we need it to notify Jenkins server to run them.
  • 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.

If you have any questions about the PR merge process, please refer to pr process.

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.

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Oct 19, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: guo-shaoge, solotzg, windtalker, yibin87

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [guo-shaoge,solotzg,windtalker,yibin87]

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

@solotzg
Copy link
Contributor Author

solotzg commented Oct 19, 2023

/run-integration-test

@ti-chi-bot ti-chi-bot bot merged commit ea99379 into pingcap:master Oct 19, 2023
@solotzg solotzg deleted the fix-tidb-46598 branch October 19, 2023 12:30
@solotzg solotzg self-assigned this Oct 20, 2023
@solotzg solotzg added the type/bugfix This PR fixes a bug. label Oct 20, 2023
@solotzg
Copy link
Contributor Author

solotzg commented Oct 20, 2023

/cherry-pick release-7.5

@ti-chi-bot
Copy link
Member

@solotzg: new pull request created to branch release-7.5: #8226.

In response to this:

/cherry-pick release-7.5

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.

@solotzg
Copy link
Contributor Author

solotzg commented Oct 20, 2023

/cherry-pick release-7.1

@solotzg
Copy link
Contributor Author

solotzg commented Oct 20, 2023

/cherry-pick release-6.5

@ti-chi-bot
Copy link
Member

@solotzg: new pull request created to branch release-7.1: #8227.

In response to this:

/cherry-pick release-7.1

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.

ti-chi-bot pushed a commit to ti-chi-bot/tiflash that referenced this pull request Oct 20, 2023
@ti-chi-bot
Copy link
Member

@solotzg: new pull request created to branch release-6.5: #8228.

In response to this:

/cherry-pick release-6.5

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.

ti-chi-bot pushed a commit to ti-chi-bot/tiflash that referenced this pull request Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

INET_NTOA support unsigned integer (size <= 4 bytes)
5 participants