diff --git a/go/vt/vtgate/scatter_conn.go b/go/vt/vtgate/scatter_conn.go index 70663402287..edba48a9151 100644 --- a/go/vt/vtgate/scatter_conn.go +++ b/go/vt/vtgate/scatter_conn.go @@ -419,9 +419,7 @@ func (stc *ScatterConn) StreamExecuteMulti( opts = session.Session.Options } - if opts != nil { - opts.FetchLastInsertId = fetchLastInsertID - } else if fetchLastInsertID { + if opts == nil && fetchLastInsertID { opts = &querypb.ExecuteOptions{FetchLastInsertId: fetchLastInsertID} }