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

Bug Report: Update on a table that doesn't actually update anything sometimes fails in Vitess on RESTRICT constraint. #13992

Closed
GuptaManan100 opened this issue Sep 15, 2023 · 0 comments · Fixed by #13991

Comments

@GuptaManan100
Copy link
Member

Overview of the Issue

This bug was found by the fuzzer that is added in #13980.

=== RUN   TestFkFuzzTest/Unsharded_-_Single_Thread_-_Balanced_Inserts_and_Updates
    mysql.go:228: Vitess and MySQL are not erroring the same way.
        Vitess error: Cannot delete or update a parent row: a foreign key constraint fails (errno 1451) (sqlstate 23000) during query: update fk_t10 set col = 3 where id = 6
        MySQL error: <nil>
E0914 12:55:04.166512   90626 fk_fuzz_test.go:326] Failing query - update fk_t10 set col = 3 where id = 6

We see the update fails on Vitess, but MySQL doesn't complain.
The schema of the tables are as follows -

/*
 *                fk_t10
 *                   │
 * On Delete Cascade │
 * On Update Cascade │
 *                   │
 *                   ▼
 *                fk_t11──────────────────┐
 *                   │                    │
 *                   │                    │ On Delete Restrict
 * On Delete Cascade │                    │ On Update Restrict
 * On Update Cascade │                    │
 *                   │                    │
 *                   ▼                    ▼
 *                fk_t12               fk_t13
 */

Reproduction Steps

Create the tables with the given schema
Then, try running an update query as listed above

Binary Version

main

Operating System and Environment details

main

Log Fragments

No response

@GuptaManan100 GuptaManan100 added Type: Bug Needs Triage This issue needs to be correctly labelled and triaged Component: Query Serving and removed Needs Triage This issue needs to be correctly labelled and triaged labels Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant