cockroachdb / cockroachdb/cockroach

sql/hints: consider disallowing DDL statements for inject_hints

Open
#159,229 3 comments 0 reactions 1 assignee Claimed by @michae2 View on GitHub
A-plan-management A-statement-hint C-enhancement T-sql-queries
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

It's not clear what the semantics of hint injection would be for a DDL statement, since they don't contain hints. We should consider disallowing this, and possibly do the same for other types of hints we introduce. Currently, this is possible:
```
SELECT crdb_internal.inject_hint(
'CREATE INDEX ON xy (y)',
'CREATE INDEX ON xy (y)'
);
```

Jira issue: CRDB-57738

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.