Skip to content

Commit

Permalink
Revert Fields and bindLocations comparison change
Browse files Browse the repository at this point in the history
It failed for some materializations

Signed-off-by: Matt Lord <[email protected]>
  • Loading branch information
mattlord committed Nov 11, 2024
1 parent f0f61db commit 21564fd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions go/vt/vttablet/tabletmanager/vreplication/replicator_plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -617,10 +617,9 @@ func valsEqual(v1, v2 sqltypes.Value) bool {
// on the source: sum/count for aggregation queries, for example.
func (tp *TablePlan) appendFromRow(buf *bytes2.Buffer, row *querypb.Row) error {
bindLocations := tp.BulkInsertValues.BindLocations()
usedFieldCnt := len(tp.Fields) - len(tp.FieldsToSkip)
if usedFieldCnt != len(bindLocations) {
if len(tp.Fields) < len(bindLocations) {
return vterrors.Errorf(vtrpcpb.Code_INTERNAL, "wrong number of fields: got %d fields for %d bind locations",
usedFieldCnt, len(bindLocations))
len(tp.Fields), len(bindLocations))
}

// Bind field values to locations.
Expand Down

0 comments on commit 21564fd

Please sign in to comment.