Index: django/db/backends/mysql/base.py
===================================================================
--- django/db/backends/mysql/base.py	(revision 16445)
+++ django/db/backends/mysql/base.py	(working copy)
@@ -349,3 +349,11 @@
                 raise Exception('Unable to determine MySQL version from version string %r' % self.connection.get_server_info())
             self.server_version = tuple([int(x) for x in m.groups()])
         return self.server_version
+
+    def begin_defer_constraint_checks(self):
+        self.foreign_key_checks_disabled = True
+        self.cursor().execute('SET foreign_key_checks=0')
+
+    def end_defer_constraint_checks(self):
+        self.foreign_key_checks_disabled = False
+        self.cursor().execute('SET foreign_key_checks=1')
Index: django/db/backends/__init__.py
===================================================================
--- django/db/backends/__init__.py	(revision 16445)
+++ django/db/backends/__init__.py	(working copy)
@@ -34,6 +34,8 @@
         self.transaction_state = []
         self.savepoint_state = 0
         self._dirty = None
+        
+        self.foreign_key_checks_disabled = False
 
     def __eq__(self, other):
         return self.alias == other.alias
@@ -239,6 +241,12 @@
         if self.savepoint_state:
             self._savepoint_commit(sid)
 
+    def begin_defer_constraint_checks(self):
+        return None
+
+    def end_defer_constraint_checks(self):
+        return None
+
     def close(self):
         if self.connection is not None:
             self.connection.close()
Index: django/core/management/commands/loaddata.py
===================================================================
--- django/core/management/commands/loaddata.py	(revision 16445)
+++ django/core/management/commands/loaddata.py	(working copy)
@@ -8,7 +8,7 @@
 from django.core import serializers
 from django.core.management.base import BaseCommand
 from django.core.management.color import no_style
-from django.db import connections, router, transaction, DEFAULT_DB_ALIAS
+from django.db import connections, router, transaction, DEFAULT_DB_ALIAS, models as db_models
 from django.db.models import get_apps
 from django.utils.itercompat import product
 
@@ -161,17 +161,28 @@
                             fixture_count += 1
                             objects_in_fixture = 0
                             loaded_objects_in_fixture = 0
+                            saved_objects = []
                             if verbosity >= 2:
                                 self.stdout.write("Installing %s fixture '%s' from %s.\n" % \
                                     (format, fixture_name, humanize(fixture_dir)))
                             try:
                                 objects = serializers.deserialize(format, fixture, using=using)
+                                connection.begin_defer_constraint_checks()
                                 for obj in objects:
                                     objects_in_fixture += 1
                                     if router.allow_syncdb(using, obj.object.__class__):
                                         loaded_objects_in_fixture += 1
                                         models.add(obj.object.__class__)
                                         obj.save(using=using)
+                                        saved_objects.append(obj.object)
+                                        
+                                # If we disabled foreign_key_checks, then re-enable them and save them all
+                                # again. This will expose any referential integrity errors.
+                                if connection.foreign_key_checks_disabled:
+                                    connection.end_defer_constraint_checks()
+                                    for obj in saved_objects:
+                                        obj.save_base(using=using, raw=True, force_update=True)
+                                    
                                 loaded_object_count += loaded_objects_in_fixture
                                 fixture_object_count += objects_in_fixture
                                 label_found = True
Index: tests/regressiontests/fixtures_regress/fixtures/forward_ref_bad_data.json
===================================================================
--- tests/regressiontests/fixtures_regress/fixtures/forward_ref_bad_data.json	(revision 0)
+++ tests/regressiontests/fixtures_regress/fixtures/forward_ref_bad_data.json	(revision 0)
@@ -0,0 +1,17 @@
+[
+    {
+        "pk": 1,
+        "model": "fixtures_regress.book",
+        "fields": {
+            "name": "Cryptonomicon",
+            "author": 3
+        }
+    },
+    {
+        "pk": "4",
+        "model": "fixtures_regress.person",
+        "fields": {
+            "name": "Neal Stephenson"
+        }
+    }
+]
\ No newline at end of file
Index: tests/regressiontests/fixtures_regress/fixtures/forward_ref.json
===================================================================
--- tests/regressiontests/fixtures_regress/fixtures/forward_ref.json	(revision 0)
+++ tests/regressiontests/fixtures_regress/fixtures/forward_ref.json	(revision 0)
@@ -0,0 +1,17 @@
+[
+    {
+        "pk": 1,
+        "model": "fixtures_regress.book",
+        "fields": {
+            "name": "Cryptonomicon",
+            "author": 4
+        }
+    },
+    {
+        "pk": "4",
+        "model": "fixtures_regress.person",
+        "fields": {
+            "name": "Neal Stephenson"
+        }
+    }
+]
\ No newline at end of file
Index: tests/regressiontests/fixtures_regress/tests.py
===================================================================
--- tests/regressiontests/fixtures_regress/tests.py	(revision 16445)
+++ tests/regressiontests/fixtures_regress/tests.py	(working copy)
@@ -12,7 +12,7 @@
 from django.core.management.commands.dumpdata import sort_dependencies
 from django.core.management.base import CommandError
 from django.db.models import signals
-from django.db import transaction
+from django.db import transaction, IntegrityError
 from django.test import TestCase, TransactionTestCase, skipIfDBFeature, \
     skipUnlessDBFeature
 
@@ -362,6 +362,35 @@
             """[{"pk": %d, "model": "fixtures_regress.widget", "fields": {"name": "grommet"}}]"""
             % widget.pk
             )
+    
+    def test_loaddata_works_when_fixture_has_forward_refs(self):
+        """
+        Regression for #3615 - Forward references cause fixtures not to load in MySQL (InnoDB)
+        """
+        management.call_command(
+            'loaddata',
+            'forward_ref.json',
+            verbosity=0,
+            commit=False
+        )
+        self.assertEqual(Book.objects.all()[0].id, 1)
+        self.assertEqual(Person.objects.all()[0].id, 4)
+    
+    def test_loaddata_raise_when_fixture_has_forward_refs(self):
+        """
+        Regression for #3615 - Ensure data with nonexistent child key references raises error
+        """
+        stderr = StringIO()
+        management.call_command(
+            'loaddata',
+            'forward_ref_bad_data.json',
+            verbosity=0,
+            commit=False,
+            stderr=stderr,
+        )
+        self.assertTrue(
+            stderr.getvalue().startswith('Problem installing fixture')
+        )
 
 
 class NaturalKeyFixtureTests(TestCase):
