From 69e981a2b2d5cd4d40f22d6eace3a977074d3c3f Mon Sep 17 00:00:00 2001 From: papapiya <402561078@qq.com> Date: Fri, 29 Oct 2021 17:43:47 +0800 Subject: [PATCH] =?UTF-8?q?[PDR-15311][fix(mssql)]:=20MSSQL=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93,=E5=BD=93=E9=81=87=E5=88=B0=E6=95=B0?= =?UTF-8?q?=E5=80=BC=E5=9E=8B=E5=AD=97=E6=AE=B5=E4=B8=BA=E7=A9=BA=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=80=99=E9=87=87=E9=9B=86=E4=BC=9A=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reader/sql/utils.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/reader/sql/utils.go b/reader/sql/utils.go index 2a56cd4dc..80e7888a4 100644 --- a/reader/sql/utils.go +++ b/reader/sql/utils.go @@ -152,6 +152,11 @@ func GetInitScans(length int, rows *sql.Rows, schemas map[string]string, runnerN nochoiced[i] = true } } + nullable, ok := v.Nullable() + nullable = nullable && ok + if nullable { + scanArgs[i] = new(interface{}) + } } return scanArgs, nochoiced }