cockroachdb / cockroachdb/cockroach
sql/hints: consider disallowing DDL statements for inject_hints
Open
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
Assessment
This issue has not been assessed yet.