Skip to content

Commit 6a230d8

Browse files
author
James Cor
committed
check for nils
1 parent 9731bf6 commit 6a230d8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sql/expression/function/char.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,11 @@ func (c *Char) Eval(ctx *sql.Context, row sql.Row) (interface{}, error) {
124124
ctx.Warn(1292, "Truncated incorrect INTEGER value: '%v'", val)
125125
}
126126

127+
if v == nil {
128+
res = append(res, 0)
129+
continue
130+
}
131+
127132
res = append(res, encodeUint32(v.(uint32))...)
128133
}
129134

0 commit comments

Comments
 (0)