Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 30833 invoked from network); 30 Jun 2005 17:47:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 30 Jun 2005 17:47:09 -0000 Received: (qmail 28090 invoked by uid 500); 30 Jun 2005 17:47:05 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 27993 invoked by uid 500); 30 Jun 2005 17:47:04 -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: "Derby Development" Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 27932 invoked by uid 99); 30 Jun 2005 17:47:04 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Jun 2005 10:47:04 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 14BBED2 for ; Thu, 30 Jun 2005 19:47:01 +0200 (CEST) Message-ID: <1543698459.1120153621083.JavaMail.jira@ajax.apache.org> Date: Thu, 30 Jun 2005 19:47:01 +0200 (CEST) From: "Mamta A. Satoor (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-405) SYNONYM should not be allowed in SESSION schema because that can confusion wih temporary tables In-Reply-To: <45319822.1120078377379.JavaMail.jira@ajax.apache.org> 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-405?page=comments#action_12314796 ] Mamta A. Satoor commented on DERBY-405: --------------------------------------- I agree with Dan's response but I think we have a bug here with statement caching. If I recall correctly, I think the goal was to not cache any statements referencing SESSION schema objects to cover an example scenario like Satheesh's script above. But looks like in the example Satheesh gave, select * from session.st1 is getting cached and that is why it does not detect that session.st1 needs to be mapped to temporary table when it is executed the 2nd time in the example. > SYNONYM should not be allowed in SESSION schema because that can confusion wih temporary tables > ----------------------------------------------------------------------------------------------- > > Key: DERBY-405 > URL: http://issues.apache.org/jira/browse/DERBY-405 > Project: Derby > Type: Bug > Components: SQL > Versions: 10.2.0.0 > Reporter: Mamta A. Satoor > Fix For: 10.2.0.0 > > A user should not be able to create a synonym in SESSION schema eg > create synonym session.st1 for app.t1; > select * from session.st1; -- refers to app.t1 > declare global temporary table st1(c11 int, c12 int) on commit preserve rows not logged; > select * from session.st1; -- refers to app.t1, is that right? > I think the last select * from session.st1 should goto temporary table st1 since any references to objects in SESSION schema should first find a match against a temporary table if one by that name exists. > We already discourage users from defining objects other than temporary table in SESSION schema in the reference manual "Using SESSION as the schema name of a physical table will not cause an error, but is discouraged. The SESSION schema name should be reserved for the temporary table schema." But, IMHO, it will be nice to enforce this wherever possible in Derby code rather than leaving it upto the users to avoid confusion. -- 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