Skip to content

Commit

Permalink
Merge pull request #114427 from cockroachdb/blathers/backport-release…
Browse files Browse the repository at this point in the history
…-23.1-109292
  • Loading branch information
yuzefovich authored Nov 14, 2023
2 parents 24b85a5 + 3a82145 commit cf5c2ca
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/sql/copy/copy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -602,9 +602,10 @@ func TestLargeDynamicRows(t *testing.T) {
err = conn.Exec(ctx, "RESET CLUSTER SETTING kv.raft.command.max_size")
require.NoError(t, err)

// This won't work if the batch size gets set to less than 4.
if sql.CopyBatchRowSize < 4 {
sql.SetCopyFromBatchSize(4)
// This won't work if the batch size gets set to less than 5. When the batch
// size is 4, the test hook will count an extra empty batch.
if sql.CopyBatchRowSize < 5 {
sql.SetCopyFromBatchSize(5)
}

_, err = conn.GetDriverConn().CopyFrom(ctx, strings.NewReader(sb.String()), "COPY t FROM STDIN")
Expand Down

0 comments on commit cf5c2ca

Please sign in to comment.