Skip to content

Commit

Permalink
crdbutil: fix user table scan query
Browse files Browse the repository at this point in the history
Informs recent failures on #44066, #43284, #45645, #43273, #43839, #41528.

cockroachdb/cockroach#45827 broke the query to
retrieve users from the database, it was previously expecting one column,
and needs to be updated to accept three.

Previous to #45827 the column name was `user_name` (it's not
`username`), so the binary built off LATEST is not suitable for
roachtests run on v19.2 and below. I'm not sure how to construct a query
that would work across the two versions, we'll add a patch to previous
release branches to use a fixed SHA from this repo.
  • Loading branch information
irfansharif committed Mar 30, 2020
1 parent 2b51a44 commit 9622526
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/go/src/rubrik/util/crdbutil/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func openDBAsRoot(
}

func getUsers(db *sql.DB) ([]string, error) {
rows, err := db.Query("SHOW USERS")
rows, err := db.Query("SELECT username from [SHOW USERS]")
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 9622526

Please sign in to comment.