Changes between Initial Version and Version 1 of Ticket #21452, comment 1
- Timestamp:
- Nov 16, 2013, 4:25:48 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #21452, comment 1
initial v1 5 5 If autocommit is off in settings, then self.connection.set_isolation_level(self.isolation_level) gets called as last thing in init_connection_state(). This sets autocommit off. However, if self.set_autocommit(True) is called from the code block mentioned in ticket's description, then autocommit will be off for the connection, but Django will think the connection is in autocommit mode (self.autocommit is True). 6 6 7 Also, after init_connection_state() but before set_autocommit() is called from BaseDatabaseWrapper's connect() the connection will be in non-autocommit mode. This is also why #21 543's use case doesn't work as expected.7 Also, after init_connection_state() but before set_autocommit() is called from BaseDatabaseWrapper's connect() the connection will be in non-autocommit mode. This is also why #21453's use case doesn't work as expected. 8 8 9 9 I think we need to clean up how isolation level changes are done for new connections, and also backpatch to 1.6.x.