Opened 15 years ago
Last modified 3 years ago
#11580 new
Unable to query TextFiled against oracle nclob 10Gr4 — at Initial Version
Reported by: | Mark Anderson | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | oracle TextField |
Cc: | Matt Boersma, carsten.fuchs@… | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I have tried icontains and regex against a TextField on an oracle database and get the following error:
DatabaseError: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 1
The code was ported directly over from mysql where the i_contains query worked. The column was created as an NCLOB. I can query against other fields fine.
Environment:
Request Method: GET
Request URL: http://django/eis/banobj/search/?q=class
Django Version: 1.1 rc 1 SVN-11348
Python Version: 2.4.3
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'eis.banobj',
'django.contrib.admin',
'django.contrib.admindocs',
'eis.ldapauth',
'eis.emailLogs']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware')
Template error:
In template /opt/django/eis/templates/banobj/arealist.html, error at line 17
Caught an exception while rendering: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 1
7 : {% block content %}
8 : <h1> {{heading}} </h1>
9 : <table border=1>
10 : <tr>
11 : <th>Banner Object</th>
12 : <th>Ready For Testing</th>
13 : <th>Tested</th>
14 : <th>Primary User</th>
15 : <th>Object Type</th>
16 : </tr>
17 : {% for obj in obj_list %}
18 : <tr bgcolor="{% cycle rowcolors %}">
19 : <td><a href="/eis/banobj/wiki/{{ obj.id }}/">{{ obj.name|upper }}</a></td>
20 : <td>{% if obj.prod_svn %}
21 : <img src="/media/img/admin/icon-yes.gif">
22 : {% else %}
23 : <img src="/media/img/admin/icon-no.gif">
24 : {% endif %}</td>
25 : <td>{% if obj.user_tested %}
26 : <img src="/media/img/admin/icon-yes.gif">
27 : {% else %}
Traceback:
File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py" in get_response
- response = callback(request, *callback_args, callback_kwargs)
File "/usr/lib/python2.4/site-packages/django/contrib/auth/decorators.py" in call
- return self.view_func(request, *args, kwargs)
File "/opt/django/eis/banobj/views.py" in search
- context_instance=RequestContext(request))
File "/usr/lib/python2.4/site-packages/django/shortcuts/init.py" in render_to_response
- return HttpResponse(loader.render_to_string(*args, kwargs), httpresponse_kwargs)
File "/usr/lib/python2.4/site-packages/django/template/loader.py" in render_to_string
- return t.render(context_instance)
File "/usr/lib/python2.4/site-packages/django/template/init.py" in render
- return self.nodelist.render(context)
File "/usr/lib/python2.4/site-packages/django/template/init.py" in render
- bits.append(self.render_node(node, context))
File "/usr/lib/python2.4/site-packages/django/template/debug.py" in render_node
- result = node.render(context)
File "/usr/lib/python2.4/site-packages/django/template/loader_tags.py" in render
- return compiled_parent.render(context)
File "/usr/lib/python2.4/site-packages/django/template/init.py" in render
- return self.nodelist.render(context)
File "/usr/lib/python2.4/site-packages/django/template/init.py" in render
- bits.append(self.render_node(node, context))
File "/usr/lib/python2.4/site-packages/django/template/debug.py" in render_node
- result = node.render(context)
File "/usr/lib/python2.4/site-packages/django/template/loader_tags.py" in render
- result = self.nodelist.render(context)
File "/usr/lib/python2.4/site-packages/django/template/init.py" in render
- bits.append(self.render_node(node, context))
File "/usr/lib/python2.4/site-packages/django/template/debug.py" in render_node
- raise wrapped
Exception Type: TemplateSyntaxError at /banobj/search/
Exception Value: Caught an exception while rendering: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 1
Original Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/django/template/debug.py", line 71, in render_node
result = node.render(context)
File "/usr/lib/python2.4/site-packages/django/template/defaulttags.py", line 126, in render
len_values = len(values)
File "/usr/lib/python2.4/site-packages/django/db/models/query.py", line 81, in len
self._result_cache = list(self.iterator())
File "/usr/lib/python2.4/site-packages/django/db/models/query.py", line 238, in iterator
for row in self.query.results_iter():
File "/usr/lib/python2.4/site-packages/django/db/models/sql/query.py", line 287, in results_iter
for rows in self.execute_sql(MULTI):
File "/usr/lib/python2.4/site-packages/django/db/models/sql/query.py", line 2383, in <lambda>
result = iter((lambda: cursor.fetchmany(GET_ITERATOR_CHUNK_SIZE)),
File "/usr/lib/python2.4/site-packages/django/db/backends/oracle/base.py", line 469, in fetchmany
return tuple([self._rowfactory(r)
DatabaseError: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 1