Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 80784 invoked from network); 1 Oct 2010 10:56:00 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Oct 2010 10:56:00 -0000 Received: (qmail 83345 invoked by uid 500); 1 Oct 2010 10:56:00 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 83150 invoked by uid 500); 1 Oct 2010 10:55:58 -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 83141 invoked by uid 99); 1 Oct 2010 10:55:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Oct 2010 10:55:57 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED,WEIRD_QUOTING 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; Fri, 01 Oct 2010 10:55:54 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o91AtWbx018286 for ; Fri, 1 Oct 2010 10:55:33 GMT Message-ID: <25539981.495131285930532830.JavaMail.jira@thor> Date: Fri, 1 Oct 2010 06:55:32 -0400 (EDT) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-4829) dblook fails if there is a column privilege on a table whose name contains a quote In-Reply-To: <24789918.494131285924113130.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-4829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916855#action_12916855 ] Knut Anders Hatlen commented on DERBY-4829: ------------------------------------------- When I'm adding a test case for this in dblook_test, I also see that the GRANT statements for the column privileges are not correctly excluded if dblook is called with -t. This makes dblook_test print an error message. I think this also affects other GRANT statements produced by dblook, but dblook_test doesn't currently test any privileges, so that's not exposed. I'll just let dblook_test's canons expect these errors for now, and file a separate issue for fixing the exclusion logic for GRANT statements. > dblook fails if there is a column privilege on a table whose name contains a quote > ---------------------------------------------------------------------------------- > > Key: DERBY-4829 > URL: https://issues.apache.org/jira/browse/DERBY-4829 > Project: Derby > Issue Type: Bug > Components: Tools > Affects Versions: 10.6.2.1 > Reporter: Knut Anders Hatlen > Assignee: Knut Anders Hatlen > Priority: Minor > > Create a table with a column privilege like this in ij: > connect 'jdbc:derby:db;create=true'; > call syscs_util.syscs_set_database_property('derby.database.sqlAuthorization', 'true'); > create table """" (x int); > disconnect; > connect 'jdbc:derby:db;shutdown=true'; > connect 'jdbc:derby:db'; > grant select (x) on """" to someone; > exit; > If you then run dblook -d jdbc:derby:db, you'll see this: > -- ---------------------------------------------- > -- GRANT statements for columns > -- ---------------------------------------------- > -- Note: At least one unexpected error/warning message was > -- encountered during DDL generation. See dblook.log > -- to review the message(s). > And in dblook.log you'll find this: > java.sql.SQLException: Invalid cursor state - no current row. > at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source) > at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) > at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) > at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source) > at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source) > at org.apache.derby.impl.jdbc.ConnectionChild.newSQLException(Unknown Source) > at org.apache.derby.impl.jdbc.EmbedResultSet.checkOnRow(Unknown Source) > at org.apache.derby.impl.jdbc.EmbedResultSet.getColumn(Unknown Source) > at org.apache.derby.impl.jdbc.EmbedResultSet.getString(Unknown Source) > at org.apache.derby.impl.tools.dblook.DB_GrantRevoke.mapColumnsToNames(Unknown Source) > at org.apache.derby.impl.tools.dblook.DB_GrantRevoke.columnPrivStatement(Unknown Source) > at org.apache.derby.impl.tools.dblook.DB_GrantRevoke.generateColumnPrivs(Unknown Source) > at org.apache.derby.impl.tools.dblook.DB_GrantRevoke.doAuthorizations(Unknown Source) > at org.apache.derby.tools.dblook.go(Unknown Source) > at org.apache.derby.tools.dblook.(Unknown Source) > at org.apache.derby.tools.dblook.main(Unknown Source) > Caused by: java.sql.SQLException: Invalid cursor state - no current row. > at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) > at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source) > ... 16 more > -- **--> DEBUG: Invalid cursor state - no current row. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.