-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workload: fix missing Err() checks on sql.Query usages
When calling Next until it returns false there could be error or it could be the end of results. Err must be called to see which happened. In lots of cases we return errors early and may not ever call Err so use defer to always call Close. This fixes all but one of the cases found by the rowserrcheck linter, there's one false positive in tpcds that appears to be caused by go routine usage: pkg/workload/tpcds/tpcds.go:311:26: rows.Err must be checked Also there are 100+ lint failures in pkg/sql/... test code. A follow on PR will investigate how to turn on linting globally. Release justification: fixes hidden errors in test code Release note: None Fixes #68164
- Loading branch information
Showing
3 changed files
with
64 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.