db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kathey Marsden <kmarsdende...@sbcglobal.net>
Subject DDMWriter - MAX_MARKS_NESTING - Is 10 high enough?
Date Wed, 19 Jul 2006 00:58:39 GMT

I am working on an issue where the following exception occured  after a 
long 16hr  stress run.  I don't have enough to file a bug yet and don't 
have line numbers but thought I would throw this out there as a start.   
Looking at the code I see think it might be related to MAX_MARKS_NESTING.
Looking at EXCSQLSTT it seems it could have up to 20 optional or 
required parameters.  I don't know that Network Server will ever seend 
that many.  I am collecting more information and trying to get a 
reproducible case, but I was curious about MAX_MARKS_NESTING and if it 
needs to be larger than 10.

Here is the information:

THE TRACE after 16 hour run

 at org.apache.derby.impl.drda.DDMWriter.startDdm(Unknown Source)
 at org.apache.derby.impl.drda.DRDAConnThread.writeSQLCARD(Unknown Source)
 at org.apache.derby.impl.drda.DRDAConnThread.writeSQLCARDs(Unknown Source)
 at org.apache.derby.impl.drda.DRDAConnThread.writeSQLCARDs(Unknown Source)
 at org.apache.derby.impl.drda.DRDAConnThread.checkWarning(Unknown Source)
 at org.apache.derby.impl.drda.DRDAConnThread.parseEXCSQLSTT(Unknown Source)
 at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown 


// number of nesting levels for collections.  We need to mark the length
// location of the collection so that we can update it as we add more stuff
// to the collection

    private final static int MAX_MARKS_NESTING = 10;

CODE FOR startDdm
And the code for startDdm. I suspect top has exceeded 10. I  suppose it 
could be offset for bytes, but the ensurelength(4) seems like it should 
take care of that.

protected void startDdm (int codePoint)
        // save the location of the beginning of the collection so
        // that we can come back and fill in the length bytes
        markStack[top++] = offset;
        ensureLength (4); // verify space for length bytes and code point
        offset += 2; // move past the length bytes before writing the 
code point
        bytes[offset] = (byte) ((codePoint >>> 8) & 0xff);
        bytes[offset + 1] = (byte) (codePoint & 0xff);
        offset += 2;

View raw message