Skip to content

Commit

Permalink
*: fix union scan's bug. (pingcap#4000)
Browse files Browse the repository at this point in the history
  • Loading branch information
hanfei1991 authored Aug 3, 2017
1 parent 0e8bffa commit 5231794
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion executor/union_scan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,13 @@ func (s *testSuite) TestDirtyTransaction(c *C) {
tk.MustExec("truncate table t")
tk.MustExec("insert t values (3, 4)")
tk.MustQuery("select * from t").Check(testkit.Rows("3 4"))
tk.Exec("abort")
tk.MustExec("commit")

tk.MustExec("drop table if exists t")
tk.MustExec("create table t (a int, b int)")
tk.MustExec("insert t values (2, 3), (4, 5), (6, 7)")
tk.MustExec("begin")
tk.MustExec("insert t values (0, 1)")
tk.MustQuery("select * from t where b = 3").Check(testkit.Rows("2 3"))
tk.MustExec("commit")
}
1 change: 1 addition & 0 deletions plan/resolve_indices.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ func (p *PhysicalIndexJoin) ResolveIndices() {

// ResolveIndices implements Plan interface.
func (p *PhysicalUnionScan) ResolveIndices() {
p.basePlan.ResolveIndices()
for _, expr := range p.Conditions {
expr.ResolveIndices(p.children[0].Schema())
}
Expand Down

0 comments on commit 5231794

Please sign in to comment.