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

Conversation

Projects
None yet
4 participants
@zz-jason
Member

zz-jason commented Oct 11, 2017

No description provided.

@zz-jason

This comment has been minimized.

Show comment
Hide comment
@zz-jason

zz-jason Oct 11, 2017

Member

/run-all-test

Member

zz-jason commented Oct 11, 2017

/run-all-test

@zz-jason

This comment has been minimized.

Show comment
Hide comment
@zz-jason
Member

zz-jason commented Oct 11, 2017

@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)

This comment has been minimized.

@coocood

coocood Oct 11, 2017

Member

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

@coocood

coocood Oct 11, 2017

Member

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

This comment has been minimized.

@zz-jason

zz-jason Oct 11, 2017

Member

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

@zz-jason

zz-jason Oct 11, 2017

Member

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

@coocood

This comment has been minimized.

Show comment
Hide comment
@coocood

coocood Oct 11, 2017

Member

LGTM

Member

coocood commented Oct 11, 2017

LGTM

@XuHuaiyu

LGTM

@winoros winoros merged commit 83ace4f into master Oct 11, 2017

3 of 4 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
ci/circleci Your tests passed on CircleCI!
Details
jenkins-ci-tidb/build Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details

@winoros winoros deleted the zz-jason/expression/null branch Oct 11, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment