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

expression: return NULL when error is not nil #4749

Merged
merged 5 commits into from
Oct 11, 2017
Merged

Conversation

zz-jason
Copy link
Member

No description provided.

@zz-jason
Copy link
Member Author

/run-all-test

@zz-jason
Copy link
Member Author

@XuHuaiyu PTAL

@@ -228,7 +228,7 @@ func (b *builtinPasswordSig) evalString(row []types.Datum) (d string, isNull boo
sc := b.ctx.GetSessionVars().StmtCtx
pass, isNull, err := b.args[0].EvalString(row, sc)
if isNull || err != nil {
return "", false, errors.Trace(err)
return "", err != nil, errors.Trace(err)
Copy link
Member

Choose a reason for hiding this comment

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

Should be return "", true, errors.Trace(err)?

Copy link
Member Author

Choose a reason for hiding this comment

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

no, password(NULL) should return an empty string, not NULL

@coocood
Copy link
Member

coocood commented Oct 11, 2017

LGTM

Copy link
Contributor

@XuHuaiyu XuHuaiyu left a comment

Choose a reason for hiding this comment

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

LGTM

@winoros winoros merged commit 83ace4f into master Oct 11, 2017
@winoros winoros deleted the zz-jason/expression/null branch October 11, 2017 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants