provisional_201902072331_v2.2.0-alpha.20190211
tagged this
07 Feb 22:39
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]>