From 42dd3c8759f021fa3e39dca1e945959a2f6e407f Mon Sep 17 00:00:00 2001 From: goroutine Date: Fri, 30 Dec 2016 11:56:14 +0800 Subject: [PATCH] expression: fix shadow warning (#2354) --- expression/constant_propagation.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/expression/constant_propagation.go b/expression/constant_propagation.go index b389a60a5814f..c70dc82a83d5f 100644 --- a/expression/constant_propagation.go +++ b/expression/constant_propagation.go @@ -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()