Changes between Initial Version and Version 1 of Ticket #21452, comment 1


Ignore:
Timestamp:
Nov 16, 2013, 4:25:48 PM (11 years ago)
Author:
Anssi Kääriäinen

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #21452, comment 1

    initial v1  
    55If 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).
    66
    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 #21543's use case doesn't work as expected.
     7Also, 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.
    88
    99I think we need to clean up how isolation level changes are done for new connections, and also backpatch to 1.6.x.
Back to Top