release-22.2: server: update default db to system on sql-api #98052
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport 1/1 commits from #97990.
/cc @cockroachdb/release
Currently the default database used by the sqlApi is
defaultdb
, but that database can be deleted and also is not available during restores.The safe option is using system because it will always exist.
Changing just the server file should be enough to make this work, but this commit also updates the frontend code so a new version can be updates faster than waiting for a CRDB release. Once a release is updated to Cloud, those lines of code can be removed.
Fixes #97950
Release note (bug fix): Change database used for sql api calls, to no longer use "defaultdb", which was causing error messages on some pages when that database didn't exist anymore.
Release justification: bug fix