-
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.
34726: sql: Fix panic when auto stats are computed on views r=andy-kimball a=andy-kimball At startup, all crdb_internal.tables are enqueued in order to have stats computed over them, if needed. However, that vtable includes views as well as tables, and views cause the CREATE STATISTICS code to panic. This commit fixes the panic (returns an error instead). It also prevents the auto stats code from continually re-enqueuing the refresh request for views and vtables, since they will fail every time. We need to come back and fix this better by not enqueuing views in the first place. However, that turned out to be problematic because the crdb_internal.tables vtable has no column that distinguishes view from tables. Release note: None Co-authored-by: Andrew Kimball <[email protected]>
- Loading branch information
Showing
3 changed files
with
38 additions
and
12 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
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