@cached_property
    def has_ddl_transactions(self):
        self._possibly_initialise()
        connection = self._get_connection()
        if hasattr(connection.features, "confirm") and not connection.features._confirmed:
            connection.features.confirm()
        # Django 1.3's MySQLdb backend doesn't raise DatabaseError
        exceptions = (DatabaseError, )
        try:
            from MySQLdb import OperationalError
            exceptions += (OperationalError, )
        except ImportError:
            pass
        # Now do the test
        if getattr(connection.features, 'supports_transactions', True):
            cursor = connection.cursor()
            self.start_transaction()
            cursor.execute('CREATE TABLE DDL_TRANSACTION_TEST (X INT)')
            self.rollback_transaction()
            try:
                try:
                    cursor.execute('CREATE TABLE DDL_TRANSACTION_TEST (X INT)')
                except exceptions:
                    return False
                else:
                    return True
            finally:
                cursor.execute('DROP TABLE DDL_TRANSACTION_TEST')
        else:
            return False
Superuser should be able to edit an invoiced entry
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/South-1.0.2/south/db/generic.py/DatabaseOperations.has_ddl_transactions--crossover with--dataset/ETHPy150Open caktus/django-timepiece/timepiece/entries/tests/test_timesheet.py/CreateEditEntry.test_superuser_can_edit_invoiced_entry