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 function substr with 3 arguments bug #1296

Merged
merged 1 commit into from
Dec 23, 2020

Conversation

marsishandsome
Copy link
Contributor

@marsishandsome marsishandsome commented Dec 22, 2020

What problem does this PR solve?

Issue Number: close #xxx

Problem Summary: tiflash funcion substr with 3 arguments has bug

create table t (c varchar(64));
ALTER TABLE t SET TIFLASH REPLICA 1;
insert into t values ("ABC"), ("DEF"), ("");
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;

analyze table t;
select substr(c, 2), count(1) from t group by substr(c, 2);

image

What is changed and how it works?

Proposal: xxx

What's Changed:

How it Works:

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to the release branch

Check List

Tests

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

Side effects

  • Performance regression
    • Consumes more CPU
    • Consumes more MEM
  • Breaking backward compatibility

Release note

@marsishandsome marsishandsome added needs-cherry-pick-release-3.1 PR which needs to be cherry-picked to release-3.1 needs-cherry-pick-release-4.0 PR which needs to be cherry-picked to release-4.0 labels Dec 22, 2020
@marsishandsome marsishandsome force-pushed the feature/fix-substring-bug branch from 331e0a3 to 34f71a7 Compare December 22, 2020 06:55
@marsishandsome
Copy link
Contributor Author

/run-all-tests

@marsishandsome
Copy link
Contributor Author

/run-all-tests

@marsishandsome marsishandsome force-pushed the feature/fix-substring-bug branch 2 times, most recently from 78f247b to e571416 Compare December 22, 2020 08:50
@marsishandsome
Copy link
Contributor Author

/run-all-tests

@marsishandsome marsishandsome force-pushed the feature/fix-substring-bug branch from e571416 to b0bd533 Compare December 23, 2020 02:49
@marsishandsome
Copy link
Contributor Author

/run-all-tests

Copy link
Contributor

@windtalker windtalker 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-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Dec 23, 2020
@windtalker windtalker merged commit 524e0b3 into pingcap:master Dec 23, 2020
@ti-srebot
Copy link
Collaborator

cherry pick to release-3.1 in PR #1300

@ti-srebot
Copy link
Collaborator

cherry pick to release-4.0 in PR #1301

@zanmato1984 zanmato1984 added the needs-cherry-pick-release-5.0-rc PR which needs to be cherry-picked to release-5.0-rc label Dec 23, 2020
@zanmato1984
Copy link
Contributor

/run-cherry-picker

@ti-srebot
Copy link
Collaborator

cherry pick to release-5.0-rc in PR #1304

@zanmato1984 zanmato1984 added the type/bugfix This PR fixes a bug. label Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-3.1 PR which needs to be cherry-picked to release-3.1 needs-cherry-pick-release-4.0 PR which needs to be cherry-picked to release-4.0 needs-cherry-pick-release-5.0-rc PR which needs to be cherry-picked to release-5.0-rc status/LGT1 Indicates that a PR has LGTM 1. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants