This is the mail archive of the rhdb-explain@sources.redhat.com mailing list for the RHDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Crash with PostgreSQL 7.4


Hi Peter,

Thank you for your report.

Apparently these nodes were added since I last looked at it. I thought I had added all the new nodes....

I wonder if this is not already in the rdhb-explain cvs tip. Originally RHDB-3-0 was a 7.3.x release and I may have avoided changing the branch.

Best regards,
Fernando



Peter Eisentraut wrote:
I have used rhdb-explain from the tag RHDB-3-0 and ran the following
query against an empty PostgreSQL 7.4.1 database:

select * from pg_tables;

This causes a null pointer exception. The output on the console is

java.lang.NullPointerException
        at com.redhat.rhdb.explain.ExplainParserV73.addQual(ExplainParserV73.java:796)
        at com.redhat.rhdb.explain.ExplainParserV73.buildExplainTree(ExplainParserV73.java:343)
        at com.redhat.rhdb.explain.ExplainParserV73.explain(ExplainParserV73.java:187)
        at com.redhat.rhdb.explain.Explain$ExplainThread.run(Explain.java:298)

The reason is that the parser code only knows "Hash Join" but PG 7.4
emits a "Hash Left Join" in this case.

Attached is a patch that kind of papers over this issue by ignoring
"Left" and other possible hash-join attributes.  Eventually one might
want to show this distinction to the user.


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


*** ../src/rhdb/guitools/rhdb-explain/src/com/redhat/rhdb/explain/ExplainParserV73.java 2003-11-21 19:30:47.000000000 +0100
--- src/com/redhat/rhdb/explain/ExplainParserV73.java 2004-02-25 21:06:04.000000000 +0100
***************
*** 447,452 ****
--- 447,460 ----
{
String next = strtok.nextToken();
+ if (next.equals("Left")
+ || next.equals("Right")
+ || next.equals("Full")
+ || next.equals("IN"))
+ {
+ next = strtok.nextToken();
+ }
+ if (next.equals("Join"))
{
node.setType(ExplainTreeNode.NODE_JOIN);



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]