Opened 11 years ago

Last modified 10 years ago

#20647 closed Bug

Trying to get repr() or str() on a queryset that has been .select_for_update() causes oracle backend to throw ORA00907 — at Initial Version

Reported by: kimvais@… Owned by: nobody
Component: Database layer (models, ORM) Version: 1.5
Severity: Normal Keywords: oracle
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Doing anything that would get a string representation of any QuerySet that has been selected for update (.select_of_update()) on oracle backend causes the following stacktrace

Traceback (most recent call last):

File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/site-packages/django/db/models/query.py", line 77, in repr

data = list(self[:REPR_OUTPUT_SIZE + 1])

File "/usr/lib/python2.6/site-packages/django/db/models/query.py", line 92, in len

self._result_cache.extend(self._iter)

File "/usr/lib/python2.6/site-packages/django/db/models/query.py", line 301, in iterator

for row in compiler.results_iter():

File "/usr/lib/python2.6/site-packages/django/db/models/sql/compiler.py", line 775, in results_iter

for rows in self.execute_sql(MULTI):

File "/usr/lib/python2.6/site-packages/django/db/models/sql/compiler.py", line 840, in execute_sql

cursor.execute(sql, params)

File "/usr/lib/python2.6/site-packages/django/db/backends/oracle/base.py", line 717, in execute

six.reraise(utils.DatabaseError, utils.DatabaseError(*tuple(e.args)), sys.exc_info()[2])

File "/usr/lib/python2.6/site-packages/django/db/backends/oracle/base.py", line 710, in execute

return self.cursor.execute(query, self._param_generator(params))

django.db.utils.DatabaseError: ORA-00907: missing right parenthesis

Change History (1)

by Tim Graham, 11 years ago

Attachment: 20647-test.diff added
Note: See TracTickets for help on using tickets.
Back to Top