[ 
https://issues.apache.org/jira/browse/DERBY-6221?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rick Hillegas updated DERBY-6221:
---------------------------------

    Attachment: derby-6221-01-aa-checkForPasswordProbeAtPreprocessTime.diff

Attaching derby-6221-01-aa-checkForPasswordProbeAtPreprocessTime.diff. This 
patch moves the check for whether SYS.SYSUSERS.PASSWORD is referenced from 
code-generation time to preprocessing time. I am running tests now.

I agree with Dag's analysis of the problem. The problem is that we are looking 
at a referenced column map which has been altered by the optimizer. The fix is 
to check the referenced column map after binding but before optimization.

Touches the following files:

-------------

M       java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java

The fix.

-------------

M       
java/testing/org/apache/derbyTesting/functionTests/tests/lang/DBOAccessTest.java

New regression test cases, including the repro.

                
> Can't select from SYS.SYSUSERS if you use a WHERE clause in the query
> ---------------------------------------------------------------------
>
>                 Key: DERBY-6221
>                 URL: https://issues.apache.org/jira/browse/DERBY-6221
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.11.0.0
>            Reporter: Rick Hillegas
>            Assignee: Rick Hillegas
>         Attachments: 
> derby-6221-01-aa-checkForPasswordProbeAtPreprocessTime.diff
>
>
> The following query runs fine:
> SELECT username, lastmodified FROM sys.sysusers;
> ...but the following query raises an exception:
> SELECT username, lastmodified FROM sys.sysusers WHERE USERNAME = 'FRED';
> ...which is
> ERROR 4251E: No one can view the 'SYSUSERS'.'PASSWORD' column.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to