[Zope-dev] ZOracleDA and select LONGs, for more than one row.

zope@infosys.com.ar zope@infosys.com.ar
Wed, 3 Nov 1999 11:04:12 -0300 (ART)


Hi!

	I could reproduce the same error. My env is Oracle8i on a Sun
UltraSparc machine and Zope 2.0.1 on Linux.

	Has anyone a clue? I check, as Anthony, the source code and
couldn't realize what's the problem.

	Cheers,

/B

On Wed, 3 Nov 1999, Anthony Baxter wrote:

> (wah. www.zope.org/Collector gone away)
> 
> Can someone verify that I'm not going insane? Doing a select on a
> table with a column of type LONG works, but only where the select
> returns a single row. Any that returns more than one row breaks with
> an IndexError (exception included below).
> 
> given the following table:
> 
> SQL> desc testlongs ; 
>  Name                            Null?    Type
>  ------------------------------- -------- ----
>  ID                                       NUMBER(38)
>  DATA                                     LONG
> 
> And the following SQL method:
> 
>     select * from testlongs 
> 
> It works when there's only one row in the result.
> 
> SQL> insert into testlongs values ( 1, 
> 	'helllohelllohellllhelllohelllohelllohehellohello' ) ; 
> SQL> insert into testlongs values ( 2, 
> 	'helllohelllohellllhelllohelllohelllohehellohello' ) ; 
> 
>     select * from testlongs where id = 1
> works.
>     select * from testlongs where id = 2
> works.
> 
>     select * from testlongs where id < 3
> fails, with 
> exceptions.IndexError: 1 
> 
> Traceback (innermost last):
>   File /export/zope/zope2/lib/python/ZPublisher/Publish.py, 
> 					    line 214, 
> 					    in publish_module
>   File /export/zope/zope2/lib/python/ZPublisher/Publish.py, 
> 					    line 176, 
> 					    in publish
>   File /export/zope/zope2/lib/python/Zope/__init__.py, 
> 					    line 201, 
> 					    in zpublisher_exception_hook
>     (Object: testlong)
>   File /export/zope/zope2/lib/python/ZPublisher/Publish.py, 
> 					    line 161, 
> 					    in publish
>   File /export/zope/zope2/lib/python/ZPublisher/mapply.py, 
> 					    line 160, 
> 					    in mapply
>     (Object: manage_test)
>   File /export/zope/zope2/lib/python/ZPublisher/Publish.py, 
> 					    line 102, 
> 					    in call_object
>     (Object: manage_test)
>   File /export/zope/zope2/lib/python/Shared/DC/ZRDB/DA.py, 
> 					    line 316, 
> 					    in manage_test
>     (Object: testlong)
>   File /export/zope/zope2/lib/python/Shared/DC/ZRDB/DA.py, 
> 					    line 297, 
> 					    in manage_test
>     (Object: testlong)
>   File /export/zope/zope2/lib/python/Shared/DC/ZRDB/DA.py, 
> 					    line 401, 
> 					    in __call__
>     (Object: testlong)
>   File /export/zope/zope2/lib/python/Products/ZOracleDA/db.py, 
> 					    line 202, 
> 					    in query
>   File /opt/zope/zope2/lib/python/Products/ZOracleDA/DCOracle/ociCurs.py, 
> 					    line 340, 
> 					    in fetchmany
>   File /opt/zope/zope2/lib/python/Products/ZOracleDA/DCOracle/ociCurs.py, 
> 					    line 311, 
> 					    in fetchone
> IndexError: (see above)
> 
> 
> I've had a look at the code, and I really really can't see what's going
> on here.
> 
> Anyone? 
> 
> Anthony
> 
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zope-dev
> 
> (Related lists - please, no cross posts or HTML encoding!
> 
> To receive general Zope announcements, see:
> http://lists.zope.org/mailman/listinfo/zope-announce
> 
> For non-developer, user-level issues, 
> zope@zope.org, http://lists.zope.org/mailman/listinfo/zope )
>