Skip to content

Commit

Permalink
add bytes parse fix (#468)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinai Rachakonda committed Jun 15, 2021
1 parent 58ad646 commit 01642e4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sql/parse/parse.go
Expand Up @@ -2458,6 +2458,10 @@ func convertVal(v *sqlparser.SQLVal) (sql.Expression, error) {
case sqlparser.ValArg:
return expression.NewBindVar(strings.TrimPrefix(string(v.Val), ":")), nil
case sqlparser.BitVal:
if len(v.Val) == 0 {
return expression.NewLiteral(false, sql.Boolean), nil
}

return expression.NewLiteral(v.Val[0] == '1', sql.Boolean), nil
}

Expand Down

0 comments on commit 01642e4

Please sign in to comment.