Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 11587 invoked from network); 26 Oct 2007 22:54:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Oct 2007 22:54:25 -0000 Received: (qmail 93376 invoked by uid 500); 26 Oct 2007 22:54:13 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 93303 invoked by uid 500); 26 Oct 2007 22:54:13 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 93292 invoked by uid 99); 26 Oct 2007 22:54:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Oct 2007 15:54:13 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Oct 2007 22:54:25 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id E2B6E1A9832; Fri, 26 Oct 2007 15:54:00 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r588788 - in /db/derby/code/trunk/java/engine/org/apache/derby: iapi/services/property/ iapi/sql/conn/ iapi/util/ impl/sql/compile/ impl/sql/conn/ impl/sql/execute/ Date: Fri, 26 Oct 2007 22:53:59 -0000 To: derby-commits@db.apache.org From: djd@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071026225400.E2B6E1A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: djd Date: Fri Oct 26 15:53:58 2007 New Revision: 588788 URL: http://svn.apache.org/viewvc?rev=588788&view=rev Log: DERBY-3147 (partial) Remove unused code to support lower-case regular identifiers from the language connection context code and the parser. Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/property/PropertyUtil.java db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/conn/LanguageConnectionContext.java db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/StringUtil.java db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/JarUtil.java Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/property/PropertyUtil.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/property/PropertyUtil.java?rev=588788&r1=588787&r2=588788&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/property/PropertyUtil.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/property/PropertyUtil.java Fri Oct 26 15:53:58 2007 @@ -459,9 +459,10 @@ return defaultValue; String vS = ((String) v).trim(); - if (StringUtil.SQLToLowerCase(vS).equals("true")) + + if ("TRUE".equals(StringUtil.SQLToUpperCase(vS))) return true; - if (StringUtil.SQLToLowerCase(vS).equals("false")) + if ("FALSE".equals(StringUtil.SQLToUpperCase(vS))) return false; throw StandardException.newException(SQLState.PROPERTY_INVALID_VALUE, p,vS); Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/conn/LanguageConnectionContext.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/conn/LanguageConnectionContext.java?rev=588788&r1=588787&r2=588788&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/conn/LanguageConnectionContext.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/conn/LanguageConnectionContext.java Fri Oct 26 15:53:58 2007 @@ -904,27 +904,6 @@ */ public boolean isTransactionPristine(); - /** - * Get casing for delimited identifiers. This feature is here to - * support the Plugin. - * - * @return ANSI_CASING or ANTI_ANSI_CASING. - * - * @exception StandardException thrown if something goes wrong - */ - public int getIdentifierCasing() throws StandardException; - - /** - * Convert an identifier to the proper case for this connection. This method - * is here to support the Plugin. - * - * @param id an identifier string - * @return the string converted to upper or lower case, as appropriate - * - * @exception StandardException thrown if something goes wrong - */ - public String convertIdentifierCase( String id) throws StandardException; - /** * Returns the last autoincrement value inserted by this connection. Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/StringUtil.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/StringUtil.java?rev=588788&r1=588787&r2=588788&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/StringUtil.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/StringUtil.java Fri Oct 26 15:53:58 2007 @@ -372,7 +372,7 @@ if (s2 == null) return false; else - return s1.toUpperCase(Locale.ENGLISH).equals(s2.toUpperCase(Locale.ENGLISH)); + return SQLToUpperCase(s1).equals(SQLToUpperCase(s2)); } Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj?rev=588788&r1=588787&r2=588788&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj Fri Oct 26 15:53:58 2007 @@ -13090,7 +13090,7 @@ * identifier */ String -internalIdentifier( int id_length_limit, boolean useANSICasing, boolean checkLength) throws StandardException : +internalIdentifier( int id_length_limit, boolean checkLength) throws StandardException : { String str; Token tok; @@ -13098,11 +13098,9 @@ { tok = { - if( useANSICasing) - str = StringUtil.SQLToUpperCase(tok.image); - else - str = getLanguageConnectionContext().convertIdentifierCase( tok.image); - if (checkLength) {//if checkLength false, then calling method would do the length limit checks + str = StringUtil.SQLToUpperCase(tok.image); + + if (checkLength) {//if checkLength false, then calling method would do the length limit checks //limit the identifier to the id length limit passed to this method checkIdentifierLengthLimit(str, id_length_limit); } @@ -13125,7 +13123,7 @@ | str = nonReservedKeyword() { - return getLanguageConnectionContext().convertIdentifierCase( str); + return StringUtil.SQLToUpperCase(str); } } @@ -13135,7 +13133,7 @@ String id; } { - id = internalIdentifier( id_length_limit, false, checkLength) + id = internalIdentifier( id_length_limit, checkLength) { return id; } @@ -13622,7 +13620,7 @@ | str = reservedKeyword() { - return getLanguageConnectionContext().convertIdentifierCase( str); + return StringUtil.SQLToUpperCase(str); } } Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java?rev=588788&r1=588787&r2=588788&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java Fri Oct 26 15:53:58 2007 @@ -135,8 +135,6 @@ private final int instanceNumber; private String drdaID; private String dbname; - - private int identifierCasing = UNKNOWN_CASING; /** The transaction to use within this language connection context. It may @@ -2603,39 +2601,6 @@ return getTransactionExecute().isPristine(); } - /** - * Convert an identifier to the proper case for this connection. This method - * is here to support the Plugin. - * - * @param id an identifier string - * @return the string converted to upper or lower case, as appropriate - * - * @exception StandardException thrown if something goes wrong - */ - public String convertIdentifierCase( String id) throws StandardException - { - if( ANTI_ANSI_CASING == getIdentifierCasing()) - return StringUtil.SQLToLowerCase(id); - else - return StringUtil.SQLToUpperCase(id); - } - - /** - * Get casing for delimited identifiers. This feature is here to - * support the Plugin. - * - * @return ANSI_CASING or ANTI_ANSI_CASING. - * - * @exception StandardException thrown if something goes wrong - */ - public int getIdentifierCasing() throws StandardException - { - if( UNKNOWN_CASING == identifierCasing) - { - identifierCasing = ANSI_CASING; - } - return identifierCasing; - } // // Context interface Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/JarUtil.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/JarUtil.java?rev=588788&r1=588787&r2=588788&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/JarUtil.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/JarUtil.java Fri Oct 26 15:53:58 2007 @@ -181,8 +181,7 @@ String dbcp_s = PropertyUtil.getServiceProperty(lcc.getTransactionExecute(),Property.DATABASE_CLASSPATH); if (dbcp_s != null) { - String[][]dbcp= IdUtil.parseDbClassPath(dbcp_s, - lcc.getIdentifierCasing() != lcc.ANTI_ANSI_CASING ); + String[][]dbcp= IdUtil.parseDbClassPath(dbcp_s, true); boolean found = false; // //Look for the jar we are dropping on our database classpath.