Queryplan for a query using SESSION schema view is incorrectly put in statement
cache. This could cause incorrect plan getting executed later if a temp. table
is created with that name.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: DERBY-424
URL: http://issues.apache.org/jira/browse/DERBY-424
Project: Derby
Type: Bug
Components: SQL
Versions: 10.1.1.0
Environment: generic
Reporter: Satheesh Bandaram
Priority: Minor
See DERBY-405 for some discussion related this issue. I suspect this is because
of statement caching. Derby doesn't seem to recognise we have a temporary table
that just overloaded an existing physical table.
It would have been good to avoid permanent tables/views/synonyms in SESSION
schema. Not sure what we should do now about this, though.
ij> create view session.st1 as select * from t;
0 rows inserted/updated/deleted
ij> select * from session.st1;
I |J |K
-----------------------------------
1 |1 |NULL
2 |2 |NULL
3 |3 |NULL
4 |4 |NULL
4 rows selected
ij> select * from t;
I |J |K
-----------------------------------
1 |1 |NULL
2 |2 |NULL
3 |3 |NULL
4 |4 |NULL
4 rows selected
ij> declare global temporary table st1(c11 int, c12 int) on commit preserve
rows
not logged;
0 rows inserted/updated/deleted
ij> select * from session.st1;
I |J |K
-----------------------------------
1 |1 |NULL
2 |2 |NULL
3 |3 |NULL
4 |4 |NULL
4 rows selected
ij> select * from session.st1; <==== This statement has an extra space between
FROM and session.st1
C11 |C12
-----------------------
0 rows selected
--
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