Code

Opened 5 years ago

Closed 5 years ago

#11145 closed (invalid)

problems with LIMIT on Oracle backend

Reported by: kimus Owned by: nobody
Component: Database layer (models, ORM) Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

shell commands:

>>> from some.app.models import *
>>> Patrimony.objects.all()

sql executed by the shell commands:

ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD HH24:MI:SS' NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH24:MI:SS.FF' NLS_TERRITORY = 'AMERICA'
SELECT "PATRIMONY"."CODE", "PATRIMONY"."NAME" FROM "PATRIMONY" LIMIT 21

error:

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/home/kimus/.../django/db/models/query.py", line 55, in __repr__
    data = list(self[:REPR_OUTPUT_SIZE + 1])
  File "/home/kimus/.../django/db/models/query.py", line 70, in __len__
    self._result_cache.extend(list(self._iter))
  File "/home/kimus/.../django/db/models/query.py", line 207, in iterator
    for row in self.query.results_iter():
  File "/home/kimus/.../django/db/models/sql/query.py", line 287, in results_iter
    for rows in self.execute_sql(MULTI):
  File "/home/kimus/.../django/db/models/sql/query.py", line 2359, in execute_sql
    cursor.execute(sql, params)
  File "/home/kimus/.../django/db/backends/util.py", line 19, in execute
    return self.cursor.execute(sql, params)
  File "/home/kimus/Develop/linux/python/django/django-trunk/django/db/backends/oracle/base.py", line 434, in execute
    raise e
DatabaseError: ORA-00933: SQL command not properly ended

Attachments (0)

Change History (1)

comment:1 Changed 5 years ago by kimus

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

the problem disappeared :-) so marking has invalid

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.