Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 11665 invoked from network); 7 Oct 2010 09:04:01 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Oct 2010 09:04:01 -0000 Received: (qmail 84541 invoked by uid 500); 7 Oct 2010 09:04:00 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 84473 invoked by uid 500); 7 Oct 2010 09:04:00 -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 84466 invoked by uid 99); 7 Oct 2010 09:03:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Oct 2010 09:03:59 +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; Thu, 07 Oct 2010 09:03:57 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o9793Z2s024858 for ; Thu, 7 Oct 2010 09:03:35 GMT Message-ID: <9954716.22941286442215392.JavaMail.jira@thor> Date: Thu, 7 Oct 2010 05:03:35 -0400 (EDT) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-4838) dblook outputs GRANT statements for ignored tables In-Reply-To: <9136571.22731286441552388.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-4838?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen updated DERBY-4838: -------------------------------------- Issue & fix info: [Repro attached] Example: 1) Create a database with authorization enabled, create two tables, and add column level privileges to both tables: $ java -Dderby.database.sqlAuthorization=true org.apache.derby.tools.ij ij version 10.7 ij> connect 'jdbc:derby:db;create=true'; WARNING 01J14: SQL authorization is being used without first enabling authentication. ij> create table t1(x int); 0 rows inserted/updated/deleted ij> create table t2(y int); 0 rows inserted/updated/deleted ij> grant select (x) on t1 to user1; 0 rows inserted/updated/deleted ij> grant select (y) on t2 to user2; 0 rows inserted/updated/deleted ij> exit; 2) Run dblook restricted to one of the tables: $ java org.apache.derby.tools.dblook -t t1 -d jdbc:derby:db -- Timestamp: 2010-10-07 10:58:42.089 -- Source database is: db -- Connection URL is: jdbc:derby:db -- The dblook utility will consider only specified tables. -- appendLogs: false -- ---------------------------------------------- -- DDL Statements for tables -- ---------------------------------------------- CREATE TABLE "APP"."T1" ("X" INTEGER); -- ---------------------------------------------- -- GRANT statements for columns -- ---------------------------------------------- GRANT SELECT("X") ON "APP"."T1" TO "USER1"; GRANT SELECT("Y") ON "APP"."T2" TO "USER2"; The CREATE TABLE statement for T2 is correctly suppressed. The statement that grants select privilege on T2 should also be suppressed. > dblook outputs GRANT statements for ignored tables > -------------------------------------------------- > > Key: DERBY-4838 > URL: https://issues.apache.org/jira/browse/DERBY-4838 > Project: Derby > Issue Type: Bug > Components: Tools > Affects Versions: 10.7.0.0 > Reporter: Knut Anders Hatlen > > dblook has an option that allows the user to specify which tables to produce DDL statements for: > -t ... to specify a list of tables for which > the DDL will be generated; any tables not in the list will be ignored. > However, GRANT statements for privileges on tables not in that list will still be printed. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.