-
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
release-23.1: ui: index recommendations properly handle quoted table names #122117
Conversation
21bea02
to
6ab3899
Compare
Thanks for opening a backport. Please check the backport criteria before merging:
If your backport adds new functionality, please ensure that the following additional criteria are satisfied:
Also, please add a brief release justification to the body of your PR to justify this |
@rafiss can you act as secondary TL reviewer on this one when you get a chance? Thanks 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Reminder: it has been 3 weeks please merge or close your backport! |
Fixes: #119579 The UI code used to modify the index recommendations provided by the server was not properly accounting for table and column names containing quotation marks. This was causing invalid CREATE INDEX statements to be generated, which would fail on request. This patch fixes this by updating the query modification code to strip quotation marks from the table name prior to using it to generate an index name. Release note (bug fix): Index recommendations in the DB Console will now function properly for indexes on tables/columns whose names contain quotation marks and/or whitespace. For example: `CREATE INDEX ON "my table" ("my col");`
6ab3899
to
24a42e0
Compare
TFTRs! |
Backport 1/1 commits from #121731 on behalf of @abarganier.
/cc @cockroachdb/release
Fixes: #119579
Epic: none
The UI code used to modify the index recommendations provided by the
server was not properly accounting for table and column names containing
quotation marks. This was causing invalid CREATE INDEX statements to
be generated, which would fail on request.
This patch fixes this by updating the query modification code to strip
quotation marks from the table name prior to using it to generate an
index name.
Release note (bug fix): Index recommendations in the DB Console will now
function properly for indexes on tables/columns whose names contain
quotation marks and/or whitespace.
For example:
CREATE INDEX ON "my table" ("my col");
Release justification: UI bug fix for an easily reproduced bug impacting insights index recommendations.