View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001341 | SymmetricDS | Bug | public | 2013-07-24 14:24 | 2019-04-11 19:20 |
Reporter | gwilmer | Assigned To | elong | ||
Priority | normal | ||||
Status | closed | Resolution | duplicate | ||
Summary | 0001341: Initial loads on table with FK to itself may fail with FK violations | ||||
Description | When you have a table that has a foreign key to itself, the initial load doesn't pay attention to the FK ordering and will fail with FK issues. We might want to try to suspend FK constraints during the initial load in this case... | ||||
Steps To Reproduce | Table: test_table Columns: col1 int pk not null col2 varchar(50) not null col3 int (fk to col1) (this one is nullable) Here is the data scenario that gets you in trouble: 1 blah NULL 2 blahblah 1 3 blahblahblah 4 4 fk row NULL To set up this scenario you have to insert row 3 with a null FK, then insert row 4, then update row 3 to reference row 4. When you do this the natural ordering of the select for the initial load will be in pk order and you will get the FK issue on initial load. | ||||
Tags | No tags attached. | ||||
duplicate of | 0003711 | closed | josh-a-hicks | Table reload request for a table with a foreign to itself and a data row where the row fk is to itself doesn't load any data |
related to | 0003853 | closed | elong | Defer indexes and foreign key constraints for table creation until after initial load |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-07-24 14:24 | gwilmer | New Issue | |
2019-04-11 19:20 | elong | Relationship added | duplicate of 0003711 |
2019-04-11 19:20 | elong | Relationship added | related to 0003853 |
2019-04-11 19:20 | elong | Assigned To | => elong |
2019-04-11 19:20 | elong | Status | new => closed |
2019-04-11 19:20 | elong | Resolution | open => duplicate |