Skip to content

Commit

Permalink
Merge branch 'master' into add-index-clone-dt
Browse files Browse the repository at this point in the history
  • Loading branch information
tangenta authored Dec 1, 2022
2 parents fd2af9b + 04b676a commit 9a4d264
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 2 additions & 3 deletions executor/distsql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,8 @@ func TestPartitionTableIndexLookUpReader(t *testing.T) {
tk.MustQuery("select * from t where a>=1 and a<15 order by a").Check(testkit.Rows("1 1", "2 2", "11 11", "12 12"))
tk.MustQuery("select * from t where a>=1 and a<15 order by a limit 1").Check(testkit.Rows("1 1"))
tk.MustQuery("select * from t where a>=1 and a<15 order by a limit 3").Check(testkit.Rows("1 1", "2 2", "11 11"))
tk.MustQuery("select * from t where a>=1 and a<15 limit 3").Check(testkit.Rows("1 1", "2 2", "11 11"))
tk.MustQuery("select * from t where a between 1 and 15 limit 3").Check(testkit.Rows("1 1", "2 2", "11 11"))
tk.MustQuery("select * from t where a between 1 and 15 limit 3 offset 1").Check(testkit.Rows("2 2", "11 11", "12 12"))
tk.MustQuery("select * from t where a between 1 and 15 order by a limit 3").Check(testkit.Rows("1 1", "2 2", "11 11"))
tk.MustQuery("select * from t where a between 1 and 15 order by a limit 3 offset 1").Check(testkit.Rows("2 2", "11 11", "12 12"))
}

func TestPartitionTableRandomlyIndexLookUpReader(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion executor/index_merge_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -950,11 +950,12 @@ func (w *indexMergeProcessWorker) fetchLoopIntersection(ctx context.Context, fet
}, w.handleLoopFetcherPanic(ctx, resultCh, "IndexMergeIntersectionProcessWorker", errCh))
workers = append(workers, worker)
}
loop:
for task := range fetchCh {
select {
case workers[task.parTblIdx%workerCnt].workerCh <- task:
case <-errCh:
break
break loop
}
}
for _, processWorker := range workers {
Expand Down

0 comments on commit 9a4d264

Please sign in to comment.