Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 82115 invoked from network); 28 Jul 2006 19:27:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Jul 2006 19:27:41 -0000 Received: (qmail 19244 invoked by uid 500); 28 Jul 2006 19:27:40 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 19125 invoked by uid 500); 28 Jul 2006 19:27:39 -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 19116 invoked by uid 99); 28 Jul 2006 19:27:39 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Jul 2006 12:27:39 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Jul 2006 12:27:39 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E7DA041000A for ; Fri, 28 Jul 2006 19:25:13 +0000 (GMT) Message-ID: <32359582.1154114713947.JavaMail.jira@brutus> Date: Fri, 28 Jul 2006 12:25:13 -0700 (PDT) From: "Deepa Remesh (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Created: (DERBY-1608) After upgrade, execution of builtin functions gives NPE if database property derby.database.sqlAuthorization is set to true MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N After upgrade, execution of builtin functions gives NPE if database property derby.database.sqlAuthorization is set to true --------------------------------------------------------------------------------------------------------------------------- Key: DERBY-1608 URL: http://issues.apache.org/jira/browse/DERBY-1608 Project: Derby Issue Type: Bug Components: SQL Reporter: Deepa Remesh Assigned To: Deepa Remesh Fix For: 10.2.0.0 1. Create a database in 10.1 2. Full upgrade to 10.2 - Booting using 10.2 jars by specifying "upgrade=true" in the connection URL. 3. Execute a function e.g: VALUES { fn ACOS(0.0707) }. This passes as expected. 4. Set database property derby.database.sqlAuthorization=true. 5. Shutdown and reconnect to database for the property to take effect. 6. Re-execute the function. This gives NPE. Repro using ij: -------------------------------------------------------------------------------- Steps using 10.1 jar: -------------------------------------------------------------------------------- ij version 10.1 ij> connect 'jdbc:derby:old_db;create=true'; ij> exit; -------------------------------------------------------------------------------- Steps using 10.2 jar: -------------------------------------------------------------------------------- ij version 10.2 ij> connect 'jdbc:derby:old_db;upgrade=true'; ij> VALUES { fn ACOS(0.0707) }; 1 ---------------------- 1.5000372950430991 1 row selected ij> call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.database.sqlAuthorization', 'true'); 0 rows inserted/updated/deleted ij> connect 'jdbc:derby:old_db;shutdown=true'; ERROR 08006: Database 'old_db' shutdown. ij> connect 'jdbc:derby:old_db'; ij(CONNECTION1)> VALUES { fn ACOS(0.0707) }; ERROR XJ001: Java exception: ': java.lang.NullPointerException'. ij(CONNECTION1)> -------------------------------------------------------------------------------- Stack trace of failure: -------------------------------------------------------------------------------- ERROR XJ001: Java exception: ': java.lang.NullPointerException'. java.lang.NullPointerException at org.apache.derby.iapi.sql.dictionary.RoutinePermsDescriptor.(RoutinePermsDescriptor .java:54) at org.apache.derby.iapi.sql.dictionary.RoutinePermsDescriptor.(RoutinePermsDescriptor .java:62) at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getRoutinePermissions(DataDictionary Impl.java:9902) at org.apache.derby.iapi.sql.dictionary.StatementRoutinePermission.check(StatementRoutinePer mission.java:55) at org.apache.derby.impl.sql.conn.GenericAuthorizer.authorize(GenericAuthorizer.java:157) at org.apache.derby.exe.ac6b91c056x010cxb687x3eb7x00000012d1c00.fillResultSet(Unknown Source ) at org.apache.derby.exe.ac6b91c056x010cxb687x3eb7x00000012d1c00.execute(Unknown Source) at org.apache.derby.impl.sql.GenericActivationHolder.execute(GenericActivationHolder.java:32 6) at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java: 355) at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1181) at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:584) at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:516) at org.apache.derby.impl.tools.ij.ij.executeImmediate(ij.java:313) at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:433) at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:312) at org.apache.derby.impl.tools.ij.Main.go(Main.java:207) at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:173) at org.apache.derby.impl.tools.ij.Main14.main(Main14.java:55) at org.apache.derby.tools.ij.main(ij.java:60) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira