Skip to content

Commit fdcfaed

Browse files
craig[bot]kev-cao
andcommitted
Merge #154536
154536: roachtest: handle null fingerprint in backup/restore roundtrip r=msbutler a=kev-cao Currently, if a table is empty during our backup/restore roundtrip test fingerprint, `SHOW EXPERIMENTAL_FINGERPRINTS` returns `NULL`. This commit teaches our roundtrip tests to properly handle `NULL` fingerprints. Fixes: #154502 Fixes: #154506 Fixes: #154507 Release note: None Co-authored-by: Kevin Cao <[email protected]>
2 parents 0c9c77f + b964b8b commit fdcfaed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/cmd/roachtest/tests/mixed_version_backup.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ func (fc *fingerprintContents) Load(
630630
) error {
631631
l.Printf("computing fingerprints for table %s", fc.table)
632632
query := fmt.Sprintf(
633-
"SELECT index_name, fingerprint FROM [SHOW EXPERIMENTAL_FINGERPRINTS FROM TABLE %s]%s ORDER BY index_name",
633+
"SELECT index_name, COALESCE(fingerprint, '') FROM [SHOW EXPERIMENTAL_FINGERPRINTS FROM TABLE %s]%s ORDER BY index_name",
634634
fc.table, aostFor(timestamp),
635635
)
636636
rows, err := fc.db.QueryContext(ctx, query)

0 commit comments

Comments
 (0)