executor: Close executor in join

This commit is contained in:
Ewan Chou
2016-02-01 15:28:32 +08:00
parent ae18be952f
commit cb57f7a4a2

View File

@ -567,6 +567,7 @@ func (e *JoinOuterExec) Next() (*Row, error) {
return nil, errors.Trace(err)
}
if row == nil {
e.innerExec.Close()
e.innerExec = nil
if e.gotRow {
continue
@ -635,6 +636,7 @@ func (e *JoinInnerExec) Next() (*Row, error) {
return nil, errors.Trace(err)
}
if row == nil {
exec.Close()
e.innerExecs[e.cursor] = nil
if e.cursor == 0 {
e.done = true