From 959aee92f25ac069966b0aee5a1dae049e7b91e4 Mon Sep 17 00:00:00 2001 From: Andres Taylor Date: Fri, 20 Dec 2024 10:03:15 +0100 Subject: [PATCH] refactor: simplify coersion logic Signed-off-by: Andres Taylor --- go/sqltypes/proto3.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go/sqltypes/proto3.go b/go/sqltypes/proto3.go index 12e73aac5ca..0ca03b153cf 100644 --- a/go/sqltypes/proto3.go +++ b/go/sqltypes/proto3.go @@ -103,7 +103,7 @@ func ResultToProto3(qr *Result) *querypb.QueryResult { Fields: qr.Fields, RowsAffected: qr.RowsAffected, InsertId: qr.InsertID, - InsertIdChanged: qr.InsertIDUpdated(), + InsertIdChanged: qr.InsertIDChanged, Rows: RowsToProto3(qr.Rows), Info: qr.Info, SessionStateChanges: qr.SessionStateChanges, @@ -120,7 +120,7 @@ func Proto3ToResult(qr *querypb.QueryResult) *Result { Fields: qr.Fields, RowsAffected: qr.RowsAffected, InsertID: qr.InsertId, - InsertIDChanged: qr.InsertIdChanged || qr.InsertId != 0, + InsertIDChanged: qr.InsertIdChanged, Rows: proto3ToRows(qr.Fields, qr.Rows), Info: qr.Info, SessionStateChanges: qr.SessionStateChanges,