Skip to content

Commit

Permalink
tests: make test TestRuntimeHintsInEvolveTasks stable (pingcap#46152)
Browse files Browse the repository at this point in the history
  • Loading branch information
crazycs520 committed Aug 29, 2023
1 parent 58b5760 commit 662be89
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions planner/optimize.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"fmt"
"math"
"math/rand"
"sort"
"strings"
"sync"
"time"
Expand Down Expand Up @@ -749,6 +750,8 @@ func handleStmtHints(hints []*ast.TableOptimizerHint) (stmtHints stmtctx.StmtHin
offs = append(offs, off)
}
offs = append(offs, setVarsOffs...)
// let hint is always ordered, it is convenient to human compare and test.
sort.Ints(offs)
return
}

Expand Down

0 comments on commit 662be89

Please sign in to comment.