Skip to content

Commit

Permalink
sql: Fix bug where dropped table zone configurations would be visible.
Browse files Browse the repository at this point in the history
Fixes #38392.

Release note: None
  • Loading branch information
rohany committed Aug 1, 2019
1 parent 55230a0 commit 85a0551
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/sql/crdb_internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -1901,10 +1901,11 @@ CREATE TABLE crdb_internal.zones (
var zoneSpecifier *tree.ZoneSpecifier
zs, err := config.ZoneSpecifierFromID(id, resolveID)
if err != nil {
// The database or table has been deleted so there is no way
// to refer to it anymore. We are still going to show
// something but the CLI specifier part will become NULL.
zoneSpecifier = nil
// We can have valid zoneSpecifiers whose table/database has been
// deleted because zoneSpecifiers are collected asynchronously.
// In this case, just don't show the zoneSpecifier in the
// output of the table.
continue
} else {
zoneSpecifier = &zs
}
Expand Down

0 comments on commit 85a0551

Please sign in to comment.