-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stats: dropping enum values may corrupt stats #67050
Labels
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
T-sql-queries
SQL Queries Team
Comments
ajwerner
added
the
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
label
Jun 30, 2021
cc @arulajmani |
knz
added
the
T-sql-foundations
SQL Foundations Team (formerly SQL Schema + SQL Sessions)
label
Jul 27, 2023
exalate-issue-sync
bot
added
T-sql-queries
SQL Queries Team
and removed
T-sql-foundations
SQL Foundations Team (formerly SQL Schema + SQL Sessions)
labels
May 8, 2024
Here's one way to trigger this: SET CLUSTER SETTING sql.stats.automatic_collection.enabled = off;
CREATE TYPE e AS ENUM ('a', 'b', 'c');
CREATE TABLE x (x e PRIMARY KEY);
INSERT INTO x VALUES ('a'), ('b'), ('c');
ANALYZE x;
DELETE FROM x WHERE x = 'a';
ALTER TYPE e DROP VALUE 'a';
SHOW STATISTICS USING JSON FOR TABLE x; This fails with an internal error with a stacktrace like:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
T-sql-queries
SQL Queries Team
Describe the problem
We now drop enum values. See this comment:
cockroach/pkg/sql/stats/stats_cache.go
Lines 496 to 504 in d4627db
Jira issue: CRDB-8341
The text was updated successfully, but these errors were encountered: