Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 50011 invoked from network); 16 Nov 2010 12:19:04 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 16 Nov 2010 12:19:04 -0000 Received: (qmail 74193 invoked by uid 500); 16 Nov 2010 12:19:35 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 74081 invoked by uid 500); 16 Nov 2010 12:19:35 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 74074 invoked by uid 99); 16 Nov 2010 12:19:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Nov 2010 12:19:35 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Nov 2010 12:19:34 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oAGCJDn9003600 for ; Tue, 16 Nov 2010 12:19:14 GMT Message-ID: <24802794.107081289909953871.JavaMail.jira@thor> Date: Tue, 16 Nov 2010 07:19:13 -0500 (EST) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Closed: (DERBY-4904) Plan exporter doesn't work if XPLAIN schema has special characters In-Reply-To: <26899314.81571289827333827.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-4904?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen closed DERBY-4904. ------------------------------------- Resolution: Fixed Fix Version/s: 10.8.0.0 10.7.1.1 All the regression tests ran cleanly. Committed to trunk with revision 1035603. Committed to 10.7 with revision 1035608. > Plan exporter doesn't work if XPLAIN schema has special characters > ------------------------------------------------------------------ > > Key: DERBY-4904 > URL: https://issues.apache.org/jira/browse/DERBY-4904 > Project: Derby > Issue Type: Bug > Components: Tools > Affects Versions: 10.7.1.0 > Reporter: Knut Anders Hatlen > Assignee: Knut Anders Hatlen > Fix For: 10.7.1.1, 10.8.0.0 > > Attachments: d4904.diff > > > If the XPLAIN schema contains lowercase characters (e.g, CALL SYSCS_UTIL.SYSCS_SET_XPLAIN_SCHEMA('my_stats_schema')), the plan exporter will fail with > ERROR 42Y07: Schema 'MY_STATS_SCHEMA' does not exist > at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:286) > at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getSchemaDescriptor(DataDictionaryImpl.java:1528) > (...) > at org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(EmbedStatement.java:153) > at org.apache.derby.impl.tools.planexporter.AccessDatabase.noOfNodes(AccessDatabase.java:417) > at org.apache.derby.impl.tools.planexporter.AccessDatabase.initializeDataArray(AccessDatabase.java:323) > at org.apache.derby.tools.PlanExporter.main(PlanExporter.java:59) > If the schema contains spaces or special characters, like single-quotes or double-quotes, it will get a syntax error instead: > ij> CALL SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1); > ij> CALL SYSCS_UTIL.SYSCS_SET_XPLAIN_SCHEMA('my "quoted" schema'); > ij> SELECT * FROM SYSIBM.SYSDUMMY1; > $ java org.apache.derby.tools.PlanExporter jdbc:derby:db 'my "quoted" schema' 6f2b430a-012c-4ec6-f4a1-00000d4d4fe5 -xml plan.xml -html plan.html > ERROR 42X01: Syntax error: Encountered "schema" at line 1, column 34. > at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:286) > at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement(ParserImpl.java:155) > (...) > at org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(EmbedStatement.java:153) > at org.apache.derby.impl.tools.planexporter.AccessDatabase.noOfNodes(AccessDatabase.java:417) > at org.apache.derby.impl.tools.planexporter.AccessDatabase.initializeDataArray(AccessDatabase.java:323) > at org.apache.derby.tools.PlanExporter.main(PlanExporter.java:59) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.