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

sql: job SessionData OptimizerFKCascadesLimit not defaulting to optDrivenFKCascadesClusterLimit #101265

Closed
ecwall opened this issue Apr 11, 2023 · 0 comments · Fixed by #101267
Closed
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

@ecwall
Copy link
Contributor

ecwall commented Apr 11, 2023

SessionData available to in the job context has a 0-value OptimizerFKCascadesLimit.

This causes DELETE queries run by the job with an inbound on-delete-cascade FK to fail with an error cascades limit (0) reached.

To fix this, OptimizerFKCascadesLimit must be populated in sql.NewFakeSessionData.

Jira issue: CRDB-26886

Epic CRDB-26101

@ecwall ecwall added 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) labels Apr 11, 2023
@ecwall ecwall self-assigned this Apr 11, 2023
@ecwall ecwall added this to Triage in SQL Sessions - Deprecated via automation Apr 11, 2023
craig bot pushed a commit that referenced this issue Apr 12, 2023
101267: sql: job SessionData OptimizerFKCascadesLimit not defaulting to optDrivenFKCascadesClusterLimit r=otan a=ecwall

Fixes #101265

`SessionData` available to in the job context has a 0-value `OptimizerFKCascadesLimit`.

This causes DELETE queries run by the job with an inbound on-delete-cascade FK to fail with an error `cascades limit (0) reached`.

This change fixes this by populating OptimizerFKCascadesLimit in `sql.NewFakeSessionData`.

Release note: None

Co-authored-by: Evan Wall <wall@cockroachlabs.com>
@craig craig bot closed this as completed in 1e6c158 Apr 12, 2023
SQL Sessions - Deprecated automation moved this from Triage to Done Apr 12, 2023
blathers-crl bot pushed a commit that referenced this issue Apr 12, 2023
…ivenFKCascadesClusterLimit

Fixes #101265

`SessionData` available to in the job context has a 0-value
`OptimizerFKCascadesLimit`.

This causes DELETE queries run by the job with an inbound on-delete-cascade FK
to fail with an error `cascades limit (0) reached`.

This change fixes this by populating OptimizerFKCascadesLimit in
`sql.NewFakeSessionData`.

Release note: None
blathers-crl bot pushed a commit that referenced this issue Apr 12, 2023
…ivenFKCascadesClusterLimit

Fixes #101265

`SessionData` available to in the job context has a 0-value
`OptimizerFKCascadesLimit`.

This causes DELETE queries run by the job with an inbound on-delete-cascade FK
to fail with an error `cascades limit (0) reached`.

This change fixes this by populating OptimizerFKCascadesLimit in
`sql.NewFakeSessionData`.

Release note: None
blathers-crl bot pushed a commit that referenced this issue Apr 12, 2023
…ivenFKCascadesClusterLimit

Fixes #101265

`SessionData` available to in the job context has a 0-value
`OptimizerFKCascadesLimit`.

This causes DELETE queries run by the job with an inbound on-delete-cascade FK
to fail with an error `cascades limit (0) reached`.

This change fixes this by populating OptimizerFKCascadesLimit in
`sql.NewFakeSessionData`.

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
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant