[egenix-users] Large Number in ZSQL 'Maximum rows to retrieve' parameter causes Memory Error

Igor Elbert ielbert at genuone.com
Tue Oct 19 13:41:52 CEST 2004


We have a query with a 'Maximum rows to retrieve' parameter set to a huge
number 1000000000 (we do not need a limit).

The query is supposed to work with both ZOracleDA and mxODBCZopeDA adapters.
With ZOracleDA we do not have any problems. With mxODBCZopeDA we got
MemoryError even if the query does not return any rows.
It looks like mxODBCZopeDA tries preallocate memory without checking if it's
needed.

While we did not find it in the manual it seems like setting 'Maximum rows
to retrieve' to 0 removes the limit but it makes the query incompatible with
ZOracleDA which does not return any rows if the parameter set to 0.


The traceback:

Connected database: Microsoft SQL Server, 08.00.0194
ODBC driver: SQLSRV32.DLL, 03.85.1117
mxODBC Zope DA 1.0.8

Error, exceptions.MemoryError

Module ZPublisher.Publish, line 49, in publish
Module ZPublisher.mapply, line 32, in mapply
Module ZPublisher.Publish, line 38, in call_object
Module Shared.DC.ZRDB.DA, line 295, in manage_test
Module Shared.DC.ZRDB.DA, line 295, in manage_test
Module Shared.DC.ZRDB.DA, line 374, in __call__
Module Products.mxODBCZopeDA.ZopeDA, line 1323, in query
Module Products.mxODBCZopeDA.ZopeDA, line 1227, in run_cursor_callback

Regards,
Igor

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.



More information about the egenix-users mailing list