Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 6502 invoked from network); 18 Sep 2006 16:59:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Sep 2006 16:59:18 -0000 Received: (qmail 89767 invoked by uid 500); 18 Sep 2006 16:59:18 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 89734 invoked by uid 500); 18 Sep 2006 16:59:17 -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 89725 invoked by uid 99); 18 Sep 2006 16:59:17 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Sep 2006 09:59:17 -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; Mon, 18 Sep 2006 09:59:16 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 192C97142FB for ; Mon, 18 Sep 2006 16:55:25 +0000 (GMT) Message-ID: <12393651.1158598525100.JavaMail.jira@brutus> Date: Mon, 18 Sep 2006 09:55:25 -0700 (PDT) From: "Mike Matrigali (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-1784) When qualifying a column name with its synonym name in the select list, Derby throws SQLSTATE 42X04. In-Reply-To: <16321924.1156966882356.JavaMail.jira@brutus> 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 [ http://issues.apache.org/jira/browse/DERBY-1784?page=all ] Mike Matrigali updated DERBY-1784: ---------------------------------- Fix Version/s: 10.1.4.0 10.2.1.0 10.3.0.0 I ran full set of successful tests against ibm 1.4.2. Thanks Army for doing the technical review. I made some minor formatting changes to the patch to make it fit in 80 characters. I would like to see this fix get into 10.2 and 10.1. I plan on looking at the merge to 10.1 and will look at merge to 10.2 if that is not done by a rick "mega-merge". If the merge to 10.1 is not clean may need help from the contributer. m1_ibm142:91>svn commit Sending java\engine\org\apache\derby\impl\sql\compile\DMLModStatementNode.java Sending java\engine\org\apache\derby\impl\sql\compile\FromBaseTable.java Sending java\engine\org\apache\derby\impl\sql\compile\FromTable.java Sending java\engine\org\apache\derby\impl\sql\compile\InsertNode.java Sending java\engine\org\apache\derby\impl\sql\compile\UpdateNode.java Sending java\testing\org\apache\derbyTesting\functionTests\master\synonym.out Sending java\testing\org\apache\derbyTesting\functionTests\suites\derbylang.runall Sending java\testing\org\apache\derbyTesting\functionTests\tests\lang\synonym.sql Transmitting file data ........ Committed revision 447469. > When qualifying a column name with its synonym name in the select list, Derby throws SQLSTATE 42X04. > ---------------------------------------------------------------------------------------------------- > > Key: DERBY-1784 > URL: http://issues.apache.org/jira/browse/DERBY-1784 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.1.3.1, 10.3.0.0, 10.2.1.0 > Environment: Any environment > Reporter: Yip Ng > Assigned To: Yip Ng > Fix For: 10.1.4.0, 10.2.1.0, 10.3.0.0 > > Attachments: derby1784-trunk-diff01.txt, derby1784-trunk-diff02.txt, derby1784-trunk-diff03a.txt, derby1784-trunk-diff03b.txt, derby1784-trunk-stat01.txt, derby1784-trunk-stat02.txt, derby1784-trunk-stat03a.txt, derby1784-trunk-stat03b.txt > > > When qualifying a synonym with its name in the select list, Derby throws SQLSTATE 42X04 but if there is no qualification of the column, then the select statement executes successfully. > ij version 10.3 > ij> connect 'jdbc:derby:wombat;create=true' user 'user1' as user1; > WARNING 01J01: Database 'wombat' not created, connection made to existing database instead. > ij> create schema test1; > 0 rows inserted/updated/deleted > ij> create schema test2; > 0 rows inserted/updated/deleted > ij> create table test1.t1 ( id bigint not null ); > 0 rows inserted/updated/deleted > ij> create synonym test2.t1 for test1.t1; > 0 rows inserted/updated/deleted > ij> set schema test1; > 0 rows inserted/updated/deleted > ij> select t1.id from t1; > ID > -------------------- > 0 rows selected > ij> set schema test2; > 0 rows inserted/updated/deleted > ij> select t1.id from t1; > ERROR 42X04: Column 'T1.ID' is either not in any table in the FROM list or appears within a join specification and is outside the scope of the join specification or appears in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE statement then 'T1.ID' is not a column in the target table > ij> select id from t1; > ID > -------------------- > 0 rows selected > ------------------ Java Information ------------------ > Java Version: 1.4.2_12 > Java Vendor: Sun Microsystems Inc. > Java home: C:\Program Files\Java\j2re1.4.2_12 > Java classpath: classes;. > OS name: Windows XP > OS architecture: x86 > OS version: 5.1 > Java user name: Yip > Java user home: C:\Documents and Settings\Yip > Java user dir: C:\work3\derby\trunk > java.specification.name: Java Platform API Specification > java.specification.version: 1.4 > --------- Derby Information -------- > JRE - JDBC: J2SE 1.4.2 - JDBC 3.0 > [C:\work3\derby\trunk\classes] 10.3.0.0 alpha - (438358) > ------------------------------------------------------ > ----------------- Locale Information ----------------- > Current Locale : [English/United States [en_US]] > Found support for locale: [de_DE] > version: 10.3.0.0 alpha - (438358) > Found support for locale: [es] > version: 10.3.0.0 alpha - (438358) > Found support for locale: [fr] > version: 10.3.0.0 alpha - (438358) > Found support for locale: [it] > version: 10.3.0.0 alpha - (438358) > Found support for locale: [ja_JP] > version: 10.3.0.0 alpha - (438358) > Found support for locale: [ko_KR] > version: 10.3.0.0 alpha - (438358) > Found support for locale: [pt_BR] > version: 10.3.0.0 alpha - (438358) > Found support for locale: [zh_CN] > version: 10.3.0.0 alpha - (438358) > Found support for locale: [zh_TW] > version: 10.3.0.0 alpha - (438358) > ------------------------------------------------------ -- 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