#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 boxm):
The main concern about this patch appears to be that it introduces the
possibility of loading a malformed database into MySQL/InnoDB because the
referential integrity checks won't be done properly.
Put another way - if the user asks Django to load some fixtures that are
malformed, then Django won't spot the problem and it will only surface at
runtime.
However, if the user was using MyISAM tables, then we have already
accepted that Django can't do referential integrity checks - so why is it
worse for it to not do it on InnoDB, where the database can't handle
loading data with integrity checks properly?
At the moment, we have the following truth table:
MyISAM: loads all possible fixtures, can't guarantee integrity
InnoDB: Can't load all fixtures, guarantees integrity
Relaxing the integrity checking to allow all fixtures to load seems to not
make things much worse - if the user wants to load an incomplete set of
fixtures, presumably the problem will show up quickly, whereas at present
there's some data that simply *can't* be loaded.
This has just bitten me on test fixtures as I migrate from MyISAM to
InnoDB. The test fixtures were actually broken (ie didn't have
referential integrity) but that didn't matter since they supported the
testcases needed. On migration, I now can't load the data at all, even
once I fix the integrity problems.
--
Ticket URL: <http://code.djangoproject.com/ticket/3615#comment:13>
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.