You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Sunitha Kambhampati <ks...@gmail.com> on 2006/07/15 02:14:44 UTC

Question about DRDAProtocolExceptionInfo fields.

DRDAProtocolExceptionInfo has 4 fields.   The comments are unclear to 
me. Does anyone know what is the difference between the errorCodePoint 
and the errCdCodePoint ?   All the places this object is created, the 
errCdCodePoint has value NO_ASSOC_ERRCD.

    // The Codepoint of the error (e.g CodePoint.SYTNAXRM)
    protected int errorCodePoint;      
   
    // Severity Code
    protected int svrcod;
   
    // The CodePoint describing the errCD (e.g. CodePint.SYNERRCD)
    protected int errCdCodePoint ;
   
    // Sends an originating Codepoint
    protected boolean sendsCodpntArg;

-----------------

Thanks,
Sunitha.

Re: [PATCH] To add comments to DRDAProtocolExceptionInfo ( was Re: Question about DRDAProtocolExceptionInfo fields.)

Posted by Knut Anders Hatlen <Kn...@Sun.COM>.
Sunitha Kambhampati <ks...@gmail.com> writes:

> Thanks Knut Anders. I agree with them.  I am attaching a patch to add
> these comments to the code.

Thank you, Sunitha! I have committed the patch with revision 422882.

-- 
Knut Anders

[PATCH] To add comments to DRDAProtocolExceptionInfo ( was Re: Question about DRDAProtocolExceptionInfo fields.)

Posted by Sunitha Kambhampati <ks...@gmail.com>.
Thanks Knut Anders. I agree with them.  I am attaching a patch to add 
these comments to the code.

svn stat
M      java\drda\org\apache\derby\impl\drda\DRDAProtocolExceptionInfo.java

Can someone please commit this patch if it looks ok. This patch has only 
comments added, so I did ant clobber and ant all and the build went 
fine.  I have not run any tests.

Thanks,
Sunitha.

Knut Anders Hatlen wrote:

>Sunitha Kambhampati <ks...@gmail.com> writes:
>
>  
>
>>DRDAProtocolExceptionInfo has 4 fields.   The comments are unclear to
>>me. Does anyone know what is the difference between the errorCodePoint
>>and the errCdCodePoint ?
>>    
>>
>
>I'm just guessing here, but it seems to me that errorCodePoint
>specifies the code point of the error reply message, whereas
>errCdCodePoint specifies the code point of an extra required field in
>that reply message. Most error reply messages have one or two required
>fields that are quite common, like SVRCOD (severity code) or RDBNAM
>(database name). Some error reply messages additionally have required
>fields that are specific to them. errCdCodePoint is used to specify
>these. For instance, SYNTAXRM has a required field called SYNERRCD,
>and PRCCNVRM has a required field called PRCCNVCD.
>  
>
<snip examples>

Re: Question about DRDAProtocolExceptionInfo fields.

Posted by Knut Anders Hatlen <Kn...@Sun.COM>.
Sunitha Kambhampati <ks...@gmail.com> writes:

> DRDAProtocolExceptionInfo has 4 fields.   The comments are unclear to
> me. Does anyone know what is the difference between the errorCodePoint
> and the errCdCodePoint ?

I'm just guessing here, but it seems to me that errorCodePoint
specifies the code point of the error reply message, whereas
errCdCodePoint specifies the code point of an extra required field in
that reply message. Most error reply messages have one or two required
fields that are quite common, like SVRCOD (severity code) or RDBNAM
(database name). Some error reply messages additionally have required
fields that are specific to them. errCdCodePoint is used to specify
these. For instance, SYNTAXRM has a required field called SYNERRCD,
and PRCCNVRM has a required field called PRCCNVCD.

> All the places this object is created, the errCdCodePoint has value
> NO_ASSOC_ERRCD.

Actually, you have these two well hidden in DRDAProtocolException.java:

    errorInfoTable.put(DRDA_Proto_PRCCNVRM,
               new DRDAProtocolExceptionInfo(
                             CodePoint.PRCCNVRM,
                             CodePoint.SVRCOD_ERROR,
                             CodePoint.PRCCNVCD,
                             false));

    errorInfoTable.put(DRDA_Proto_SYNTAXRM,
               new DRDAProtocolExceptionInfo(
                             CodePoint.SYNTAXRM,
                             CodePoint.SVRCOD_ERROR,
                             CodePoint.SYNERRCD,
                             true));

-- 
Knut Anders