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 "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2010/11/15 12:35:14 UTC

[jira] Created: (DERBY-4903) Plan exporter tool produces broken output if query contains less-than operator

Plan exporter tool produces broken output if query contains less-than operator
------------------------------------------------------------------------------

                 Key: DERBY-4903
                 URL: https://issues.apache.org/jira/browse/DERBY-4903
             Project: Derby
          Issue Type: Bug
          Components: Tools
    Affects Versions: 10.7.1.0
            Reporter: Knut Anders Hatlen


The plan exporter tool fails to produce well-formed output for the following query:

ij> select * from sysibm.sysdummy1 where ibmreqd < 'Z';

The generation of XML doesn't fail, but when I open the file in Firefox, I see this message:

XML Parsing Error: not well-formed
Location: file:///tmp/plan.xml
Line Number 9, Column 11:

Operator: <
----------^

HTML generation prints the following error, and produces an empty file:

ERROR:  'The value of attribute "scan_qualifiers" associated with an element type "null" must not contain the '<' character.'

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


[jira] Updated: (DERBY-4903) Plan exporter tool produces broken output if query contains less-than operator

Posted by "C.S. Nirmal J. Fernando (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

C.S. Nirmal J. Fernando updated DERBY-4903:
-------------------------------------------

    Attachment: derby-4903-a.diff

Hi,

I'm attaching a patch which addresses the occurrences of special XML characters such as >(&gt;), <(&lt;), '(&apos;) and "(&quot;), in both <statement> nodes and attribute nodes. 

I've attached few test cases as well.

Thanks.

> Plan exporter tool produces broken output if query contains less-than operator
> ------------------------------------------------------------------------------
>
>                 Key: DERBY-4903
>                 URL: https://issues.apache.org/jira/browse/DERBY-4903
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.7.1.0
>            Reporter: Knut Anders Hatlen
>            Assignee: C.S. Nirmal J. Fernando
>         Attachments: derby-4903-a.diff
>
>
> The plan exporter tool fails to produce well-formed output for the following query:
> ij> select * from sysibm.sysdummy1 where ibmreqd < 'Z';
> The generation of XML doesn't fail, but when I open the file in Firefox, I see this message:
> XML Parsing Error: not well-formed
> Location: file:///tmp/plan.xml
> Line Number 9, Column 11:
> Operator: <
> ----------^
> HTML generation prints the following error, and produces an empty file:
> ERROR:  'The value of attribute "scan_qualifiers" associated with an element type "null" must not contain the '<' character.'

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


[jira] Commented: (DERBY-4903) Plan exporter tool produces broken output if query contains less-than operator

Posted by "C.S. Nirmal J. Fernando (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12935631#action_12935631 ] 

C.S. Nirmal J. Fernando commented on DERBY-4903:
------------------------------------------------

Hi Knut,

Thanks for the ideas! 

Can you please consider following.

Few negative/tricky points on doing this:
1) This way XML document becomes hard to read: It was a requirement, so that the user can go through a generated XML file and build up his own Style sheet.

eg: 
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?xml-stylesheet type="text/xsl" href="..."?>
<plan><statement>SELECT * FROM T WHERE X &lt;&gt; 'a &amp; b'</statement><time>2010-11-24 18:27:14.466</time></plan>

2) This need some re-factoring of the design approach:

* Now we are getting the name of the attribute from the query, we might need to change it.
* Now I am building the whole query plan tree and then only write the whole string to the file, we need to alter this approach.
etc.

3) Given the time constraint at that time, I was unable to find any other approach of creating the HTML file. Since creating the HTML file involves parsing the style sheet as well. I think we need some extra classes when creating the XML document. So, I am not quite sure about the presence of those extra classes in all JREs.

4) Element.setTextContent() method is not there in J2SE 1.4.2, and it gave rubbish when I used setNodeValue().

After considering all these facts I think it's better to keep XML generation in this way and just handle those special character occurrences.

I'm not reluctant to change the code if you have other ideas, I just wanted to say what I feel :).

Thanks.



> Plan exporter tool produces broken output if query contains less-than operator
> ------------------------------------------------------------------------------
>
>                 Key: DERBY-4903
>                 URL: https://issues.apache.org/jira/browse/DERBY-4903
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.7.1.0
>            Reporter: Knut Anders Hatlen
>            Assignee: C.S. Nirmal J. Fernando
>         Attachments: derby-4903-a.diff
>
>
> The plan exporter tool fails to produce well-formed output for the following query:
> ij> select * from sysibm.sysdummy1 where ibmreqd < 'Z';
> The generation of XML doesn't fail, but when I open the file in Firefox, I see this message:
> XML Parsing Error: not well-formed
> Location: file:///tmp/plan.xml
> Line Number 9, Column 11:
> Operator: <
> ----------^
> HTML generation prints the following error, and produces an empty file:
> ERROR:  'The value of attribute "scan_qualifiers" associated with an element type "null" must not contain the '<' character.'

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


[jira] Assigned: (DERBY-4903) Plan exporter tool produces broken output if query contains less-than operator

Posted by "C.S. Nirmal J. Fernando (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

C.S. Nirmal J. Fernando reassigned DERBY-4903:
----------------------------------------------

    Assignee: C.S. Nirmal J. Fernando

> Plan exporter tool produces broken output if query contains less-than operator
> ------------------------------------------------------------------------------
>
>                 Key: DERBY-4903
>                 URL: https://issues.apache.org/jira/browse/DERBY-4903
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.7.1.0
>            Reporter: Knut Anders Hatlen
>            Assignee: C.S. Nirmal J. Fernando
>
> The plan exporter tool fails to produce well-formed output for the following query:
> ij> select * from sysibm.sysdummy1 where ibmreqd < 'Z';
> The generation of XML doesn't fail, but when I open the file in Firefox, I see this message:
> XML Parsing Error: not well-formed
> Location: file:///tmp/plan.xml
> Line Number 9, Column 11:
> Operator: <
> ----------^
> HTML generation prints the following error, and produces an empty file:
> ERROR:  'The value of attribute "scan_qualifiers" associated with an element type "null" must not contain the '<' character.'

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


[jira] Commented: (DERBY-4903) Plan exporter tool produces broken output if query contains less-than operator

Posted by "C.S. Nirmal J. Fernando (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12935811#action_12935811 ] 

C.S. Nirmal J. Fernando commented on DERBY-4903:
------------------------------------------------

Oh, yeah! Your approach looks fine to me!

Thanks.

> Plan exporter tool produces broken output if query contains less-than operator
> ------------------------------------------------------------------------------
>
>                 Key: DERBY-4903
>                 URL: https://issues.apache.org/jira/browse/DERBY-4903
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.7.1.0
>            Reporter: Knut Anders Hatlen
>            Assignee: C.S. Nirmal J. Fernando
>         Attachments: derby-4903-a.diff, derby-4903-b.diff, derby-4903-c.diff, test.diff
>
>
> The plan exporter tool fails to produce well-formed output for the following query:
> ij> select * from sysibm.sysdummy1 where ibmreqd < 'Z';
> The generation of XML doesn't fail, but when I open the file in Firefox, I see this message:
> XML Parsing Error: not well-formed
> Location: file:///tmp/plan.xml
> Line Number 9, Column 11:
> Operator: <
> ----------^
> HTML generation prints the following error, and produces an empty file:
> ERROR:  'The value of attribute "scan_qualifiers" associated with an element type "null" must not contain the '<' character.'

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


[jira] Reopened: (DERBY-4903) Plan exporter tool produces broken output if query contains less-than operator

Posted by "C.S. Nirmal J. Fernando (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

C.S. Nirmal J. Fernando reopened DERBY-4903:
--------------------------------------------


> Plan exporter tool produces broken output if query contains less-than operator
> ------------------------------------------------------------------------------
>
>                 Key: DERBY-4903
>                 URL: https://issues.apache.org/jira/browse/DERBY-4903
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.7.1.1
>            Reporter: Knut Anders Hatlen
>            Assignee: C.S. Nirmal J. Fernando
>             Fix For: 10.7.1.1, 10.8.0.0
>
>         Attachments: derby-4903-a.diff, derby-4903-b.diff, derby-4903-c.diff, test.diff
>
>
> The plan exporter tool fails to produce well-formed output for the following query:
> ij> select * from sysibm.sysdummy1 where ibmreqd < 'Z';
> The generation of XML doesn't fail, but when I open the file in Firefox, I see this message:
> XML Parsing Error: not well-formed
> Location: file:///tmp/plan.xml
> Line Number 9, Column 11:
> Operator: <
> ----------^
> HTML generation prints the following error, and produces an empty file:
> ERROR:  'The value of attribute "scan_qualifiers" associated with an element type "null" must not contain the '<' character.'

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-4903) Plan exporter tool produces broken output if query contains less-than operator

Posted by "C.S. Nirmal J. Fernando (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932033#action_12932033 ] 

C.S. Nirmal J. Fernando commented on DERBY-4903:
------------------------------------------------

Hi Knut,

I didn't notice the latter part of the description (i.e. ERROR: 'The value of attribute "scan_qualifiers" associated with an element type "null" must not contain the '<' character.'), earlier. Sorry about that.

So, it seems like there's a bug here.

I'll look into this if you're not going to take it. :)

Thanks for pointing this out!

> Plan exporter tool produces broken output if query contains less-than operator
> ------------------------------------------------------------------------------
>
>                 Key: DERBY-4903
>                 URL: https://issues.apache.org/jira/browse/DERBY-4903
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.7.1.0
>            Reporter: Knut Anders Hatlen
>
> The plan exporter tool fails to produce well-formed output for the following query:
> ij> select * from sysibm.sysdummy1 where ibmreqd < 'Z';
> The generation of XML doesn't fail, but when I open the file in Firefox, I see this message:
> XML Parsing Error: not well-formed
> Location: file:///tmp/plan.xml
> Line Number 9, Column 11:
> Operator: <
> ----------^
> HTML generation prints the following error, and produces an empty file:
> ERROR:  'The value of attribute "scan_qualifiers" associated with an element type "null" must not contain the '<' character.'

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


[jira] Commented: (DERBY-4903) Plan exporter tool produces broken output if query contains less-than operator

Posted by "C.S. Nirmal J. Fernando (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12935386#action_12935386 ] 

C.S. Nirmal J. Fernando commented on DERBY-4903:
------------------------------------------------

Kunt: As I remember we had few issues on doing this;

1) A way to add a pointer to the XSL style sheet
2) Difficulty of finding all classes needed, in all JREs.

Are these making sense? If you think otherwise please let us know.

Bryan: Hi Bryan! Since we're composing XML attribute strings into quoted substrings, from the query it self, I can't see away, where we can avoid doing this. Please forgive me if I misunderstood your question.


> Plan exporter tool produces broken output if query contains less-than operator
> ------------------------------------------------------------------------------
>
>                 Key: DERBY-4903
>                 URL: https://issues.apache.org/jira/browse/DERBY-4903
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.7.1.0
>            Reporter: Knut Anders Hatlen
>            Assignee: C.S. Nirmal J. Fernando
>         Attachments: derby-4903-a.diff
>
>
> The plan exporter tool fails to produce well-formed output for the following query:
> ij> select * from sysibm.sysdummy1 where ibmreqd < 'Z';
> The generation of XML doesn't fail, but when I open the file in Firefox, I see this message:
> XML Parsing Error: not well-formed
> Location: file:///tmp/plan.xml
> Line Number 9, Column 11:
> Operator: <
> ----------^
> HTML generation prints the following error, and produces an empty file:
> ERROR:  'The value of attribute "scan_qualifiers" associated with an element type "null" must not contain the '<' character.'

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


[jira] Commented: (DERBY-4903) Plan exporter tool produces broken output if query contains less-than operator

Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12935205#action_12935205 ] 

Bryan Pendleton commented on DERBY-4903:
----------------------------------------

This seems like a pretty reasonable approach, and the test cases look appropriate, too.

It seems like it would be nice to perform the special character encoding of the
XML attribute strings *prior* to composing them into quoted substrings in the XML tag string,
since then replaceInAttribute() wouldn't have to go searching for the start and end of
the attribute string to find it.

But this diff is small and focused on the problem at hand, and that's always good.

   

> Plan exporter tool produces broken output if query contains less-than operator
> ------------------------------------------------------------------------------
>
>                 Key: DERBY-4903
>                 URL: https://issues.apache.org/jira/browse/DERBY-4903
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.7.1.0
>            Reporter: Knut Anders Hatlen
>            Assignee: C.S. Nirmal J. Fernando
>         Attachments: derby-4903-a.diff
>
>
> The plan exporter tool fails to produce well-formed output for the following query:
> ij> select * from sysibm.sysdummy1 where ibmreqd < 'Z';
> The generation of XML doesn't fail, but when I open the file in Firefox, I see this message:
> XML Parsing Error: not well-formed
> Location: file:///tmp/plan.xml
> Line Number 9, Column 11:
> Operator: <
> ----------^
> HTML generation prints the following error, and produces an empty file:
> ERROR:  'The value of attribute "scan_qualifiers" associated with an element type "null" must not contain the '<' character.'

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


[jira] Commented: (DERBY-4903) Plan exporter tool produces broken output if query contains less-than operator

Posted by "C.S. Nirmal J. Fernando (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12935797#action_12935797 ] 

C.S. Nirmal J. Fernando commented on DERBY-4903:
------------------------------------------------

Hi Bryan,

>It seems like it would be nice to perform the special character encoding of the
>XML attribute strings *prior* to composing them into quoted substrings in the XML tag string,
>since then replaceInAttribute() wouldn't have to go searching for the start and end of
>the attribute string to find it.

Since we're getting the attributes as quoted substrings from the database query it self,
I'm not quite clear whether this is possible.




> Plan exporter tool produces broken output if query contains less-than operator
> ------------------------------------------------------------------------------
>
>                 Key: DERBY-4903
>                 URL: https://issues.apache.org/jira/browse/DERBY-4903
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.7.1.0
>            Reporter: Knut Anders Hatlen
>            Assignee: C.S. Nirmal J. Fernando
>         Attachments: derby-4903-a.diff, test.diff
>
>
> The plan exporter tool fails to produce well-formed output for the following query:
> ij> select * from sysibm.sysdummy1 where ibmreqd < 'Z';
> The generation of XML doesn't fail, but when I open the file in Firefox, I see this message:
> XML Parsing Error: not well-formed
> Location: file:///tmp/plan.xml
> Line Number 9, Column 11:
> Operator: <
> ----------^
> HTML generation prints the following error, and produces an empty file:
> ERROR:  'The value of attribute "scan_qualifiers" associated with an element type "null" must not contain the '<' character.'

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


[jira] Commented: (DERBY-4903) Plan exporter tool produces broken output if query contains less-than operator

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12935784#action_12935784 ] 

Knut Anders Hatlen commented on DERBY-4903:
-------------------------------------------

Committed derby-4903-a to trunk with revision 1039084.

> Plan exporter tool produces broken output if query contains less-than operator
> ------------------------------------------------------------------------------
>
>                 Key: DERBY-4903
>                 URL: https://issues.apache.org/jira/browse/DERBY-4903
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.7.1.0
>            Reporter: Knut Anders Hatlen
>            Assignee: C.S. Nirmal J. Fernando
>         Attachments: derby-4903-a.diff
>
>
> The plan exporter tool fails to produce well-formed output for the following query:
> ij> select * from sysibm.sysdummy1 where ibmreqd < 'Z';
> The generation of XML doesn't fail, but when I open the file in Firefox, I see this message:
> XML Parsing Error: not well-formed
> Location: file:///tmp/plan.xml
> Line Number 9, Column 11:
> Operator: <
> ----------^
> HTML generation prints the following error, and produces an empty file:
> ERROR:  'The value of attribute "scan_qualifiers" associated with an element type "null" must not contain the '<' character.'

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


[jira] Commented: (DERBY-4903) Plan exporter tool produces broken output if query contains less-than operator

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932044#action_12932044 ] 

Knut Anders Hatlen commented on DERBY-4903:
-------------------------------------------

Note that the problem is not limited to the character '<'. You'll see similar problems if the queries run against a table with '"' in its name, for example with these queries:

ij> create table "A ""quoted"" table name" (x int);
0 rows inserted/updated/deleted
ij> select * from "A ""quoted"" table name";
X          
-----------

0 rows selected


> Plan exporter tool produces broken output if query contains less-than operator
> ------------------------------------------------------------------------------
>
>                 Key: DERBY-4903
>                 URL: https://issues.apache.org/jira/browse/DERBY-4903
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.7.1.0
>            Reporter: Knut Anders Hatlen
>
> The plan exporter tool fails to produce well-formed output for the following query:
> ij> select * from sysibm.sysdummy1 where ibmreqd < 'Z';
> The generation of XML doesn't fail, but when I open the file in Firefox, I see this message:
> XML Parsing Error: not well-formed
> Location: file:///tmp/plan.xml
> Line Number 9, Column 11:
> Operator: <
> ----------^
> HTML generation prints the following error, and produces an empty file:
> ERROR:  'The value of attribute "scan_qualifiers" associated with an element type "null" must not contain the '<' character.'

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


[jira] Updated: (DERBY-4903) Plan exporter tool produces broken output if query contains less-than operator

Posted by "C.S. Nirmal J. Fernando (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

C.S. Nirmal J. Fernando updated DERBY-4903:
-------------------------------------------

    Attachment: derby-4903-b.diff

Hi Knut,

What about something like this for replacing '&' ?

> Plan exporter tool produces broken output if query contains less-than operator
> ------------------------------------------------------------------------------
>
>                 Key: DERBY-4903
>                 URL: https://issues.apache.org/jira/browse/DERBY-4903
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.7.1.0
>            Reporter: Knut Anders Hatlen
>            Assignee: C.S. Nirmal J. Fernando
>         Attachments: derby-4903-a.diff, derby-4903-b.diff, test.diff
>
>
> The plan exporter tool fails to produce well-formed output for the following query:
> ij> select * from sysibm.sysdummy1 where ibmreqd < 'Z';
> The generation of XML doesn't fail, but when I open the file in Firefox, I see this message:
> XML Parsing Error: not well-formed
> Location: file:///tmp/plan.xml
> Line Number 9, Column 11:
> Operator: <
> ----------^
> HTML generation prints the following error, and produces an empty file:
> ERROR:  'The value of attribute "scan_qualifiers" associated with an element type "null" must not contain the '<' character.'

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


[jira] Commented: (DERBY-4903) Plan exporter tool produces broken output if query contains less-than operator

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12935413#action_12935413 ] 

Knut Anders Hatlen commented on DERBY-4903:
-------------------------------------------

> 1) A way to add a pointer to the XSL style sheet

I think the org.w3c.dom.Document.createProcessingInstruction() method
could do that. The following code fragment seems to create a pointer
to the style sheet for me, and it automatically escapes the '<', '>'
and '&' characters in the query text:

        Document doc =
                DocumentBuilderFactory.newInstance().
                newDocumentBuilder().newDocument();

        doc.appendChild(
                doc.createProcessingInstruction(
                        "xml-stylesheet",
                        "type=\"text/xsl\" href=\"...\""));

        Element plan = doc.createElement("plan");
        doc.appendChild(plan);

        Element statement = doc.createElement("statement");
        statement.setTextContent("SELECT * FROM T WHERE X <> 'a & b'");
        plan.appendChild(statement);

        Element time = doc.createElement("time");
        time.setTextContent("2010-11-24 18:27:14.466");
        plan.appendChild(time);

        Source source = new DOMSource(doc);
        Result result = new StreamResult(System.out);

        Transformer trans = TransformerFactory.newInstance().newTransformer();
        trans.transform(source, result);


> 2) Difficulty of finding all classes needed, in all JREs. 

That's what I thought too, and that's why I was surprised to see that
the generation of HTML files used those classes. But since the tool
now appears to depend on these classes being available, wouldn't it
make sense to use them for generating the XML too?

> Plan exporter tool produces broken output if query contains less-than operator
> ------------------------------------------------------------------------------
>
>                 Key: DERBY-4903
>                 URL: https://issues.apache.org/jira/browse/DERBY-4903
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.7.1.0
>            Reporter: Knut Anders Hatlen
>            Assignee: C.S. Nirmal J. Fernando
>         Attachments: derby-4903-a.diff
>
>
> The plan exporter tool fails to produce well-formed output for the following query:
> ij> select * from sysibm.sysdummy1 where ibmreqd < 'Z';
> The generation of XML doesn't fail, but when I open the file in Firefox, I see this message:
> XML Parsing Error: not well-formed
> Location: file:///tmp/plan.xml
> Line Number 9, Column 11:
> Operator: <
> ----------^
> HTML generation prints the following error, and produces an empty file:
> ERROR:  'The value of attribute "scan_qualifiers" associated with an element type "null" must not contain the '<' character.'

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


[jira] Commented: (DERBY-4903) Plan exporter tool produces broken output if query contains less-than operator

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12935323#action_12935323 ] 

Knut Anders Hatlen commented on DERBY-4903:
-------------------------------------------

By the way, it looks like the HTML generation uses javax.xml.* classes in order to transform XML to HTML. Is there a reason why we couldn't use those classes to generate the XML in the first place? I suppose they would escape the strings automatically (and correctly).

> Plan exporter tool produces broken output if query contains less-than operator
> ------------------------------------------------------------------------------
>
>                 Key: DERBY-4903
>                 URL: https://issues.apache.org/jira/browse/DERBY-4903
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.7.1.0
>            Reporter: Knut Anders Hatlen
>            Assignee: C.S. Nirmal J. Fernando
>         Attachments: derby-4903-a.diff
>
>
> The plan exporter tool fails to produce well-formed output for the following query:
> ij> select * from sysibm.sysdummy1 where ibmreqd < 'Z';
> The generation of XML doesn't fail, but when I open the file in Firefox, I see this message:
> XML Parsing Error: not well-formed
> Location: file:///tmp/plan.xml
> Line Number 9, Column 11:
> Operator: <
> ----------^
> HTML generation prints the following error, and produces an empty file:
> ERROR:  'The value of attribute "scan_qualifiers" associated with an element type "null" must not contain the '<' character.'

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


[jira] Closed: (DERBY-4903) Plan exporter tool produces broken output if query contains less-than operator

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen closed DERBY-4903.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 10.8.0.0
                   10.7.1.1

Merged to 10.7 and committed 1039272. Closing the issue.

> Plan exporter tool produces broken output if query contains less-than operator
> ------------------------------------------------------------------------------
>
>                 Key: DERBY-4903
>                 URL: https://issues.apache.org/jira/browse/DERBY-4903
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.7.1.0
>            Reporter: Knut Anders Hatlen
>            Assignee: C.S. Nirmal J. Fernando
>             Fix For: 10.7.1.1, 10.8.0.0
>
>         Attachments: derby-4903-a.diff, derby-4903-b.diff, derby-4903-c.diff, test.diff
>
>
> The plan exporter tool fails to produce well-formed output for the following query:
> ij> select * from sysibm.sysdummy1 where ibmreqd < 'Z';
> The generation of XML doesn't fail, but when I open the file in Firefox, I see this message:
> XML Parsing Error: not well-formed
> Location: file:///tmp/plan.xml
> Line Number 9, Column 11:
> Operator: <
> ----------^
> HTML generation prints the following error, and produces an empty file:
> ERROR:  'The value of attribute "scan_qualifiers" associated with an element type "null" must not contain the '<' character.'

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


[jira] Updated: (DERBY-4903) Plan exporter tool produces broken output if query contains less-than operator

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-4903:
--------------------------------------

    Attachment: derby-4903-c.diff

Thanks Nirmal, but that was the code I tried which went into an infinite loop. The reason is that the replace() method will continue until the resulting string contains no '&' characters, and even if it replaces a '&' with "&amp;", it will still find an '&' in the result string.

The attached patch (derby-4903-c.diff) uses a different approach, which also works for '&'.

> Plan exporter tool produces broken output if query contains less-than operator
> ------------------------------------------------------------------------------
>
>                 Key: DERBY-4903
>                 URL: https://issues.apache.org/jira/browse/DERBY-4903
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.7.1.0
>            Reporter: Knut Anders Hatlen
>            Assignee: C.S. Nirmal J. Fernando
>         Attachments: derby-4903-a.diff, derby-4903-b.diff, derby-4903-c.diff, test.diff
>
>
> The plan exporter tool fails to produce well-formed output for the following query:
> ij> select * from sysibm.sysdummy1 where ibmreqd < 'Z';
> The generation of XML doesn't fail, but when I open the file in Firefox, I see this message:
> XML Parsing Error: not well-formed
> Location: file:///tmp/plan.xml
> Line Number 9, Column 11:
> Operator: <
> ----------^
> HTML generation prints the following error, and produces an empty file:
> ERROR:  'The value of attribute "scan_qualifiers" associated with an element type "null" must not contain the '<' character.'

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


[jira] Commented: (DERBY-4903) Plan exporter tool produces broken output if query contains less-than operator

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12935951#action_12935951 ] 

Knut Anders Hatlen commented on DERBY-4903:
-------------------------------------------

Thanks, Nirmal. Committed revision 1039268.

> Plan exporter tool produces broken output if query contains less-than operator
> ------------------------------------------------------------------------------
>
>                 Key: DERBY-4903
>                 URL: https://issues.apache.org/jira/browse/DERBY-4903
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.7.1.0
>            Reporter: Knut Anders Hatlen
>            Assignee: C.S. Nirmal J. Fernando
>         Attachments: derby-4903-a.diff, derby-4903-b.diff, derby-4903-c.diff, test.diff
>
>
> The plan exporter tool fails to produce well-formed output for the following query:
> ij> select * from sysibm.sysdummy1 where ibmreqd < 'Z';
> The generation of XML doesn't fail, but when I open the file in Firefox, I see this message:
> XML Parsing Error: not well-formed
> Location: file:///tmp/plan.xml
> Line Number 9, Column 11:
> Operator: <
> ----------^
> HTML generation prints the following error, and produces an empty file:
> ERROR:  'The value of attribute "scan_qualifiers" associated with an element type "null" must not contain the '<' character.'

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


[jira] Commented: (DERBY-4903) Plan exporter tool produces broken output if query contains less-than operator

Posted by "C.S. Nirmal J. Fernando (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12935785#action_12935785 ] 

C.S. Nirmal J. Fernando commented on DERBY-4903:
------------------------------------------------

Hi Knut & Bryan,

Thanks for the responds.

I really like to try this out, but due to academic constraints that I have till the 3rd week of January 2011, 
I am not quite sure that I will be able to look at re-factoring the code before that. If there's no rush I'll definitely
take it after January 2011. :)

For now I'll attach a patch soon, on comments received for patch (a).

Thanks.


> Plan exporter tool produces broken output if query contains less-than operator
> ------------------------------------------------------------------------------
>
>                 Key: DERBY-4903
>                 URL: https://issues.apache.org/jira/browse/DERBY-4903
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.7.1.0
>            Reporter: Knut Anders Hatlen
>            Assignee: C.S. Nirmal J. Fernando
>         Attachments: derby-4903-a.diff
>
>
> The plan exporter tool fails to produce well-formed output for the following query:
> ij> select * from sysibm.sysdummy1 where ibmreqd < 'Z';
> The generation of XML doesn't fail, but when I open the file in Firefox, I see this message:
> XML Parsing Error: not well-formed
> Location: file:///tmp/plan.xml
> Line Number 9, Column 11:
> Operator: <
> ----------^
> HTML generation prints the following error, and produces an empty file:
> ERROR:  'The value of attribute "scan_qualifiers" associated with an element type "null" must not contain the '<' character.'

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


[jira] Commented: (DERBY-4903) Plan exporter tool produces broken output if query contains less-than operator

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12935320#action_12935320 ] 

Knut Anders Hatlen commented on DERBY-4903:
-------------------------------------------

It may also be worthwhile to factor out the code that encodes the special characters, and put it in a helper method instead of repeating the code.

I think we also need to escape & -> &amp; in these strings. The query below results in XML that's not well-formed, and the HTML generation fails with a NullPointerException:

    select * from sysibm.sysdummy1 where ibmreqd = 'a, b & c'

> Plan exporter tool produces broken output if query contains less-than operator
> ------------------------------------------------------------------------------
>
>                 Key: DERBY-4903
>                 URL: https://issues.apache.org/jira/browse/DERBY-4903
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.7.1.0
>            Reporter: Knut Anders Hatlen
>            Assignee: C.S. Nirmal J. Fernando
>         Attachments: derby-4903-a.diff
>
>
> The plan exporter tool fails to produce well-formed output for the following query:
> ij> select * from sysibm.sysdummy1 where ibmreqd < 'Z';
> The generation of XML doesn't fail, but when I open the file in Firefox, I see this message:
> XML Parsing Error: not well-formed
> Location: file:///tmp/plan.xml
> Line Number 9, Column 11:
> Operator: <
> ----------^
> HTML generation prints the following error, and produces an empty file:
> ERROR:  'The value of attribute "scan_qualifiers" associated with an element type "null" must not contain the '<' character.'

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


[jira] Commented: (DERBY-4903) Plan exporter tool produces broken output if query contains less-than operator

Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12935777#action_12935777 ] 

Bryan Pendleton commented on DERBY-4903:
----------------------------------------

+1 to not worrying too much about the human-readability of the generated XML.
I think there are plenty of other reformatting tools that an XML-savvy user will
have access to. 

Regarding the selection of which classes to use, I'd like to see us using
the built-in system classes for XML  handling wherever possible. As Nirmal
notes, we were struggling with the availability of these classes, see for
example the discussion of xml-apis.jar in DERBY-4781.

Over time, the core platform Java environments become more sophisticated and
provide more complete XML support, and as that occurs, if we can shift
work away from our own custom code and into system-provided code that
seems like a clear win, so I think it would be great if Knut could preserve
these suggestions for how to do that as part of a JIRA issue somewhere.


> Plan exporter tool produces broken output if query contains less-than operator
> ------------------------------------------------------------------------------
>
>                 Key: DERBY-4903
>                 URL: https://issues.apache.org/jira/browse/DERBY-4903
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.7.1.0
>            Reporter: Knut Anders Hatlen
>            Assignee: C.S. Nirmal J. Fernando
>         Attachments: derby-4903-a.diff
>
>
> The plan exporter tool fails to produce well-formed output for the following query:
> ij> select * from sysibm.sysdummy1 where ibmreqd < 'Z';
> The generation of XML doesn't fail, but when I open the file in Firefox, I see this message:
> XML Parsing Error: not well-formed
> Location: file:///tmp/plan.xml
> Line Number 9, Column 11:
> Operator: <
> ----------^
> HTML generation prints the following error, and produces an empty file:
> ERROR:  'The value of attribute "scan_qualifiers" associated with an element type "null" must not contain the '<' character.'

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


[jira] Resolved: (DERBY-4903) Plan exporter tool produces broken output if query contains less-than operator

Posted by "C.S. Nirmal J. Fernando (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

C.S. Nirmal J. Fernando resolved DERBY-4903.
--------------------------------------------

    Resolution: Fixed

> Plan exporter tool produces broken output if query contains less-than operator
> ------------------------------------------------------------------------------
>
>                 Key: DERBY-4903
>                 URL: https://issues.apache.org/jira/browse/DERBY-4903
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.7.1.1
>            Reporter: Knut Anders Hatlen
>            Assignee: C.S. Nirmal J. Fernando
>             Fix For: 10.8.0.0, 10.7.1.1
>
>         Attachments: derby-4903-a.diff, derby-4903-b.diff, derby-4903-c.diff, test.diff
>
>
> The plan exporter tool fails to produce well-formed output for the following query:
> ij> select * from sysibm.sysdummy1 where ibmreqd < 'Z';
> The generation of XML doesn't fail, but when I open the file in Firefox, I see this message:
> XML Parsing Error: not well-formed
> Location: file:///tmp/plan.xml
> Line Number 9, Column 11:
> Operator: <
> ----------^
> HTML generation prints the following error, and produces an empty file:
> ERROR:  'The value of attribute "scan_qualifiers" associated with an element type "null" must not contain the '<' character.'

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-4903) Plan exporter tool produces broken output if query contains less-than operator

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12935791#action_12935791 ] 

Knut Anders Hatlen commented on DERBY-4903:
-------------------------------------------

Thanks, Bryan. I'll file a new JIRA issue for making use of the XML libraries.

> Plan exporter tool produces broken output if query contains less-than operator
> ------------------------------------------------------------------------------
>
>                 Key: DERBY-4903
>                 URL: https://issues.apache.org/jira/browse/DERBY-4903
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.7.1.0
>            Reporter: Knut Anders Hatlen
>            Assignee: C.S. Nirmal J. Fernando
>         Attachments: derby-4903-a.diff
>
>
> The plan exporter tool fails to produce well-formed output for the following query:
> ij> select * from sysibm.sysdummy1 where ibmreqd < 'Z';
> The generation of XML doesn't fail, but when I open the file in Firefox, I see this message:
> XML Parsing Error: not well-formed
> Location: file:///tmp/plan.xml
> Line Number 9, Column 11:
> Operator: <
> ----------^
> HTML generation prints the following error, and produces an empty file:
> ERROR:  'The value of attribute "scan_qualifiers" associated with an element type "null" must not contain the '<' character.'

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


[jira] Commented: (DERBY-4903) Plan exporter tool produces broken output if query contains less-than operator

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932042#action_12932042 ] 

Knut Anders Hatlen commented on DERBY-4903:
-------------------------------------------

Hi Nirmal,
Thanks for taking a look at this bug. And for volunteering to fix it. :)

> Plan exporter tool produces broken output if query contains less-than operator
> ------------------------------------------------------------------------------
>
>                 Key: DERBY-4903
>                 URL: https://issues.apache.org/jira/browse/DERBY-4903
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.7.1.0
>            Reporter: Knut Anders Hatlen
>
> The plan exporter tool fails to produce well-formed output for the following query:
> ij> select * from sysibm.sysdummy1 where ibmreqd < 'Z';
> The generation of XML doesn't fail, but when I open the file in Firefox, I see this message:
> XML Parsing Error: not well-formed
> Location: file:///tmp/plan.xml
> Line Number 9, Column 11:
> Operator: <
> ----------^
> HTML generation prints the following error, and produces an empty file:
> ERROR:  'The value of attribute "scan_qualifiers" associated with an element type "null" must not contain the '<' character.'

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


[jira] Commented: (DERBY-4903) Plan exporter tool produces broken output if query contains less-than operator

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12935775#action_12935775 ] 

Knut Anders Hatlen commented on DERBY-4903:
-------------------------------------------

Hi Nirmal,

Thanks for writing up the challenges with such a rewrite. Some more
comments below...

> Few negative/tricky points on doing this:
> 1) This way XML document becomes hard to read: It was a requirement,
> so that the user can go through a generated XML file and build up
> his own Style sheet.

I think the Transformer can be tuned to pretty print the document. For
example, this code makes it output XML that looks more or less
identical to the manually formatted XML generated by the exporter:

    trans.setOutputProperty(OutputKeys.INDENT, "yes");
    trans.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");

(I'm not sure exactly how portable the above code is, but I'm sure we
can work out something that'll do the trick.)

I've also noticed that, no matter how badly formatted the XML document
is, it looks nice and tidy when I open it in Firefox. I assume other
XML tools will behave similarly.

> 2) This need some re-factoring of the design approach:

I agree. It will be a chunk of work that someone must volunteer to do.

> 3) Given the time constraint at that time, I was unable to find any
> other approach of creating the HTML file. Since creating the HTML
> file involves parsing the style sheet as well. I think we need some
> extra classes when creating the XML document. So, I am not quite
> sure about the presence of those extra classes in all JREs.

I'm assuming the JREs in question are the Java ME ones. Those JREs
don't even have the classes used in the generation of HTML files, so
they'd need the Xalan jars on the classpath to be able to run the plan
exporter in any case. I believe the Xalan jars contain all the classes
and interfaces needed, also to generate the XML file, but I may be
mistaken.

> 4) Element.setTextContent() method is not there in J2SE 1.4.2, and
> it gave rubbish when I used setNodeValue().

Right, to make it work in 1.4.2, I think we need to replace
setTextContent(text) with appendChild(doc.createTextNode(text)).

> After considering all these facts I think it's better to keep XML
> generation in this way and just handle those special character
> occurrences.

Well, I lean towards the opposite conclusion... :)

If we had used the XML libraries to generate the XML, we wouldn't have
had this bug or DERBY-4902, and perhaps other bugs that we haven't
discovered yet.

But I think the current patch would be a good incremental
improvement. I'll check it in and back-port it to the 10.7 branch so
that it makes it into the next release candidate. If we want to change
how the XML is generated, we can file a new JIRA issue to track that
work.

> Plan exporter tool produces broken output if query contains less-than operator
> ------------------------------------------------------------------------------
>
>                 Key: DERBY-4903
>                 URL: https://issues.apache.org/jira/browse/DERBY-4903
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.7.1.0
>            Reporter: Knut Anders Hatlen
>            Assignee: C.S. Nirmal J. Fernando
>         Attachments: derby-4903-a.diff
>
>
> The plan exporter tool fails to produce well-formed output for the following query:
> ij> select * from sysibm.sysdummy1 where ibmreqd < 'Z';
> The generation of XML doesn't fail, but when I open the file in Firefox, I see this message:
> XML Parsing Error: not well-formed
> Location: file:///tmp/plan.xml
> Line Number 9, Column 11:
> Operator: <
> ----------^
> HTML generation prints the following error, and produces an empty file:
> ERROR:  'The value of attribute "scan_qualifiers" associated with an element type "null" must not contain the '<' character.'

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


[jira] Updated: (DERBY-4903) Plan exporter tool produces broken output if query contains less-than operator

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-4903:
--------------------------------------

    Attachment: test.diff

Here's a patch that extends the test case with testing more special characters, and by adding a less-than operator as mentioned in the original bug description.

The test fails because the special character '&' wasn't handled by the patch. I tried to add a case for '&' in AccessDatabase, but the replace methods go into an infinite loop when trying to replace '&' with "&amp;" because the replacement text includes the character to be replaced. I'll try to come up with a different solution.

> Plan exporter tool produces broken output if query contains less-than operator
> ------------------------------------------------------------------------------
>
>                 Key: DERBY-4903
>                 URL: https://issues.apache.org/jira/browse/DERBY-4903
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.7.1.0
>            Reporter: Knut Anders Hatlen
>            Assignee: C.S. Nirmal J. Fernando
>         Attachments: derby-4903-a.diff, test.diff
>
>
> The plan exporter tool fails to produce well-formed output for the following query:
> ij> select * from sysibm.sysdummy1 where ibmreqd < 'Z';
> The generation of XML doesn't fail, but when I open the file in Firefox, I see this message:
> XML Parsing Error: not well-formed
> Location: file:///tmp/plan.xml
> Line Number 9, Column 11:
> Operator: <
> ----------^
> HTML generation prints the following error, and produces an empty file:
> ERROR:  'The value of attribute "scan_qualifiers" associated with an element type "null" must not contain the '<' character.'

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


[jira] Commented: (DERBY-4903) Plan exporter tool produces broken output if query contains less-than operator

Posted by "C.S. Nirmal J. Fernando (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932029#action_12932029 ] 

C.S. Nirmal J. Fernando commented on DERBY-4903:
------------------------------------------------

Hi Knut,

I guess I handled this inside "AccessDatabase.Statement()" method. But not sure what went wrong here.

> Plan exporter tool produces broken output if query contains less-than operator
> ------------------------------------------------------------------------------
>
>                 Key: DERBY-4903
>                 URL: https://issues.apache.org/jira/browse/DERBY-4903
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.7.1.0
>            Reporter: Knut Anders Hatlen
>
> The plan exporter tool fails to produce well-formed output for the following query:
> ij> select * from sysibm.sysdummy1 where ibmreqd < 'Z';
> The generation of XML doesn't fail, but when I open the file in Firefox, I see this message:
> XML Parsing Error: not well-formed
> Location: file:///tmp/plan.xml
> Line Number 9, Column 11:
> Operator: <
> ----------^
> HTML generation prints the following error, and produces an empty file:
> ERROR:  'The value of attribute "scan_qualifiers" associated with an element type "null" must not contain the '<' character.'

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