fix db_mysql getRow() when column is null error raised (#12806) [backport]

* fix db_mysql getRow()
* added if y == nil [backport]

(cherry picked from commit 208b018f6b)
This commit is contained in:
itsumura-h
2019-12-05 18:28:47 +09:00
committed by narimiran
parent 9ec09bfa55
commit 340c9248f1

View File

@@ -3423,9 +3423,10 @@ elif hasAlloc:
{.push stack_trace:off, profiler:off.}
proc add*(x: var string, y: cstring) =
var i = 0
while y[i] != '\0':
add(x, y[i])
inc(i)
if y != nil:
while y[i] != '\0':
add(x, y[i])
inc(i)
{.pop.}
when defined(nimvarargstyped):