Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug #33053297 VIRTUAL INDEX CORRUPTED DURING CASCADE UPDATE ON CHILD
TABLE Problem: Child table has FOREIGN KEY (FK) constraint with referential action ON DELETE SET NULL (or ON UPDATE SET NULL). And child table also has an index over (FK column, virtual column). When a row is deleted from parent table, FK constraint check on child table, set both [FK column, virtual column] value in the index to NULL. Fix: Instead of setting virtual column value to NULL, derives it from the base columns. when FK column is set to NULL in the child table, three cases need to be taken care while setting virtual column value in the index: 1. If all base columns are in FK then set virtual column value to NULL. 2. If no base columns is in FK then set virtual column value to OLD value. 3. If one or more base columns are in FK then set those base column value to NULL and compute virtual column value again. RB: 26751 Reviewed by : Rahul Agarkar <rahul.agarkar@oracle.com>
- Loading branch information
1 parent
f8ed177
commit 27130e2
Showing
7 changed files
with
360 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.