You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Lukas Eder (JIRA)" <ji...@apache.org> on 2011/02/05 10:06:30 UTC

[jira] Created: (DERBY-5005) Error when fully qualifying a field from a view in an ORDER BY clause

Error when fully qualifying a field from a view in an ORDER BY clause
---------------------------------------------------------------------

                 Key: DERBY-5005
                 URL: https://issues.apache.org/jira/browse/DERBY-5005
             Project: Derby
          Issue Type: Bug
          Components: SQL
    Affects Versions: 10.7.1.1
         Environment: Windows 7
            Reporter: Lukas Eder
            Priority: Minor


I have a strange issue that can be reproduced easily with the following objects in schema "test":

create table a (a integer);
insert into a (a) values(1);
create view v as select * from a;

This works:
select test.a.a from test.a where test.a.a <> 2 order by test.a.a asc;

This doesn't work:
select test.v.a from test.v where test.v.a <> 2 order by test.v.a asc;

But this does:
select test.v.a from test.v where test.v.a <> 2 order by v.a asc;

This is the error I get:
Error: 'TEST.V' is not an exposed table name in the scope in which it appears.
SQLState:  42X10
ErrorCode: -1

I've tried quite a few SELECT caluses, and I think the ORDER BY clause is the only one having this issue.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-5005) Error when fully qualifying a field from a view in an ORDER BY clause

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12992470#comment-12992470 ] 

Dag H. Wanvik commented on DERBY-5005:
--------------------------------------

Regressions ran OK, please review.


> Error when fully qualifying a field from a view in an ORDER BY clause
> ---------------------------------------------------------------------
>
>                 Key: DERBY-5005
>                 URL: https://issues.apache.org/jira/browse/DERBY-5005
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.7.1.1
>         Environment: Windows 7
>            Reporter: Lukas Eder
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>              Labels: order, sql, syntax, views
>         Attachments: 5005.sql, derby-5005.diff, derby-5005.stat
>
>
> I have a strange issue that can be reproduced easily with the following objects in schema "test":
> create table a (a integer);
> insert into a (a) values(1);
> create view v as select * from a;
> This works:
> select test.a.a from test.a where test.a.a <> 2 order by test.a.a asc;
> This doesn't work:
> select test.v.a from test.v where test.v.a <> 2 order by test.v.a asc;
> But this does:
> select test.v.a from test.v where test.v.a <> 2 order by v.a asc;
> This is the error I get:
> Error: 'TEST.V' is not an exposed table name in the scope in which it appears.
> SQLState:  42X10
> ErrorCode: -1
> I've tried quite a few SELECT clauses, and I think the ORDER BY clause is the only one having this issue.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-5005) Error when fully qualifying a field from a view in an ORDER BY clause

Posted by "Lukas Eder (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12992506#comment-12992506 ] 

Lukas Eder commented on DERBY-5005:
-----------------------------------

Excellent guys! That was really quick! :-)

> Error when fully qualifying a field from a view in an ORDER BY clause
> ---------------------------------------------------------------------
>
>                 Key: DERBY-5005
>                 URL: https://issues.apache.org/jira/browse/DERBY-5005
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.7.1.1
>         Environment: Windows 7
>            Reporter: Lukas Eder
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>              Labels: order, sql, syntax, views
>         Attachments: 5005.sql, derby-5005.diff, derby-5005.stat
>
>
> I have a strange issue that can be reproduced easily with the following objects in schema "test":
> create table a (a integer);
> insert into a (a) values(1);
> create view v as select * from a;
> This works:
> select test.a.a from test.a where test.a.a <> 2 order by test.a.a asc;
> This doesn't work:
> select test.v.a from test.v where test.v.a <> 2 order by test.v.a asc;
> But this does:
> select test.v.a from test.v where test.v.a <> 2 order by v.a asc;
> This is the error I get:
> Error: 'TEST.V' is not an exposed table name in the scope in which it appears.
> SQLState:  42X10
> ErrorCode: -1
> I've tried quite a few SELECT clauses, and I think the ORDER BY clause is the only one having this issue.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-5005) Error when fully qualifying a field from a view in an ORDER BY clause

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-5005:
----------------------------------

    Fix Version/s: 10.7.1.3
                   10.6.2.3
                   10.5.3.2

finished backporting to 10.5


> Error when fully qualifying a field from a view in an ORDER BY clause
> ---------------------------------------------------------------------
>
>                 Key: DERBY-5005
>                 URL: https://issues.apache.org/jira/browse/DERBY-5005
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.0.2.0, 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1, 10.7.1.1
>         Environment: Windows 7
>            Reporter: Lukas Eder
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>              Labels: order, sql, syntax, views
>             Fix For: 10.5.3.2, 10.6.2.3, 10.7.1.3, 10.8.0.0
>
>         Attachments: 5005.sql, derby-5005.diff, derby-5005.stat, derby-5005_10_5_diff.txt, derby-5005b.diff, derby-5005b.stat
>
>
> I have a strange issue that can be reproduced easily with the following objects in schema "test":
> create table a (a integer);
> insert into a (a) values(1);
> create view v as select * from a;
> This works:
> select test.a.a from test.a where test.a.a <> 2 order by test.a.a asc;
> This doesn't work:
> select test.v.a from test.v where test.v.a <> 2 order by test.v.a asc;
> But this does:
> select test.v.a from test.v where test.v.a <> 2 order by v.a asc;
> This is the error I get:
> Error: 'TEST.V' is not an exposed table name in the scope in which it appears.
> SQLState:  42X10
> ErrorCode: -1
> I've tried quite a few SELECT clauses, and I think the ORDER BY clause is the only one having this issue.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (DERBY-5005) Error when fully qualifying a field from a view in an ORDER BY clause

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12994303#comment-12994303 ] 

Rick Hillegas commented on DERBY-5005:
--------------------------------------

Hi Lukas,

It's fine to verify the fix using the trunk. But that requires that you set up a development environment. It's also ok to wait until 10.8 to verify the fix. From a process point of view, it doesn't matter much: resolving the feature means that our JIRA filters will sweep this issue into the release notes for 10.8. Thanks.

> Error when fully qualifying a field from a view in an ORDER BY clause
> ---------------------------------------------------------------------
>
>                 Key: DERBY-5005
>                 URL: https://issues.apache.org/jira/browse/DERBY-5005
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.0.2.0, 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1, 10.7.1.1
>         Environment: Windows 7
>            Reporter: Lukas Eder
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>              Labels: order, sql, syntax, views
>             Fix For: 10.8.0.0
>
>         Attachments: 5005.sql, derby-5005.diff, derby-5005.stat, derby-5005b.diff, derby-5005b.stat
>
>
> I have a strange issue that can be reproduced easily with the following objects in schema "test":
> create table a (a integer);
> insert into a (a) values(1);
> create view v as select * from a;
> This works:
> select test.a.a from test.a where test.a.a <> 2 order by test.a.a asc;
> This doesn't work:
> select test.v.a from test.v where test.v.a <> 2 order by test.v.a asc;
> But this does:
> select test.v.a from test.v where test.v.a <> 2 order by v.a asc;
> This is the error I get:
> Error: 'TEST.V' is not an exposed table name in the scope in which it appears.
> SQLState:  42X10
> ErrorCode: -1
> I've tried quite a few SELECT clauses, and I think the ORDER BY clause is the only one having this issue.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-5005) Error when fully qualifying a field from a view in an ORDER BY clause

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dag H. Wanvik updated DERBY-5005:
---------------------------------

    Affects Version/s: 10.0.2.0
                       10.0.2.1
                       10.1.1.0
                       10.1.2.1
                       10.1.3.1

> Error when fully qualifying a field from a view in an ORDER BY clause
> ---------------------------------------------------------------------
>
>                 Key: DERBY-5005
>                 URL: https://issues.apache.org/jira/browse/DERBY-5005
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.0.2.0, 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1, 10.7.1.1
>         Environment: Windows 7
>            Reporter: Lukas Eder
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>              Labels: order, sql, syntax, views
>             Fix For: 10.8.0.0
>
>         Attachments: 5005.sql, derby-5005.diff, derby-5005.stat, derby-5005b.diff, derby-5005b.stat
>
>
> I have a strange issue that can be reproduced easily with the following objects in schema "test":
> create table a (a integer);
> insert into a (a) values(1);
> create view v as select * from a;
> This works:
> select test.a.a from test.a where test.a.a <> 2 order by test.a.a asc;
> This doesn't work:
> select test.v.a from test.v where test.v.a <> 2 order by test.v.a asc;
> But this does:
> select test.v.a from test.v where test.v.a <> 2 order by v.a asc;
> This is the error I get:
> Error: 'TEST.V' is not an exposed table name in the scope in which it appears.
> SQLState:  42X10
> ErrorCode: -1
> I've tried quite a few SELECT clauses, and I think the ORDER BY clause is the only one having this issue.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-5005) Error when fully qualifying a field from a view in an ORDER BY clause

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dag H. Wanvik updated DERBY-5005:
---------------------------------

    Attachment: derby-5005b.stat
                derby-5005b.diff

Uploaded derby-5005b, which just cleans up the first version a bit. Committed as svn 1069661, resolving.


> Error when fully qualifying a field from a view in an ORDER BY clause
> ---------------------------------------------------------------------
>
>                 Key: DERBY-5005
>                 URL: https://issues.apache.org/jira/browse/DERBY-5005
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.7.1.1
>         Environment: Windows 7
>            Reporter: Lukas Eder
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>              Labels: order, sql, syntax, views
>         Attachments: 5005.sql, derby-5005.diff, derby-5005.stat, derby-5005b.diff, derby-5005b.stat
>
>
> I have a strange issue that can be reproduced easily with the following objects in schema "test":
> create table a (a integer);
> insert into a (a) values(1);
> create view v as select * from a;
> This works:
> select test.a.a from test.a where test.a.a <> 2 order by test.a.a asc;
> This doesn't work:
> select test.v.a from test.v where test.v.a <> 2 order by test.v.a asc;
> But this does:
> select test.v.a from test.v where test.v.a <> 2 order by v.a asc;
> This is the error I get:
> Error: 'TEST.V' is not an exposed table name in the scope in which it appears.
> SQLState:  42X10
> ErrorCode: -1
> I've tried quite a few SELECT clauses, and I think the ORDER BY clause is the only one having this issue.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (DERBY-5005) Error when fully qualifying a field from a view in an ORDER BY clause

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dag H. Wanvik resolved DERBY-5005.
----------------------------------

          Resolution: Fixed
       Fix Version/s: 10.8.0.0
    Issue & fix info: [Repro attached, Workaround attached]  (was: [Workaround attached, Repro attached, Patch Available])

Resolving this issue. If you are OK with the fix, please close the Lukas. Thanks!


> Error when fully qualifying a field from a view in an ORDER BY clause
> ---------------------------------------------------------------------
>
>                 Key: DERBY-5005
>                 URL: https://issues.apache.org/jira/browse/DERBY-5005
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.7.1.1
>         Environment: Windows 7
>            Reporter: Lukas Eder
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>              Labels: order, sql, syntax, views
>             Fix For: 10.8.0.0
>
>         Attachments: 5005.sql, derby-5005.diff, derby-5005.stat, derby-5005b.diff, derby-5005b.stat
>
>
> I have a strange issue that can be reproduced easily with the following objects in schema "test":
> create table a (a integer);
> insert into a (a) values(1);
> create view v as select * from a;
> This works:
> select test.a.a from test.a where test.a.a <> 2 order by test.a.a asc;
> This doesn't work:
> select test.v.a from test.v where test.v.a <> 2 order by test.v.a asc;
> But this does:
> select test.v.a from test.v where test.v.a <> 2 order by v.a asc;
> This is the error I get:
> Error: 'TEST.V' is not an exposed table name in the scope in which it appears.
> SQLState:  42X10
> ErrorCode: -1
> I've tried quite a few SELECT clauses, and I think the ORDER BY clause is the only one having this issue.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (DERBY-5005) Error when fully qualifying a field from a view in an ORDER BY clause

Posted by "Lukas Eder (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukas Eder closed DERBY-5005.
-----------------------------


> Error when fully qualifying a field from a view in an ORDER BY clause
> ---------------------------------------------------------------------
>
>                 Key: DERBY-5005
>                 URL: https://issues.apache.org/jira/browse/DERBY-5005
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.0.2.0, 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1, 10.7.1.1
>         Environment: Windows 7
>            Reporter: Lukas Eder
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>              Labels: order, sql, syntax, views
>             Fix For: 10.5.3.2, 10.6.2.3, 10.7.1.4, 10.8.1.2
>
>         Attachments: 5005.sql, derby-5005.diff, derby-5005.stat, derby-5005_10_5_diff.txt, derby-5005b.diff, derby-5005b.stat
>
>
> I have a strange issue that can be reproduced easily with the following objects in schema "test":
> create table a (a integer);
> insert into a (a) values(1);
> create view v as select * from a;
> This works:
> select test.a.a from test.a where test.a.a <> 2 order by test.a.a asc;
> This doesn't work:
> select test.v.a from test.v where test.v.a <> 2 order by test.v.a asc;
> But this does:
> select test.v.a from test.v where test.v.a <> 2 order by v.a asc;
> This is the error I get:
> Error: 'TEST.V' is not an exposed table name in the scope in which it appears.
> SQLState:  42X10
> ErrorCode: -1
> I've tried quite a few SELECT clauses, and I think the ORDER BY clause is the only one having this issue.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (DERBY-5005) Error when fully qualifying a field from a view in an ORDER BY clause

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12993323#comment-12993323 ] 

Dag H. Wanvik commented on DERBY-5005:
--------------------------------------

Should be easy to backport.


> Error when fully qualifying a field from a view in an ORDER BY clause
> ---------------------------------------------------------------------
>
>                 Key: DERBY-5005
>                 URL: https://issues.apache.org/jira/browse/DERBY-5005
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.0.2.0, 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1, 10.7.1.1
>         Environment: Windows 7
>            Reporter: Lukas Eder
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>              Labels: order, sql, syntax, views
>             Fix For: 10.8.0.0
>
>         Attachments: 5005.sql, derby-5005.diff, derby-5005.stat, derby-5005b.diff, derby-5005b.stat
>
>
> I have a strange issue that can be reproduced easily with the following objects in schema "test":
> create table a (a integer);
> insert into a (a) values(1);
> create view v as select * from a;
> This works:
> select test.a.a from test.a where test.a.a <> 2 order by test.a.a asc;
> This doesn't work:
> select test.v.a from test.v where test.v.a <> 2 order by test.v.a asc;
> But this does:
> select test.v.a from test.v where test.v.a <> 2 order by v.a asc;
> This is the error I get:
> Error: 'TEST.V' is not an exposed table name in the scope in which it appears.
> SQLState:  42X10
> ErrorCode: -1
> I've tried quite a few SELECT clauses, and I think the ORDER BY clause is the only one having this issue.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-5005) Error when fully qualifying a field from a view in an ORDER BY clause

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dag H. Wanvik updated DERBY-5005:
---------------------------------

    Attachment: derby-5005.stat
                derby-5005.diff

Uploading a patch that makes the query work. It makes FromSubquery
implement its own getFromTableByName instead of using the abstract
superclass FromTable's implementation which returns null when an
explicit schema is used (a view is represented a FromSubquery here),
cf. the comment in the default implementation:

"Only FromBaseTables have schema names"

which isn't quite true; views can have them, too.

Added a new test, lang.Derby5005Test instead of adding to the harness test
orderby.sql. Made a note in orderby.sql to merge with Derby5005Test
when that test gets rewritten to JUnit.

Running regressions.


> Error when fully qualifying a field from a view in an ORDER BY clause
> ---------------------------------------------------------------------
>
>                 Key: DERBY-5005
>                 URL: https://issues.apache.org/jira/browse/DERBY-5005
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.7.1.1
>         Environment: Windows 7
>            Reporter: Lukas Eder
>            Priority: Minor
>              Labels: order, sql, syntax, views
>         Attachments: 5005.sql, derby-5005.diff, derby-5005.stat
>
>
> I have a strange issue that can be reproduced easily with the following objects in schema "test":
> create table a (a integer);
> insert into a (a) values(1);
> create view v as select * from a;
> This works:
> select test.a.a from test.a where test.a.a <> 2 order by test.a.a asc;
> This doesn't work:
> select test.v.a from test.v where test.v.a <> 2 order by test.v.a asc;
> But this does:
> select test.v.a from test.v where test.v.a <> 2 order by v.a asc;
> This is the error I get:
> Error: 'TEST.V' is not an exposed table name in the scope in which it appears.
> SQLState:  42X10
> ErrorCode: -1
> I've tried quite a few SELECT clauses, and I think the ORDER BY clause is the only one having this issue.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-5005) Error when fully qualifying a field from a view in an ORDER BY clause

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Hillegas updated DERBY-5005:
---------------------------------

    Attachment: 5005.sql

Attaching 5005.sql, a script for the problem which Lukas found. I can verify that this fails for me too.

> Error when fully qualifying a field from a view in an ORDER BY clause
> ---------------------------------------------------------------------
>
>                 Key: DERBY-5005
>                 URL: https://issues.apache.org/jira/browse/DERBY-5005
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.7.1.1
>         Environment: Windows 7
>            Reporter: Lukas Eder
>            Priority: Minor
>              Labels: order, sql, syntax, views
>         Attachments: 5005.sql
>
>
> I have a strange issue that can be reproduced easily with the following objects in schema "test":
> create table a (a integer);
> insert into a (a) values(1);
> create view v as select * from a;
> This works:
> select test.a.a from test.a where test.a.a <> 2 order by test.a.a asc;
> This doesn't work:
> select test.v.a from test.v where test.v.a <> 2 order by test.v.a asc;
> But this does:
> select test.v.a from test.v where test.v.a <> 2 order by v.a asc;
> This is the error I get:
> Error: 'TEST.V' is not an exposed table name in the scope in which it appears.
> SQLState:  42X10
> ErrorCode: -1
> I've tried quite a few SELECT clauses, and I think the ORDER BY clause is the only one having this issue.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-5005) Error when fully qualifying a field from a view in an ORDER BY clause

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Hillegas updated DERBY-5005:
---------------------------------

    Issue & fix info: [Repro attached, Workaround attached]

> Error when fully qualifying a field from a view in an ORDER BY clause
> ---------------------------------------------------------------------
>
>                 Key: DERBY-5005
>                 URL: https://issues.apache.org/jira/browse/DERBY-5005
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.7.1.1
>         Environment: Windows 7
>            Reporter: Lukas Eder
>            Priority: Minor
>              Labels: order, sql, syntax, views
>         Attachments: 5005.sql
>
>
> I have a strange issue that can be reproduced easily with the following objects in schema "test":
> create table a (a integer);
> insert into a (a) values(1);
> create view v as select * from a;
> This works:
> select test.a.a from test.a where test.a.a <> 2 order by test.a.a asc;
> This doesn't work:
> select test.v.a from test.v where test.v.a <> 2 order by test.v.a asc;
> But this does:
> select test.v.a from test.v where test.v.a <> 2 order by v.a asc;
> This is the error I get:
> Error: 'TEST.V' is not an exposed table name in the scope in which it appears.
> SQLState:  42X10
> ErrorCode: -1
> I've tried quite a few SELECT clauses, and I think the ORDER BY clause is the only one having this issue.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5005) Error when fully qualifying a field from a view in an ORDER BY clause

Posted by "Lukas Eder (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13033611#comment-13033611 ] 

Lukas Eder commented on DERBY-5005:
-----------------------------------

Works for me in 10.8. Thanks guys

> Error when fully qualifying a field from a view in an ORDER BY clause
> ---------------------------------------------------------------------
>
>                 Key: DERBY-5005
>                 URL: https://issues.apache.org/jira/browse/DERBY-5005
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.0.2.0, 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1, 10.7.1.1
>         Environment: Windows 7
>            Reporter: Lukas Eder
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>              Labels: order, sql, syntax, views
>             Fix For: 10.5.3.2, 10.6.2.3, 10.7.1.4, 10.8.1.2
>
>         Attachments: 5005.sql, derby-5005.diff, derby-5005.stat, derby-5005_10_5_diff.txt, derby-5005b.diff, derby-5005b.stat
>
>
> I have a strange issue that can be reproduced easily with the following objects in schema "test":
> create table a (a integer);
> insert into a (a) values(1);
> create view v as select * from a;
> This works:
> select test.a.a from test.a where test.a.a <> 2 order by test.a.a asc;
> This doesn't work:
> select test.v.a from test.v where test.v.a <> 2 order by test.v.a asc;
> But this does:
> select test.v.a from test.v where test.v.a <> 2 order by v.a asc;
> This is the error I get:
> Error: 'TEST.V' is not an exposed table name in the scope in which it appears.
> SQLState:  42X10
> ErrorCode: -1
> I've tried quite a few SELECT clauses, and I think the ORDER BY clause is the only one having this issue.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (DERBY-5005) Error when fully qualifying a field from a view in an ORDER BY clause

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dag H. Wanvik updated DERBY-5005:
---------------------------------

    Issue & fix info: [Patch Available, Repro attached, Workaround attached]  (was: [Workaround attached, Repro attached])

> Error when fully qualifying a field from a view in an ORDER BY clause
> ---------------------------------------------------------------------
>
>                 Key: DERBY-5005
>                 URL: https://issues.apache.org/jira/browse/DERBY-5005
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.7.1.1
>         Environment: Windows 7
>            Reporter: Lukas Eder
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>              Labels: order, sql, syntax, views
>         Attachments: 5005.sql, derby-5005.diff, derby-5005.stat
>
>
> I have a strange issue that can be reproduced easily with the following objects in schema "test":
> create table a (a integer);
> insert into a (a) values(1);
> create view v as select * from a;
> This works:
> select test.a.a from test.a where test.a.a <> 2 order by test.a.a asc;
> This doesn't work:
> select test.v.a from test.v where test.v.a <> 2 order by test.v.a asc;
> But this does:
> select test.v.a from test.v where test.v.a <> 2 order by v.a asc;
> This is the error I get:
> Error: 'TEST.V' is not an exposed table name in the scope in which it appears.
> SQLState:  42X10
> ErrorCode: -1
> I've tried quite a few SELECT clauses, and I think the ORDER BY clause is the only one having this issue.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (DERBY-5005) Error when fully qualifying a field from a view in an ORDER BY clause

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dag H. Wanvik reassigned DERBY-5005:
------------------------------------

    Assignee: Dag H. Wanvik

> Error when fully qualifying a field from a view in an ORDER BY clause
> ---------------------------------------------------------------------
>
>                 Key: DERBY-5005
>                 URL: https://issues.apache.org/jira/browse/DERBY-5005
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.7.1.1
>         Environment: Windows 7
>            Reporter: Lukas Eder
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>              Labels: order, sql, syntax, views
>         Attachments: 5005.sql, derby-5005.diff, derby-5005.stat
>
>
> I have a strange issue that can be reproduced easily with the following objects in schema "test":
> create table a (a integer);
> insert into a (a) values(1);
> create view v as select * from a;
> This works:
> select test.a.a from test.a where test.a.a <> 2 order by test.a.a asc;
> This doesn't work:
> select test.v.a from test.v where test.v.a <> 2 order by test.v.a asc;
> But this does:
> select test.v.a from test.v where test.v.a <> 2 order by v.a asc;
> This is the error I get:
> Error: 'TEST.V' is not an exposed table name in the scope in which it appears.
> SQLState:  42X10
> ErrorCode: -1
> I've tried quite a few SELECT clauses, and I think the ORDER BY clause is the only one having this issue.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-5005) Error when fully qualifying a field from a view in an ORDER BY clause

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dag H. Wanvik updated DERBY-5005:
---------------------------------

    Affects Version/s: 10.2.1.6
                       10.2.2.0
                       10.3.1.4
                       10.3.2.1
                       10.3.3.0
                       10.4.1.3
                       10.4.2.0
                       10.5.1.1
                       10.5.2.0
                       10.5.3.0
                       10.6.1.0
                       10.6.2.1

> Error when fully qualifying a field from a view in an ORDER BY clause
> ---------------------------------------------------------------------
>
>                 Key: DERBY-5005
>                 URL: https://issues.apache.org/jira/browse/DERBY-5005
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1, 10.7.1.1
>         Environment: Windows 7
>            Reporter: Lukas Eder
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>              Labels: order, sql, syntax, views
>             Fix For: 10.8.0.0
>
>         Attachments: 5005.sql, derby-5005.diff, derby-5005.stat, derby-5005b.diff, derby-5005b.stat
>
>
> I have a strange issue that can be reproduced easily with the following objects in schema "test":
> create table a (a integer);
> insert into a (a) values(1);
> create view v as select * from a;
> This works:
> select test.a.a from test.a where test.a.a <> 2 order by test.a.a asc;
> This doesn't work:
> select test.v.a from test.v where test.v.a <> 2 order by test.v.a asc;
> But this does:
> select test.v.a from test.v where test.v.a <> 2 order by v.a asc;
> This is the error I get:
> Error: 'TEST.V' is not an exposed table name in the scope in which it appears.
> SQLState:  42X10
> ErrorCode: -1
> I've tried quite a few SELECT clauses, and I think the ORDER BY clause is the only one having this issue.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-5005) Error when fully qualifying a field from a view in an ORDER BY clause

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-5005:
----------------------------------

    Attachment: derby-5005_10_5_diff.txt

For 10.5 there was a slight manual merge. Attached is the patch derby-5005_10_5_diff.txt



> Error when fully qualifying a field from a view in an ORDER BY clause
> ---------------------------------------------------------------------
>
>                 Key: DERBY-5005
>                 URL: https://issues.apache.org/jira/browse/DERBY-5005
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.0.2.0, 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1, 10.7.1.1
>         Environment: Windows 7
>            Reporter: Lukas Eder
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>              Labels: order, sql, syntax, views
>             Fix For: 10.8.0.0
>
>         Attachments: 5005.sql, derby-5005.diff, derby-5005.stat, derby-5005_10_5_diff.txt, derby-5005b.diff, derby-5005b.stat
>
>
> I have a strange issue that can be reproduced easily with the following objects in schema "test":
> create table a (a integer);
> insert into a (a) values(1);
> create view v as select * from a;
> This works:
> select test.a.a from test.a where test.a.a <> 2 order by test.a.a asc;
> This doesn't work:
> select test.v.a from test.v where test.v.a <> 2 order by test.v.a asc;
> But this does:
> select test.v.a from test.v where test.v.a <> 2 order by v.a asc;
> This is the error I get:
> Error: 'TEST.V' is not an exposed table name in the scope in which it appears.
> SQLState:  42X10
> ErrorCode: -1
> I've tried quite a few SELECT clauses, and I think the ORDER BY clause is the only one having this issue.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (DERBY-5005) Error when fully qualifying a field from a view in an ORDER BY clause

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13008725#comment-13008725 ] 

Kathey Marsden commented on DERBY-5005:
---------------------------------------

Running Suites.All the 10.5 patch I see this failure. I don't think it is related to the change and don't immediately see an issue filed but will take a closer look
1) SecureServerTest( Opened = false, Authenticated= true, CustomDerbyProperties=
 null, WildCardHost= 0.00.000.0 )junit.framework.AssertionFailedError: SecureSer
verTest( Opened = false, Authenticated= true, CustomDerbyProperties= null, WildC
ardHost= 0.00.000.0 )
Expected: Security manager installed using the Basic server security policy.
But saw:
        at org.apache.derbyTesting.functionTests.tests.derbynet.SecureServerTest
.testServerStartup(SecureServerTest.java:345)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:37)
        at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:
109)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
        at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57
)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.extensions.TestSetup.run(TestSetup.java:23)

FAILURES!!!
Tests run: 11318,  Failures: 1,  Errors: 1

jvm is:
$ java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build pwi3260sr9-20101125_01(SR9))
IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Windows XP x86-32 jvmwi3260sr9-201011
24_69295 (JIT enabled, AOT enabled)
J9VM - 20101124_069295
JIT  - r9_20101028_17488ifx2
GC   - 20101027_AA)
JCL  - 20101119_01


> Error when fully qualifying a field from a view in an ORDER BY clause
> ---------------------------------------------------------------------
>
>                 Key: DERBY-5005
>                 URL: https://issues.apache.org/jira/browse/DERBY-5005
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.0.2.0, 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1, 10.7.1.1
>         Environment: Windows 7
>            Reporter: Lukas Eder
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>              Labels: order, sql, syntax, views
>             Fix For: 10.8.0.0
>
>         Attachments: 5005.sql, derby-5005.diff, derby-5005.stat, derby-5005_10_5_diff.txt, derby-5005b.diff, derby-5005b.stat
>
>
> I have a strange issue that can be reproduced easily with the following objects in schema "test":
> create table a (a integer);
> insert into a (a) values(1);
> create view v as select * from a;
> This works:
> select test.a.a from test.a where test.a.a <> 2 order by test.a.a asc;
> This doesn't work:
> select test.v.a from test.v where test.v.a <> 2 order by test.v.a asc;
> But this does:
> select test.v.a from test.v where test.v.a <> 2 order by v.a asc;
> This is the error I get:
> Error: 'TEST.V' is not an exposed table name in the scope in which it appears.
> SQLState:  42X10
> ErrorCode: -1
> I've tried quite a few SELECT clauses, and I think the ORDER BY clause is the only one having this issue.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (DERBY-5005) Error when fully qualifying a field from a view in an ORDER BY clause

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12992505#comment-12992505 ] 

Rick Hillegas commented on DERBY-5005:
--------------------------------------

Thanks for the patch, Dag. It looks good to me. I have verified that 5005.sql now behaves as expected. +1

> Error when fully qualifying a field from a view in an ORDER BY clause
> ---------------------------------------------------------------------
>
>                 Key: DERBY-5005
>                 URL: https://issues.apache.org/jira/browse/DERBY-5005
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.7.1.1
>         Environment: Windows 7
>            Reporter: Lukas Eder
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>              Labels: order, sql, syntax, views
>         Attachments: 5005.sql, derby-5005.diff, derby-5005.stat
>
>
> I have a strange issue that can be reproduced easily with the following objects in schema "test":
> create table a (a integer);
> insert into a (a) values(1);
> create view v as select * from a;
> This works:
> select test.a.a from test.a where test.a.a <> 2 order by test.a.a asc;
> This doesn't work:
> select test.v.a from test.v where test.v.a <> 2 order by test.v.a asc;
> But this does:
> select test.v.a from test.v where test.v.a <> 2 order by v.a asc;
> This is the error I get:
> Error: 'TEST.V' is not an exposed table name in the scope in which it appears.
> SQLState:  42X10
> ErrorCode: -1
> I've tried quite a few SELECT clauses, and I think the ORDER BY clause is the only one having this issue.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-5005) Error when fully qualifying a field from a view in an ORDER BY clause

Posted by "Lukas Eder (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12994245#comment-12994245 ] 

Lukas Eder commented on DERBY-5005:
-----------------------------------

Should I verify the correctness of the fix before closing it? I'd have to wait for a release (10.8, I guess) before I could close it. What's your preferred process?

> Error when fully qualifying a field from a view in an ORDER BY clause
> ---------------------------------------------------------------------
>
>                 Key: DERBY-5005
>                 URL: https://issues.apache.org/jira/browse/DERBY-5005
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.0.2.0, 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1, 10.7.1.1
>         Environment: Windows 7
>            Reporter: Lukas Eder
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>              Labels: order, sql, syntax, views
>             Fix For: 10.8.0.0
>
>         Attachments: 5005.sql, derby-5005.diff, derby-5005.stat, derby-5005b.diff, derby-5005b.stat
>
>
> I have a strange issue that can be reproduced easily with the following objects in schema "test":
> create table a (a integer);
> insert into a (a) values(1);
> create view v as select * from a;
> This works:
> select test.a.a from test.a where test.a.a <> 2 order by test.a.a asc;
> This doesn't work:
> select test.v.a from test.v where test.v.a <> 2 order by test.v.a asc;
> But this does:
> select test.v.a from test.v where test.v.a <> 2 order by v.a asc;
> This is the error I get:
> Error: 'TEST.V' is not an exposed table name in the scope in which it appears.
> SQLState:  42X10
> ErrorCode: -1
> I've tried quite a few SELECT clauses, and I think the ORDER BY clause is the only one having this issue.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-5005) Error when fully qualifying a field from a view in an ORDER BY clause

Posted by "Lukas Eder (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukas Eder updated DERBY-5005:
------------------------------

    Description: 
I have a strange issue that can be reproduced easily with the following objects in schema "test":

create table a (a integer);
insert into a (a) values(1);
create view v as select * from a;

This works:
select test.a.a from test.a where test.a.a <> 2 order by test.a.a asc;

This doesn't work:
select test.v.a from test.v where test.v.a <> 2 order by test.v.a asc;

But this does:
select test.v.a from test.v where test.v.a <> 2 order by v.a asc;

This is the error I get:
Error: 'TEST.V' is not an exposed table name in the scope in which it appears.
SQLState:  42X10
ErrorCode: -1

I've tried quite a few SELECT clauses, and I think the ORDER BY clause is the only one having this issue.

  was:
I have a strange issue that can be reproduced easily with the following objects in schema "test":

create table a (a integer);
insert into a (a) values(1);
create view v as select * from a;

This works:
select test.a.a from test.a where test.a.a <> 2 order by test.a.a asc;

This doesn't work:
select test.v.a from test.v where test.v.a <> 2 order by test.v.a asc;

But this does:
select test.v.a from test.v where test.v.a <> 2 order by v.a asc;

This is the error I get:
Error: 'TEST.V' is not an exposed table name in the scope in which it appears.
SQLState:  42X10
ErrorCode: -1

I've tried quite a few SELECT caluses, and I think the ORDER BY clause is the only one having this issue.


> Error when fully qualifying a field from a view in an ORDER BY clause
> ---------------------------------------------------------------------
>
>                 Key: DERBY-5005
>                 URL: https://issues.apache.org/jira/browse/DERBY-5005
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.7.1.1
>         Environment: Windows 7
>            Reporter: Lukas Eder
>            Priority: Minor
>              Labels: order, sql, syntax, views
>
> I have a strange issue that can be reproduced easily with the following objects in schema "test":
> create table a (a integer);
> insert into a (a) values(1);
> create view v as select * from a;
> This works:
> select test.a.a from test.a where test.a.a <> 2 order by test.a.a asc;
> This doesn't work:
> select test.v.a from test.v where test.v.a <> 2 order by test.v.a asc;
> But this does:
> select test.v.a from test.v where test.v.a <> 2 order by v.a asc;
> This is the error I get:
> Error: 'TEST.V' is not an exposed table name in the scope in which it appears.
> SQLState:  42X10
> ErrorCode: -1
> I've tried quite a few SELECT clauses, and I think the ORDER BY clause is the only one having this issue.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira