From f8b5e513daa9943624f00920cae8b631bb57a46b Mon Sep 17 00:00:00 2001 From: Erik Grinaker Date: Mon, 2 Jan 2023 14:20:02 +0000 Subject: [PATCH] roachtest: fix `SHOW RANGES` queries in `mvcc_gc` test Epic: none Release note: None --- pkg/cmd/roachtest/tests/mvcc_gc.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cmd/roachtest/tests/mvcc_gc.go b/pkg/cmd/roachtest/tests/mvcc_gc.go index bc0940030dc1..f4b5b8b430bc 100644 --- a/pkg/cmd/roachtest/tests/mvcc_gc.go +++ b/pkg/cmd/roachtest/tests/mvcc_gc.go @@ -267,7 +267,7 @@ func collectTableMVCCStatsOrFatal( t.Helper() rows, err := conn.Query(fmt.Sprintf(` SELECT range_id, raw_start_key, crdb_internal.range_stats(raw_start_key) -FROM [SHOW RANGES FROM %s.%s WITH KEYS] +FROM [SHOW RANGES FROM TABLE %s.%s WITH KEYS] ORDER BY r.start_key`, tree.NameString(m.databaseName), tree.NameString(m.tableName))) if err != nil { @@ -399,7 +399,7 @@ func visitTableRanges( ) error { t.Helper() rows, err := conn.QueryContext( - ctx, fmt.Sprintf(`SELECT range_id FROM [ SHOW RANGES FROM %s.%s ]`, m.databaseName, m.tableName), + ctx, fmt.Sprintf(`SELECT range_id FROM [ SHOW RANGES FROM TABLE %s.%s ]`, m.databaseName, m.tableName), ) if err != nil { t.Fatalf("failed to run consistency check query on table: %s", err)