pingcap / parser

A MySQL Compatible SQL Parser
Apache License 2.0
1.41k stars 489 forks source link

set right not null flag when newing extra PK #1189

Closed fzhedu closed 3 years ago

fzhedu commented 3 years ago

What problem does this PR solve?

fix https://github.com/pingcap/tics/issues/1509, where the extra PK 's not null flag is not right set.

What is changed and how it works?

set the not null flag for extran PK

Check List

Tests

Side effects

Related changes

leiysky commented 3 years ago

/LGTM

leiysky commented 3 years ago

/run-all-tests

hanfei1991 commented 3 years ago

We'd better add a case (even manually) to prove that this change will work and be necessary.

fzhedu commented 3 years ago

We'd better add a case (even manually) to prove that this change will work and be necessary.

a unit test is added in tidb

kennytm commented 3 years ago

/lgtm

kennytm commented 3 years ago

/merge

ti-srebot commented 3 years ago

/run-all-tests

ti-srebot commented 3 years ago

cherry pick to release-4.0 failed

solotzg commented 3 years ago

@fzhedu Shall we cherry-pick it to release-5.0?