db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dyre.Tjeldv...@Sun.COM
Subject Re: Problems with ant genchanges
Date Thu, 03 Apr 2008 08:15:58 GMT
Rick Hillegas <Richard.Hillegas@Sun.COM> writes:

> Dyre.Tjeldvoll@Sun.COM wrote:
>> I can't seem to get the ant genchanges target to produce a meaningful
>> CHANGES.html. I think I'm feeding it the same fixedBugsList.xml that I
>> used for the release notes, but the resulting CHANGES.html only contains
>> six issues. (fixedBugsList.xml contains more than 100...)
>>
>> Any ideas...?
>>
>>   
> Hi Dyre,
>
> I'm afraid I can't be very helpful here. I don't know how to generate
> an xml report from a JIRA filter anymore. I thought that I would get
> an XML report by clicking on "XML" in the Issue Navigator box after
> running the filter. That, however, merely generated an xhtml version
> of the report and not the version containing the tags expected by the
> ChangesFileGenerator program. How are you generating an XML report?

I do use the XML link. I choose the 'Save link as ...' option in
my browser. The content looks like this:

<!--  RSS generated by JIRA (Enterprise Edition, Version: 3.12.2-#300) at Wed Apr 02 01:42:48
PDT 2008 -->
<!-- If you wish to do custom client-side styling of RSS, uncomment this:
<?xml-stylesheet href="https://issues.apache.org:443/jira/styles/jiraxml2html.xsl" type="text/xsl"?>
-->
<rss version="0.92" >
<channel>
    <title>Derby 10.4 Fixed Bugs (ASF JIRA)</title>
    <link>https://issues.apache.org:443/jira/secure/IssueNavigator.jspa?requestId=12312521</link>
    <description>An XML representation of a search request</description>
    <language>en-uk</language>
<item>
<title>[DERBY-3538] NullPointerException during execution for query with LEFT OUTER
JOIN whose inner table selects all constants.</title>
<link>https://issues.apache.org:443/jira/browse/DERBY-3538</link>

                    <description>For a query having a LEFT OUTER JOIN such that the
right, or &amp;quot;inner&amp;quot;, table is a SELECT subquery whose result column
list consists entirely of constants, Derby may throw an execution-time NPE while trying to
apply the join predicate.  I say &amp;quot;may&amp;quot; because it depends on which
join strategy the optimizer chooses.
&lt;br/&gt;

&lt;br/&gt;
Using optimizer overrides I was able to reproduce this problem against trunk with the following
(admittedly nonsense) query:
&lt;br/&gt;

&lt;br/&gt;
&amp;nbsp;&amp;nbsp;create table t1 (i int, j int);
&lt;br/&gt;
&amp;nbsp;&amp;nbsp;insert into t1 values (-1, -2), (-2, -4), (-3, -9);
&lt;br/&gt;

&lt;br/&gt;
&amp;nbsp;&amp;nbsp;select * from
&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;t1 left outer join
&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(select -1 a, 1 b from t1) x0 --DERBY-PROPERTIES
joinStrategy=NESTEDLOOP
&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;on x0.a = t1.i;
&lt;br/&gt;

&lt;br/&gt;
I          |J          |A          |B
&lt;br/&gt;
-----------------------------------------------
&lt;br/&gt;
-1         |-2         |-1         |1
&lt;br/&gt;
-1         |-2         |-1         |1
&lt;br/&gt;
-1         |-2         |-1         |1
&lt;br/&gt;
ERROR 38000: The exception &apos;java.lang.NullPointerException&apos; was thrown while
evaluating an expression.
&lt;br/&gt;
ERROR XJ001: Java exception: &apos;: java.lang.NullPointerException&apos;.
&lt;br/&gt;

&lt;br/&gt;
Running the same query also failed with the same NPE on 10.0.2.1, even though optimizer overrides
don&apos;t exist there.  So I&apos;m marking all known releases to be affected by
this issue.
&lt;br/&gt;

&lt;br/&gt;
Note: while this particular query may not make much sense, I have seen a user with a very
large, auto-generated query that, when executed, fails due to this problem.  So it is worth
investigating...</description>
                <environment></environment>
            <key id="12391406">DERBY-3538</key>
        <summary>NullPointerException during execution for query with LEFT OUTER JOIN
whose inner table selects all constants.</summary>
        <type id="1" iconUrl="https://issues.apache.org:443/jira/images/icons/bug.gif">Bug</type>
    
            <priority id="4" iconUrl="https://issues.apache.org:443/jira/images/icons/priority_minor.gif">Minor</priority>
   
        <status id="5" iconUrl="https://issues.apache.org:443/jira/images/icons/status_resolved.gif">Resolved</status>
                        <resolution id="1">Fixed</resolution>
            
    
                        <assignee username="army">A B</assignee>
            
                        <reporter username="army">A B</reporter>
            
    <created>Thu, 13 Mar 2008 22:26:07 -0700 (PDT)</created>
    <updated>Tue, 25 Mar 2008 02:18:00 -0700 (PDT)</updated>

                        <version>10.0.2.0</version>
                    <version>10.0.2.1</version>
                    <version>10.1.1.0</version>
                    <version>10.1.2.1</version>
                    <version>10.1.3.1</version>
                    <version>10.2.1.6</version>
                    <version>10.2.2.0</version>
                    <version>10.3.1.4</version>
                    <version>10.3.2.1</version>
            
                        <fixVersion>10.1.3.2</fixVersion>
                    <fixVersion>10.2.2.1</fixVersion>
                    <fixVersion>10.3.2.2</fixVersion>
                    <fixVersion>10.4.1.0</fixVersion>
                    <fixVersion>10.5.0.0</fixVersion>
            
                        <component>SQL</component>
            
            <due></due>
    
            <votes>0</votes>
    
                                        

            <comments>
                    <comment id="12578621" author="army" created="Thu, 13 Mar 2008 22:37:16
-0700 (PDT)"  >I did some tracing and it *appears* that the problem is in the &amp;quot;doProjection()&amp;quot;
method of ProjectRestrictResultSet.  During code generation we recognize that the SELECT has
all constants and thus that its result set is &amp;quot;reusable&amp;quot;; see ProjectRestrictNode.generateMinion(),
esp. the call to:
&lt;br/&gt;

&lt;br/&gt;
&amp;nbsp;&amp;nbsp;mb.push(resultColumns.reusableResult());
&lt;br/&gt;

&lt;br/&gt;
At execution, ProjectResrictResultSet sees that it can reuse the result set so it &amp;quot;caches&amp;quot;
the execution row in doProjection() and then just returns that on subsequent calls.  However,
when returning the cached row, the method does *not* call &amp;quot;setCurrentRow()&amp;quot;
with the cached row.  In some cases (esp. left outer join) that can mean that the &amp;quot;current
execution row&amp;quot; corresponding to the ProjectRestrictResultSet remains null when
it should be set to the cached row.  Thus when it comes time to evaluate the ON predicate,
which references the ProjectRestrictResultSet&apos;s execution row, the predicate fails
with an NPE because the &amp;quot;current execution row&amp;quot; is not set for that
PRRS.
&lt;br/&gt;

&lt;br/&gt;
I&apos;m attaching a quick change that resolves the reported NPE.  I have *not* run any
tests on this, so it&apos;s not for commit (yet).  I don&apos;t think I&apos;ll
have much time to follow-up with this anytime soon, so if anyone out there can pick it up
and take it to completion, that&apos;d be great...</comment>
                    <comment id="12578635" author="thomanie" created="Fri, 14 Mar 2008
00:57:40 -0700 (PDT)"  >Patch, comments and explaination is very good.
&lt;br/&gt;

&lt;br/&gt;
Running some tests on it now.</comment>
                    <comment id="12579519" author="kmarsden" created="Mon, 17 Mar 2008
10:21:33 -0700 (PDT)"  >Here is the patch with a test added.  I ran suites.All and derbyall
with Army&apos;s patch and all passed.  Thomas if you have not seen any issues with the
patch I would like to commit and start backporting  back to 10.4,3,2 &amp;amp;1.
&lt;br/&gt;
</comment>
                    <comment id="12580792" author="kmarsden" created="Thu, 20 Mar 2008
08:31:36 -0700 (PDT)"  >Committed fix and ported to 10.4,10.3,10.2, and 10.1
&lt;br/&gt;
</comment>
                    <comment id="12581842" author="thomanie" created="Tue, 25 Mar 2008
02:17:59 -0700 (PDT)"  >Sorry for the very late reply. Just for the record I saw no problems
with the patch applied.
&lt;br/&gt;
</comment>
                </comments>
    
    <attachments>
            <attachment id="12377873" name="d3538_notTested.diff" size="934" author="army"
created="Thu, 13 Mar 2008 22:37:16 -0700 (PDT)" />
            <attachment id="12378047" name="derby-3538_diff.txt" size="3467" author="kmarsden"
created="Mon, 17 Mar 2008 10:21:33 -0700 (PDT)" />
        </attachments>

    <subtasks>
        </subtasks>

            <customfields>
                                                                        </customfields>
    
</item>

[...]


-- 
dt

Mime
View raw message