View Revisions: Issue #6619

Summary 0006619: Initial load of table with self-referencing foreign keys does not get all rows
Revision 2025-07-02 15:00 by awebb
Description Initial load of table with self-referencing foreign keys does not get all rows.

I tested with MariaDB version 10.6.
Example table DDL attached (table-definitions-cabin.xml).
Table data attached (cabin-no-null.csv, 11189 rows). Make sure to execute SET FOREIGN_KEY_CHECKS=0; before importing data. Then set it back (SET FOREIGN_KEY_CHECKS=1;)

The current logic with this table definition and set of data executes 4 queries to attempt to get all of the data. Queries are below.

Ideas:
Make two passes at the attempt. First attempt populates the self-referencing columns with child ID data. The second attempt made with parent ID data. ADD LOGGING!
Revision 2024-10-11 20:50 by pmarzullo
Description Initial load of table with self-referencing foreign keys does not get all rows.

I tested with MariaDB version 10.6.
Example table DDL attached (table-definitions-cabin.xml).
Table data attached (cabin-no-null.csv, 11189 rows). Make sure to execute SET FOREIGN_KEY_CHECKS=0; before importing data. Then set it back (SET FOREIGN_KEY_CHECKS=1;)

The current logic with this table definition and set of data executes 4 queries to attempt to get all of the data. Queries are below.