Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 23439 invoked from network); 28 Sep 2006 23:05:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Sep 2006 23:05:48 -0000 Received: (qmail 14244 invoked by uid 500); 28 Sep 2006 23:05:47 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 14215 invoked by uid 500); 28 Sep 2006 23:05:47 -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 14206 invoked by uid 99); 28 Sep 2006 23:05:47 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Sep 2006 16:05:47 -0700 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received: from [209.237.227.198] ([209.237.227.198:56766] helo=brutus.apache.org) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id D4/05-00212-6355C154 for ; Thu, 28 Sep 2006 16:05:28 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4258B71420A for ; Thu, 28 Sep 2006 23:00:51 +0000 (GMT) Message-ID: <14736518.1159484451269.JavaMail.jira@brutus> Date: Thu, 28 Sep 2006 16:00:51 -0700 (PDT) From: "Yip Ng (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-1894) SQLSTATE 42X10 occurs when qualifying a column with a synonym in ORDER BY clause In-Reply-To: <6022947.1159389050031.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-1894?page=all ] Yip Ng updated DERBY-1894: -------------------------- Attachment: derby1894-trunk-stat01.txt derby1894-trunk-diff01.txt Attaching patch derby1894-trunk-diff01.txt for DERBY-1894. The fix is in FromBaseTable's getFromTableByName() method, where it is using the resolved synonym table name to do the binding for ORDER BY column. Patch includes additional tests and derbyall passes. Appreciate if someone can review it. Thanks. > SQLSTATE 42X10 occurs when qualifying a column with a synonym in ORDER BY clause > -------------------------------------------------------------------------------- > > Key: DERBY-1894 > URL: http://issues.apache.org/jira/browse/DERBY-1894 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.2.1.5, 10.3.0.0, 10.1.3.1, 10.2.2.0 > Environment: Any > Reporter: Yip Ng > Assigned To: Yip Ng > Attachments: derby1894-trunk-diff01.txt, derby1894-trunk-stat01.txt > > > SQLSTATE 42X10 occurs when qualifying a column with a synonym in ORDER BY clause, where the synonym was declared in a different schema: > ij version 10.3 > ij> connect 'jdbc:derby:wombat;create=true'; > ij> create schema test1; > 0 rows inserted/updated/deleted > ij> create schema test2; > 0 rows inserted/updated/deleted > ij> create table test1.testtable(id bigint not null); > 0 rows inserted/updated/deleted > ij> create synonym test2.testtable for test1.testtable; > 0 rows inserted/updated/deleted > ij> set schema test1; > 0 rows inserted/updated/deleted > ij> select testtable.id from testtable; > ID > -------------------- > 0 rows selected > ij> set schema test2; > 0 rows inserted/updated/deleted > ij> select testtable.id from testtable; > ID > -------------------- > 0 rows selected > ij> select testtable.id from testtable order by testtable.id; > ERROR 42X10: 'TESTTABLE' is not an exposed table name in the scope in which it appears. > ij> -- 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