#3615: Can't define forward references in fixtures using MySQL with InnoDB
---------------------------------------------------+------------------------
          Reporter:  russellm                      |         Owner:  nobody     
                          
            Status:  new                           |     Milestone:             
                          
         Component:  Database layer (models, ORM)  |       Version:  SVN        
                          
        Resolution:                                |      Keywords:  mysql 
innodb myisam reference fixture
             Stage:  Accepted                      |     Has_patch:  0          
                          
        Needs_docs:  0                             |   Needs_tests:  0          
                          
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Comment (by russellm):

 @boxm - your MyISAM/InnoDB distinction isn't correct. The problem is that
 InnoDB's interpretation of referential integrity is broken -- it checks
 references at the end of every model change, not at the end of the
 transaction. Therefore, it isn't possible to insert an object that refers
 to an object that will be loaded later in the transaction. A completely
 legal fixture that can be loaded under PostgreSQL will break under InnoDB
 because of the way referential integrity is implemented.

 The issue is that the only apparent ways to fix this is to *turn off*
 reference checking under InnoDB for the duration of fixture loading, and
 then to turn it back on again once the fixture is loaded. However,
 anything invalid loaded during the fixture won't be identified and flagged
 as an invalid reference.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3615#comment:14>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to