db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Satheesh Bandaram <sathe...@Sourcery.Org>
Subject Re: Error 38000 with a stack overflow on recordset.next()?
Date Mon, 17 Oct 2005 18:06:23 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<body bgcolor="#ffffff" text="#000000">
Daniel, any chance of posting a complete repro, so I can recreate the
problem to debug? I am also baffled by the stack trace and your
description of your program. Though your stack trace is useful, it
would be lot more useful to generate it with actual line numbers of the
code. I can do this and also investigate the problem if I can get a
complete reproduction posted.<br>
Daniel Skiles wrote:<br>
  <blockquote type="cite">
    <pre wrap="">The interesting thing about this is that the stack overflow is in 
UnionResultSet.openCore, yet what you describe here has nothing to do 
with unions. There's nothing in the language code that I know of that 
would introduce a UnionResultSet into any of these statements.
  <pre wrap=""><!---->
  <blockquote type="cite">
    <pre wrap="">I suspect the real problem is with one of the INSERT statements. 
Cloudscape allows the VALUES clause on an INSERT to have more than 
one row. When you do this it represents it internally as an insert of 
a multi-way union of rows with constants in them. If your code put 
together an INSERT/VALUES with 100,000 rows, Cloudscape would 
represent it as 100,000 nested UnionResultSets. This could easily 
cause a stack overflow of the type you're seeing.
  <pre wrap=""><!---->
  <blockquote type="cite">
    <pre wrap="">Now, what I've described here doesn't match what you've described for

your code, but is it possible your code doesn't do exactly what you 
think it does?
  <pre wrap=""><!---->
  <blockquote type="cite">
    <pre wrap="">I suppose the potential stack overflow from a huge VALUES clause 
could be considered a bug, although I don't know how important it 
would be to fix it. The most obvious fix would be to introduce a 
ValuesResultSet that iterates over a set of constant rows and a 
corresponding ValuesNode, and to change the parser so it generates a 
ValuesNode instead of a set of UnionNodes.
  <pre wrap=""><!---->

--My entire utility is less than 300 lines long.  Each query that I
showed you I took directly out of the code.  The exception also pops up
in the select query and not the inserts.  Is it possible to connect to
an embedded database using ij and look at it?  I'd like to see if
anything is actually in there.  If so, what kind of connection string
should I use?

Thanks for your time.


View raw message