Skip to content

Commit

Permalink
expression: fix shadow warning (pingcap#2354)
Browse files Browse the repository at this point in the history
  • Loading branch information
ngaut authored and shenli committed Dec 30, 2016
1 parent b180334 commit 42dd3c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion expression/constant_propagation.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,9 @@ func (s *propagateConstantSolver) pickNewEQConds(visited []bool) (retMapper map[
}
col, con := s.validPropagateCond(cond, eqFuncNameMap)
// Then we check if this CNF item is a false constant. If so, we will set the whole condition to false.
ok := false
if col == nil {
if con, ok := cond.(*Constant); ok {
if con, ok = cond.(*Constant); ok {
value, _ := EvalBool(con, nil, s.ctx)
if !value {
s.setConds2ConstFalse()
Expand Down

0 comments on commit 42dd3c8

Please sign in to comment.