From f8636512d763c20e8d70d78b41da726e7534436d Mon Sep 17 00:00:00 2001 From: Harshit Gangal Date: Mon, 20 May 2024 23:22:53 +0530 Subject: [PATCH] fix: check bvlist nil check for delete op Signed-off-by: Harshit Gangal --- go/vt/vtgate/engine/dml_with_input.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/vt/vtgate/engine/dml_with_input.go b/go/vt/vtgate/engine/dml_with_input.go index d2238f75d39..a52de30ad19 100644 --- a/go/vt/vtgate/engine/dml_with_input.go +++ b/go/vt/vtgate/engine/dml_with_input.go @@ -71,7 +71,7 @@ func (dml *DMLWithInput) TryExecute(ctx context.Context, vcursor VCursor, bindVa var res *sqltypes.Result for idx, prim := range dml.DMLs { var qr *sqltypes.Result - if len(dml.BVList[idx]) == 0 { + if len(dml.BVList) == 0 || len(dml.BVList[idx]) == 0 { qr, err = executeLiteralUpdate(ctx, vcursor, bindVars, prim, inputRes, dml.OutputCols[idx]) } else { qr, err = executeNonLiteralUpdate(ctx, vcursor, bindVars, prim, inputRes, dml.OutputCols[idx], dml.BVList[idx])