Skip to content

Commit

Permalink
roachtest: query only primary index in SHOW RANGES
Browse files Browse the repository at this point in the history
The semantics of SHOW RANGES has changed in 5604fea, it now includes ranges of
the secondary indicies. This change fixes the query to only request ranges of
the primary index, to support the original assertion.

Fixes cockroachdb#93703
Fixes cockroachdb#93708
Epic: none
  • Loading branch information
pav-kv committed Dec 20, 2022
1 parent 50c064e commit 7b92c4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cmd/roachtest/tests/copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func registerCopy(r registry.Registry) {

rangeCount := func() int {
var count int
const q = "SELECT count(*) FROM [SHOW RANGES FROM TABLE bank.bank]"
const q = "SELECT count(*) FROM [SHOW RANGES FROM INDEX bank.bank@primary]"
if err := db.QueryRow(q).Scan(&count); err != nil {
t.Fatalf("failed to get range count: %v", err)
}
Expand Down

0 comments on commit 7b92c4e

Please sign in to comment.