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 bug: when the updated data does not change, there is no need to check the constraints #12753

Merged
merged 4 commits into from
Nov 15, 2023

Conversation

ouyuanning
Copy link
Contributor

@ouyuanning ouyuanning commented Nov 15, 2023

…check the constraints (#12732)

fix bug: when the updated data does not change, there is no need to check the constraints

you can repro like:

create table f1 (a int primary key);
create table c1(aa int primary key, bb int, CONSTRAINT `fk_bb` FOREIGN KEY (`bb`) REFERENCES `f1`(`a`));
insert into f1 values (1);
insert into c1 values (1,1);
update f1 set a=a;  //MO throw error.  but MySQL not.      this PR will fix it

Approved by: @heni02, @badboynt1, @aunjgr

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

issue #12710

What this PR does / why we need it:

…heck the constraints (matrixorigin#12732)

fix bug:  when the updated data does not change, there is no need to check the constraints

you can repro like:
```
create table f1 (a int primary key);
create table c1(aa int primary key, bb int, CONSTRAINT `fk_bb` FOREIGN KEY (`bb`) REFERENCES `f1`(`a`));
insert into f1 values (1);
insert into c1 values (1,1);
update f1 set a=a;  //MO throw error.  but MySQL not.      this PR will fix it
```

Approved by: @heni02, @badboynt1, @aunjgr
@matrix-meow matrix-meow added the size/S Denotes a PR that changes [10,99] lines label Nov 15, 2023
@mergify mergify bot added the kind/bug Something isn't working label Nov 15, 2023
@sukki37 sukki37 merged commit 79ee4c1 into matrixorigin:1.0-dev Nov 15, 2023
6 of 8 checks passed
@ouyuanning ouyuanning deleted the cp-12732 branch December 20, 2023 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working size/S Denotes a PR that changes [10,99] lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants