Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 27353 invoked from network); 2 Jul 2009 17:32:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Jul 2009 17:32:02 -0000 Received: (qmail 7554 invoked by uid 500); 2 Jul 2009 17:32:12 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 7507 invoked by uid 500); 2 Jul 2009 17:32:12 -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 7499 invoked by uid 99); 2 Jul 2009 17:32:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jul 2009 17:32:12 +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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jul 2009 17:32:08 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3FA1D234C045 for ; Thu, 2 Jul 2009 10:31:47 -0700 (PDT) Message-ID: <632868088.1246555907259.JavaMail.jira@brutus> Date: Thu, 2 Jul 2009 10:31:47 -0700 (PDT) From: "Lily Wei (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-4295) SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE cannot be executed after granting permission for execute. In-Reply-To: <987665933.1246472987236.JavaMail.jira@brutus> 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-4295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12726568#action_12726568 ] Lily Wei commented on DERBY-4295: --------------------------------- Thanks Mamta for looking at the issue and point out our intenstion is to throw the error. Yes, there is a test in GrantRevokeDDLTest as user sam try to do SYSCS_UTIL.SYSCS_COMPRESS_TABLE on table SWIPER.MYTAB that is owned by SWIPER. Please disgard my changes. Will users ever want to be able to grant execute permission to another user? I guess we are saying we don't allow such case. Have this information in the documentation will be a good idea. I will change mailjdbc test to reflect this behavior. Thanks. > SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE cannot be executed after granting permission for execute. > -------------------------------------------------------------------------------------------------- > > Key: DERBY-4295 > URL: https://issues.apache.org/jira/browse/DERBY-4295 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.5.1.1 > Environment: Windows Vista > Reporter: Lily Wei > Priority: Minor > Attachments: derby4295.diff > > > When using derby.properties file from mailjdbc tests, call SYSCS_UTIL.SYCS_INPLACE_COMPRESs_TABLE is fine user 'BACKUP' with the following operation. Please see below: > ij version 10.3 > ij> connect 'jdbc:derby:tpri;user=BACKUP;password=Backup'; > ij> create table a (col1 int, col2 clob); > 0 rows inserted/updated/deleted > ij> insert into a values (1, '1'); > 1 row inserted/updated/deleted > ij> insert into a values (2, '2'); > 1 row inserted/updated/deleted > ij> grant execute on procedure SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE to BACKUP; > 0 rows inserted/updated/deleted > ij version 10.3 > ij> connect 'jdbc:derby:tpri;user=BACKUP;password=Backup'; > ij> call SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE('REFRESH','A',1,1,1); > 0 rows inserted/updated/deleted <<<====Operation successful===== > > However, on 10.5, the same operation result ERROR 38000 > ij> connect 'jdbc:derby:tpri;create=true;user=REFRESH;password=Refresh'; > ij> create table a (col1 int, col2 clob); > 0 rows inserted/updated/deleted > ij> insert into a values (1, '1'); > 1 row inserted/updated/deleted > ij> insert into a values (1, '2'); > 1 row inserted/updated/deleted > ij> grant execute on procedure SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE to BACKUP; > 0 rows inserted/updated/deleted > ij> exit; > > ij version 10.5 > ij> connect 'jdbc:derby:tpri;user=BACKUP;password=Backup'; > ij> call SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE('REFRESH','A',1,1,1); > ERROR 38000: The exception 'java.sql.SQLException: User 'BACKUP' can not perform > the operation in schema 'REFRESH'.' was thrown while evaluating an expression. > ERROR 42507: User 'BACKUP' can not perform the operation in schema 'REFRESH'. <<<====Operation result with ERROR 38000 > ERROR 42507: User 'BACKUP' can not perform the operation in schema 'REFRESH'.^M > at org.apache.derby.iapi.error.StandardException.newException(StandardEx > ception.java:303)^M > at org.apache.derby.iapi.sql.dictionary.StatementSchemaPermission.check( > StatementSchemaPermission.java:83)^M > at org.apache.derby.impl.sql.conn.GenericAuthorizer.authorize(GenericAut > horizer.java:186)^M > at org.apache.derby.impl.sql.execute.GenericResultSetFactory.getDDLResul > tSet(GenericResultSetFactory.java:1073)^M > at org.apache.derby.impl.sql.execute.ConstantActionActivation.execute(Co > nstantActionActivation.java:61)^M > at org.apache.derby.impl.sql.GenericActivationHolder.execute(GenericActi > vationHolder.java:352)^M > at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Generi > cPreparedStatement.java:414)^M > at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPre > paredStatement.java:297)^M > at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedState > ment.java:1235)^M > at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Em > bedPreparedStatement.java:1648)^M > at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(Embed > PreparedStatement.java:294)^M > at org.apache.derby.catalog.SystemProcedures.SYSCS_INPLACE_COMPRESS_TABL > E(SystemProcedures.java:1145)^M > at org.apache.derby.exe.ac83ba410fx0122x159fx9a84x0000004261f80.g0(Unkno > wn Source)^M > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)^M > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)^M > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)^M > at java.lang.reflect.Method.invoke(Unknown Source)^M > at org.apache.derby.impl.services.reflect.ReflectMethod.invoke(ReflectMe > thod.java:46) > at org.apache.derby.impl.sql.execute.CallStatementResultSet.open(CallSta > tementResultSet.java:76)^M > at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Generi > cPreparedStatement.java:416)^M > at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPre > paredStatement.java:297)^M > at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedState > ment.java:1235)^M > at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Em > bedPreparedStatement.java:1648)^M > at org.apache.derby.impl.jdbc.EmbedCallableStatement.executeStatement(Em > bedCallableStatement.java:117)^M > at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(EmbedPrepar > edStatement.java:1303)^M > at org.apache.derbyTesting.system.mailjdbc.utils.DbTasks.compressTable(D > bTasks.java:618)^M > at org.apache.derbyTesting.system.mailjdbc.tasks.Backup.DoCompress(Backu > p.java:79)^M > at org.apache.derbyTesting.system.mailjdbc.tasks.Backup.doWork(Backup.ja > va:68)^M > at org.apache.derbyTesting.system.mailjdbc.tasks.Backup.run(Backup.java: > 46)^M > Cleanup action completed^M > I will add the test to test/langGrantRevokeDDLTest.java. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.