-
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
Insights proposed index wrong SQL statement #119579
Comments
Hello, I am Blathers. I am here to help you get the issue triaged. Hoot - a bug! Though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here. I have CC'd a few people who may be able to assist you:
If we have not gotten back to your issue within a few business days, you can try the following:
🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
Some additional context:
Assume that logic on UI should be reduced to consume |
Fixes: cockroachdb#119579 The UI code used to modify the index recommendations provided by the server was not properly accounting for table 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 tables whose names are in quotation marks.
121731: ui: index recommendations properly handle quoted table names r=dhartunian a=abarganier 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");` 122058: roachtest: improve acceptance test running time, use suite r=renatolabs,srosenberg a=rickystewart Closes #118513. Epic: None Release note: None 122060: go.mod: bump Pebble to 6cdb88d44473 r=RaduBerinde a=RaduBerinde Changes: * [`6cdb88d4`](cockroachdb/pebble@6cdb88d4) sstable: clean up UpdateKeySuffixes We update the Cockroach code to implement the new method. Release note: none. Epic: none. Co-authored-by: Alex Barganier <[email protected]> Co-authored-by: Ricky Stewart <[email protected]> Co-authored-by: Radu Berinde <[email protected]>
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");`
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");`
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");`
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");`
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");`
Describe the problem
Creating an index fails:
The error (from network tab):
To Reproduce
This happens when applying a suggested index.
If possible, provide steps to reproduce the behavior:
Expected behavior
The index is created
Additional data / screenshots
Replace index is broken too, but I'm not sure if it's related (didn't look into it, but I assume it is).
Generated SQL:
The issue is caused by the double quotes around
offers
andstartdate
. This is a valid SQL statement:Environment:
cockroachdb/cockroach:v23.2.1
Jira issue: CRDB-36229
The text was updated successfully, but these errors were encountered: