On Tue, 2007-06-05 at 13:35 +0200, [EMAIL PROTECTED] wrote: > I'v read in change log that some stack allocted memory were moved to the > heap, but I think that there is still to much allocated memory on the stack. > After creating a table with 2000 columns, jdbc driver created a query that > run out of stack. Default java's stack limit is low, but it wasn't hard to > create simillar query that crashed C application with default stack limit. > And the fact that it crashed instead repoting an error isn't really nice. > The query created by the driver looks like that: > > select null as TABLE_CAT, null as TABLE_SCHEM, 'test' as TABLE_NAME, cn as > COLUMN_NAME, dt as DATA_TYPE, tn as TYPE_NAME, 2000000000 as COLUMN_SIZE, > 2000000000 as BUFFER_LENGTH, 10 as DECIMAL_DIGITS, 10 as NUM_PREC_RADIX, > colnullable as NULLABLE, null as REMARKS, null as COLUMN_DEF, 0 as > SQL_DATA_TYPE, 0 as SQL_DATETIME_SUB, 2000000000 as CHAR_OCTET_LENGTH, > ordpos as ORDINAL_POSITION, (case colnullable when 0 then 'N' when 1 then 'Y' > else '' end) as IS_NULLABLE, null as SCOPE_CATLOG, null as SCOPE_SCHEMA, > null as SCOPE_TABLE, null as SOURCE_DATA_TYPE from (select 0 as ordpos, 1 as > colnullable, 'col1' as cn, 'double' as tn, 8 as dt union all select 1 as > ordpos, 1 as colnullable, 'col2' as cn, 'double' as tn, 8 as dt union all > select 2 as ordpos, 1 as colnullable, 'col3' as cn, 'double' as tn, 8 as dt > union all select 3 as ordpos, 1 as colnullable, 'col4' as cn, 'double' as tn, > 8 as dt union all select 4 as ordpos, 1 as colnullable, 'lastcol' as cn, > 'double' as tn, 8 as dt); > > but uses more columns.
There have been some recent changes to try to address this by placing various limits on number of columns, length of SQL expressions, length of SQL statements etc. See: http://www.sqlite.org/cvstrac/fileview?f=sqlite/src/limits.h&v=1.6 So you could try with cvs head and the problem might have already been fixed. But so that we can check, can you post the database schema and the actual SQL statement that caused the crash in the sqlite shell? Or mail it to me off-list if it's too large or something. Thanks, Dan. ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------