Opened 14 years ago
Last modified 14 years ago
#16478 closed Cleanup/optimization
Don't hardcode the location of Oracle's datafiles for the test tablespaces — at Initial Version
| Reported by: | Aymeric Augustin | Owned by: | nobody |
|---|---|---|---|
| Component: | Documentation | Version: | 1.3 |
| Severity: | Normal | Keywords: | oracle |
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Use case: I want to move Oracle's datafiles to a RAM disk (tmpfs) to speed up the execution of Django's test suite.
Problem: django.db.backends.oracle.creation currently uses this SQL: CREATE TABLESPACE %(tblspace)s DATAFILE '%(tblspace)s.dbf' ...
It's allright to provide a datafile name, because we can't assume all users of Django are using Oracle-managed files. However, since we provide a relative path, the file will always be created in Oracle's dbs directory. The DB_CREATE_FILE_DEST parameter is ignored when a datafile name is provided.
See http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/clauses004.htm#i1030551 (if you speak Oraclese).
Proposed solution: add an optional setting to control the location of the datafile during the tests. If the setting is not provided, default to TEST_TBLSPACE + '.dbf' for backwards compatibility.