diff -r 7d5687126d6d django/db/backends/creation.py
a
|
b
|
|
247 | 247 | verbosity=max(verbosity - 1, 0), |
248 | 248 | interactive=False, |
249 | 249 | database=self.connection.alias) |
250 | | |
| 250 | |
251 | 251 | # One effect of calling syncdb followed by flush is that the id of the |
252 | 252 | # default site may or may not be 1, depending on how the sequence was |
253 | 253 | # reset. If the sites app is loaded, then we coerce it. |
… |
… |
|
346 | 346 | |
347 | 347 | def set_autocommit(self): |
348 | 348 | "Make sure a connection is in autocommit mode." |
349 | | if hasattr(self.connection.connection, "autocommit"): |
350 | | if callable(self.connection.connection.autocommit): |
351 | | self.connection.connection.autocommit(True) |
352 | | else: |
353 | | self.connection.connection.autocommit = True |
354 | | elif hasattr(self.connection.connection, "set_isolation_level"): |
355 | | self.connection.connection.set_isolation_level(0) |
| 349 | pass |
356 | 350 | |
357 | 351 | def sql_table_creation_suffix(self): |
358 | 352 | "SQL to append to the end of the test table creation statements" |
diff -r 7d5687126d6d django/db/backends/oracle/creation.py
a
|
b
|
|
270 | 270 | settings_dict['NAME'], |
271 | 271 | self._test_database_user(), |
272 | 272 | ) |
| 273 | |
| 274 | def set_autocommit(self): |
| 275 | self.connection.connection.autocommit = True |
diff -r 7d5687126d6d django/db/backends/postgresql_psycopg2/creation.py
a
|
b
|
|
76 | 76 | else: |
77 | 77 | output = [] |
78 | 78 | return output |
| 79 | |
| 80 | def set_autocommit(self): |
| 81 | self.connection.connection.set_isolation_level(0) |
diff -r 7d5687126d6d django/db/backends/sqlite3/creation.py
a
|
b
|
|
69 | 69 | if test_database_name and test_database_name != ":memory:": |
70 | 70 | # Remove the SQLite database file |
71 | 71 | os.remove(test_database_name) |
| 72 | |
| 73 | def set_autocommit(self): |
| 74 | self.connection.connection.isolation_level = None |