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

debug doctor produces false positive on table names with quotes #104347

Closed
smcvey opened this issue Jun 5, 2023 · 0 comments
Closed

debug doctor produces false positive on table names with quotes #104347

smcvey opened this issue Jun 5, 2023 · 0 comments
Assignees
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)

Comments

@smcvey
Copy link
Contributor

smcvey commented Jun 5, 2023

Describe the problem

Create a table with some quotes:

create table defaultdb.public."""MisplacedSchema"".t" (id uuid primary key);

Note that running cockroach debug doctor examine cluster works fine:

$ cockroach debug doctor examine cluster 
Examining 43 descriptors and 44 namespace entries...
Examining 7 jobs...
No problems found!

However, create a debug zip, and then run debug doctor on that:

$ cockroach debug doctor examine zipdir .
Examining 43 descriptors and 44 namespace entries...
  ParentID 100, ParentSchemaID 101: relation "\"MisplacedSchema\".t" (104): expected matching namespace entry, found none
  ParentID 100, ParentSchemaID 101: namespace entry "\"\"\"MisplacedSchema\"\".t\"" (104): no matching name info found in non-dropped relation "\"MisplacedSchema\".t"
Examining 6 jobs...
ERROR: validation failed
Failed running "debug doctor examine zipdir"

It's getting confused on all the various quotes and creating false positives on customers who have chosen to proactively use debug doctor while upgrading.

Jira issue: CRDB-28477

Epic CRDB-27601

@smcvey smcvey added the C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. label Jun 5, 2023
@fqazi fqazi self-assigned this Jun 5, 2023
@blathers-crl blathers-crl bot added the T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) label Jun 5, 2023
fqazi added a commit to fqazi/cockroach that referenced this issue Jun 9, 2023
Previously, when parsing the namespace entries
we did not handle quoted table names properly.
This patch addresses, this by unquoting entries
properly.

Fixes: cockroachdb#104347

Release note: None
@craig craig bot closed this as completed in 0933849 Jun 13, 2023
blathers-crl bot pushed a commit that referenced this issue Jun 13, 2023
Previously, when parsing the namespace entries
we did not handle quoted table names properly.
This patch addresses, this by unquoting entries
properly.

Fixes: #104347

Release note: None
fqazi added a commit that referenced this issue Jun 26, 2023
Previously, when parsing the namespace entries
we did not handle quoted table names properly.
This patch addresses, this by unquoting entries
properly.

Fixes: #104347

Release note: None
fqazi added a commit that referenced this issue Jun 27, 2023
Previously, when parsing the namespace entries
we did not handle quoted table names properly.
This patch addresses, this by unquoting entries
properly.

Fixes: #104347

Release note: None
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-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
None yet
Development

No branches or pull requests

2 participants