Hi all,

I've just been hit by a very simple and annoying bug on Oracle, on Django 
1.3.4. Without testing, it seems to no longer be as bad on master, but a shade 
of it still remains.

The bug is this: The DatabaseFeatures for the Oracle backend do not specify 
that it supports transactions. 

On 1.3.4, this means the value is only set if confirm() is called, and when it 
is, it only affects a single connection; it does not appear to be called 
whenever a connection is created -- while database test creation calls it, by 
the time the tests use it it is all forgotten and testing is relegated to the 
old behavior of flush for every test.

On master, where the generic supports_transactions is a cached property, this 
means that for every connection opened, 4 statements are being executed to 
check if the database (still) supports transactions.

1. Oracle supports transactions. is there a reason not to just add the line

        supports_transactions = True

to its DatabaseFeatures class?

2. Database features, typically, do not change between opening of connections 
within a single server run. Shouldn't we consider saving these features -- 
even the dynamic ones -- on the DatabaseFeatures class, instead of its 
instances?

Thanks,
        Shai.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to