Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions go/test/endtoend/vtgate/queries/misc/misc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,21 @@ func TestStraightJoin(t *testing.T) {
require.Contains(t, fmt.Sprintf("%v", res.Rows), "t1_tbl")
}

func TestFailingOuterJoinInOLAP(t *testing.T) {
// This query was returning different results in MySQL and Vitess
mcmp, closer := start(t)
defer closer()

// Insert data into the 2 tables
mcmp.Exec("insert into t1(id1, id2) values (1,2), (5, 42)")
mcmp.Exec("insert into tbl(id, unq_col, nonunq_col) values (1,2,3), (2,5,3)")

utils.Exec(t, mcmp.VtConn, "set workload = olap")

// This query was
mcmp.Exec("select t1.id1 from t1 left join tbl on t1.id2 = tbl.nonunq_col")
}

func TestColumnAliases(t *testing.T) {
mcmp, closer := start(t)
defer closer()
Expand Down
5 changes: 4 additions & 1 deletion go/vt/vtgate/engine/join.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,10 @@ func (jn *Join) TryStreamExecute(ctx context.Context, vcursor VCursor, bindVars
nil,
jn.Cols,
)}
return callback(result)

if err := callback(result); err != nil {
return err
}
}
}
// This needs to be locking since it's not safe to just use
Expand Down
Loading