Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 47162 invoked from network); 1 Sep 2006 06:32:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Sep 2006 06:32:13 -0000 Received: (qmail 97575 invoked by uid 500); 1 Sep 2006 06:32:12 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 97545 invoked by uid 500); 1 Sep 2006 06:32:12 -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 97534 invoked by uid 99); 1 Sep 2006 06:32:12 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Aug 2006 23:32:12 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of kartha02@gmail.com designates 66.249.82.237 as permitted sender) Received: from [66.249.82.237] (HELO wx-out-0506.google.com) (66.249.82.237) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Aug 2006 23:32:11 -0700 Received: by wx-out-0506.google.com with SMTP id i27so907153wxd for ; Thu, 31 Aug 2006 23:31:50 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:x-accept-language:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=d7jpRBmVFw+KMpPX/v7Zn6irSRH0UDkH1U7WdCu4qca58vSaj+chL4qTLtFmTYs43o5PNGvqNDTB6YrhI/1am73jXIalBn4N0/hb24n8om2zvuoV+3AtaY3/tSTocb9wGI3TahMpA5Sf7sTXnpjic0aTxfc9EHwwfl3XC8zZvWw= Received: by 10.70.42.15 with SMTP id p15mr1834051wxp; Thu, 31 Aug 2006 23:31:50 -0700 (PDT) Received: from ?192.168.0.2? ( [24.6.28.116]) by mx.gmail.com with ESMTP id 12sm2669084wrl.2006.08.31.23.31.49; Thu, 31 Aug 2006 23:31:50 -0700 (PDT) Message-ID: <44F7D3A8.90604@gmail.com> Date: Thu, 31 Aug 2006 23:31:04 -0700 From: Rajesh Kartha User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 X-Accept-Language: en-us, en MIME-Version: 1.0 To: derby-dev@db.apache.org Subject: Re: Question on Grant/Revoke References: <44F61C07.4020609@gmail.com> <44F7108A.6030800@gmail.com> <44F71541.6080207@apache.org> In-Reply-To: <44F71541.6080207@apache.org> Content-Type: text/plain; charset=us-ascii; format=flowed 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 Daniel John Debrunner wrote: >Rajesh Kartha wrote: > > > >>>Mamta Satoor wrote: >>>Manjula, I haven't looked at the SQL spec but it looks like that the >>> >>> >>update statement is doing a select operation on the >> >> >>>column id with "where id=3" and that is what is causing Derby to send >>> >>> >>an error. >> >>More questions: >>If a separate Select privilege is indeed required then I think the >>'grant update on t1 to DBUSER' statement should not be succesful. >> >> > >No, you need the SELECT privilege because you are reading the id column, >not because you are updating the column. > >I assume if this update is executed, then no select privilege would be >needed: > >UPDATE T SET ID = ? > > >Or with this UPDATE > >UPDATE T SET ID = ? WHERE NAME = ? > >that one needs UPDATE on T(ID) and SELECT on T(NAME). > >Dan. > > > > > > > Thanks Dan, I do see for the UPDATE T SET ID = ? statement, the update works fine (even without the select permission, a bit strange though given that the user still cannot select and view the updated data). In the UPDATE T SET ID = ? WHERE NAME = ? case it fails because an explicit select on T was not given. I expected an update permission would have an implicit select also on that table. In which case the behaviour would have been consistent and both scenarios will work fine plus the user would have been able to select and view the new data. But if the current working is as per the SQL spec, I am fine. Anyways, would be better to get this confirmed. Rajesh