db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Leroux (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-4553) In ij GETCURRENTROWNUMBER directly writeits result to output
Date Thu, 18 Feb 2010 21:15:27 GMT

     [ https://issues.apache.org/jira/browse/DERBY-4553?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sylvain Leroux updated DERBY-4553:
----------------------------------

    Attachment: DERBY-4553.patch

Attaching a patch for this issue. Ready for review.

This patch introduce the classe ijScalarResult representing a single value returned from an
ij statement. ijScalarResult is defined as a subclass of ijVectorResult. I use it to store
the integer value returned by getCurrentRowNumber().

However, according to the comment on ijVectorResult, that class is for vectors of /strings/.
But, the only usage for such vectors ends up in org.apache.derby.impl.tools.ij.util.DisplayVector(LocalizedOutput,
Vector) where a println is issued for each item. So, I don't think it is a problem to feed
such a vector with other kind of objects. Moreover, ijVectorResult is package-private so there
is little chance  this break anything outside of ij.


I wasn't able to find where ij's cursor statements are tested (are they?). So I add a simple
test for GETCURRENTROWNUMBER in ij7.sql


Pass ToolScript test suite:
    sh$ java junit.textui.TestRunner org.apache.derbyTesting.functionTests.tests.tools.ToolScripts

    ........
    Time: 24.031
    
    OK (8 tests)


> In ij GETCURRENTROWNUMBER directly writeits result  to output
> -------------------------------------------------------------
>
>                 Key: DERBY-4553
>                 URL: https://issues.apache.org/jira/browse/DERBY-4553
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>            Reporter: Sylvain Leroux
>            Assignee: Sylvain Leroux
>            Priority: Trivial
>         Attachments: DERBY-4553.patch, DERBY-4553_repro.patch
>
>
> In ij, the statement GETCURRENTROWNUMBER directly write its result to output instead
of returning it:
> Here are the faulty lines in ij.ij, method GetCurrentRowNumber():
> 	...
> 	LocalizedResource.OutputWriter().println(utilInstance.getCurrentRowNumber(rs));
> 	return null;
> This interferes with testing - and possibly with any external tool using the ij.ij parser.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message