Opened 14 years ago
Closed 14 years ago
#15534 closed Bug (fixed)
Oracle backend regex lookup broken if Oracle backend is not default
Reported by: | Jirka Vejrazka | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.3-beta |
Severity: | Normal | Keywords: | oracle, multi-db |
Cc: | Jirka Vejrazka | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I hit a bug with django-pyodbc that was related to multi-db and realized that Oracle backend has the same problem. The problem lies [browser:django/trunk/django/db/backends/oracle/base.py?rev=15299#L260 here]. This will break if the Oracle backend is not the default one.
I have not figured out a good way to get the right connection in this portion of code. I did monkeypatch my copy of code (the django-pyodbc one) in the following way, but have no idea what a good solution might be.
Change History (7)
comment:1 by , 14 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 14 years ago
comment:3 by , 14 years ago
Cc: | added |
---|
follow-up: 6 comment:4 by , 14 years ago
The technique of passing the connection to the DatabaseOperations
instance is already being used in the PostgreSQL backends (most surely a change introduced after Malcolm added his comment to #9405 opposing to such an API change). The inconsistency of these two backends with django.db.backends.BaseDatabaseOperations
and the rest of the DB backends we ship is reported in #13630. Once we fix it we'll hopefully be able t use that instance variable to solve this issue.
comment:5 by , 14 years ago
Type: | → Bug |
---|
comment:6 by , 14 years ago
Severity: | → Normal |
---|
Replying to ramiro:
The technique of passing the connection to the
DatabaseOperations
instance is already being used in the PostgreSQL backends (most surely a change introduced after Malcolm added his comment to #9405 opposing to such an API change).
The change was introduced when the multi-db branch got merged in with trunk, in revision 11952.
This point was also raised in #9405, which was closed wontfix at the time. This is something that we do need to fix one way or another, though.