-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
planner: fixup some bugs with DEFAULT
expression (#13168)(#13211)(#12550)(#11901)
#13682
planner: fixup some bugs with DEFAULT
expression (#13168)(#13211)(#12550)(#11901)
#13682
Conversation
/run-all-tests |
/run-all-tests |
dbName = c.DBName | ||
} | ||
return colName, origColName, tblName, c.OrigTblName, c.DBName | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This return
can be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@djshow832 In Golang, if function has return values, it must explicit call return
keyword. e.g
func f1() {
fmt.Println("f1")
}
// print: f1
vs
func f1() (value int){
fmt.Println("f2")
value = 1
}
// compiler error: missing return at end of function
Any conflicting files? |
DEFAULT
expressionDEFAULT
expression (#13168)(#13211)(#12550)(#11901)
LGTM |
@djshow832, PTAL. |
@Deardrops It's better to cherry pick these PRs one by one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@zz-jason Got it, I will pay attention to it in later PR. |
@djshow832, @zz-jason, PTAL. |
Please resolve conflicts @Deardrops |
/run-all-tests |
/merge |
Your auto merge job has been accepted, waiting for 13784, 13306, 13737, 13938 |
/run-all-tests |
@jackysp all tests passed, PTAL |
@djshow832, @zz-jason, PTAL. |
/merge |
/run-all-tests |
@Deardrops merge failed. |
@djshow832, @zz-jason, @jackysp, PTAL. |
/merge |
/run-all-tests |
What problem does this PR solve?
Cherry-pick #13168 #13211 #12550 #11901
Related PR pingcap/parser#648
These are some bugs with
DEFAULT
expression:insert t set c1 = default
, TiDB will be panic. This bugs also occur inREPLACE
/UPDATE
/ON DUPLICATED UPDATE
statement (planner: Fixup error when assignDEFAULT
inINSERT/UPDATE/REPLACE ... SET ...
statement #13211 planner: Support assignDEFAULT
inON DUPLICATE KEY UPDATE
statement #13168). Meanwhile, in these statements, if columnc1
is a generated column, MySQL allow these statements, but TiDB will throw an unexpected error (field c1 not found
). (planner: fill missing origin table name forDEFAULT()
function #12550)DEFAULT
value into generated columns. e.g. (planner: allow insertdefault
into generated columns #11901)What is changed and how it works?
To solve 1st bugs, we split a huge PR into 3 tiny PR (#13211 #12550 #13168), for convenient of reviewing. Both of them are merged into
master
branch. After that, we cherry pick these 3 tiny PR in one PR.Also, PR #11901 (the 2nd bug above) is related to
DEFAULT
expression, we cherry pick it in passing.Conflicting files:
Check List
Tests
Code changes
Side effects
Related changes
Release note