Skip to content
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

release-20.1: sql: make information_schema.statistics deterministic #58215

Merged
merged 1 commit into from
Dec 24, 2020

Conversation

yuzefovich
Copy link
Member

Backport 1/1 commits from #58191.

/cc @cockroachdb/release


Previously, "implicit" columns could be added to the
information_schema.statistics virtual table in an arbitray order since
we were iterating over a map when adding them. This is unfortunate since
some schema inspection tools might rely on the output being
deterministic.

Release note (bug fix): Previously, CockroachDB could return
non-deterministic output when querying information_schema.statistics
virtual table (internally used by SHOW INDEXES command) - namely, the
implicit columns of the secondary indexes could be in arbitrary order.
This is now fixed, and the columns will be in the same order as they are
in the primary index.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@yuzefovich yuzefovich force-pushed the backport20.1-58191 branch 2 times, most recently from 7863cef to b6e9927 Compare December 23, 2020 19:04
Previously, "implicit" columns could be added to the
`information_schema.statistics` virtual table in an arbitray order since
we were iterating over a map when adding them. This is unfortunate since
some schema inspection tools might rely on the output being
deterministic.

Release note (bug fix): Previously, CockroachDB could return
non-deterministic output when querying `information_schema.statistics`
virtual table (internally used by `SHOW INDEXES` command) - namely, the
implicit columns of the secondary indexes could be in arbitrary order.
This is now fixed, and the columns will be in the same order as they are
in the primary index.
@yuzefovich yuzefovich merged commit 6e7ac59 into cockroachdb:release-20.1 Dec 24, 2020
@yuzefovich yuzefovich deleted the backport20.1-58191 branch December 24, 2020 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants