ZOracleDA and select LONGs, for more than one row.
(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
At 07:26 03/11/99 , Anthony Baxter wrote:
(wah. www.zope.org/Collector gone away)
This has been on port 8080 for quite a while now. And with the move to a new machine, it can now be found at http://classic.zope.org:8080/Collector -- Martijn Pieters, Web Developer | Antraciet http://www.antraciet.nl | Tel: +31-35-7502100 Fax: +31-35-7502111 | mailto:mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ------------------------------------------
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 )
On 11/3/99 1:26 AM, Anthony Baxter at anthony@ekorp.com 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).
I'll look at this and see if we can reproduce it. Chris -- | Christopher Petrilli Python Powered Digital Creations, Inc. | petrilli@digicool.com http://www.digicool.com
participants (4)
-
Anthony Baxter -
Christopher Petrilli -
Martijn Pieters -
zope@infosys.com.ar