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 Russell Keith-Magee, 14 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Erin Kelly, 14 years ago

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.

comment:3 by Jirka Vejrazka, 14 years ago

Cc: Jirka Vejrazka added

comment:4 by Ramiro Morales, 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.

Last edited 14 years ago by Ramiro Morales (previous) (diff)

comment:5 by Luke Plant, 14 years ago

Type: Bug

in reply to:  4 comment:6 by Ramiro Morales, 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.

comment:7 by Erin Kelly, 14 years ago

Resolution: fixed
Status: newclosed

In [16041]:

Fixed #15534: Made the Oracle runtime test for regex capabilities use the DatabaseOperations connection instead of grabbing the default connection.

Note: See TracTickets for help on using tickets.
Back to Top