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 "Daniel John Debrunner (JIRA)" <ji...@apache.org> on 2007/03/30 02:50:25 UTC
[jira] Created: (DERBY-2504) SQL warning "01501: The view
V21VIEWTEST has been dropped" can be lost (ie. not seen when it should be)
SQL warning "01501: The view V21VIEWTEST has been dropped" can be lost (ie. not seen when it should be)
--------------------------------------------------------------------------------------------------------
Key: DERBY-2504
URL: https://issues.apache.org/jira/browse/DERBY-2504
Project: Derby
Issue Type: Bug
Components: SQL
Affects Versions: 10.2.2.0, 10.2.1.6, 10.3.0.0
Reporter: Daniel John Debrunner
Priority: Minor
Example, grantRevokeDDL test has this SQL and correct output:
revoke select on t11ViewTest from public;
0 rows inserted/updated/deleted
WARNING 01501: The view V21VIEWTEST has been dropped.
But if instead the statement is prepared and another statement prepared before the execution then the warning will not appear
prepare R1 as 'revoke select on t11ViewTest from public';
ij(MAMTA1)> prepare V1 as 'values 1';
ij(MAMTA1)> execute R1;
0 rows inserted/updated/deleted
ij(MAMTA1)> execute V1;
1
-----------
1
1 row selected
If I don't prepare V1 then the exception is seen, so it's not the prepare causing the issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-2504) SQL warning "01501: The view
V21VIEWTEST has been dropped" can be lost (ie. not seen when it should be)
Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick Hillegas updated DERBY-2504:
---------------------------------
Urgency: Normal
Triaged for 10.5.2: assigned normal urgency.
> SQL warning "01501: The view V21VIEWTEST has been dropped" can be lost (ie. not seen when it should be)
> --------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2504
> URL: https://issues.apache.org/jira/browse/DERBY-2504
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4
> Reporter: Daniel John Debrunner
> Priority: Minor
>
> Example, grantRevokeDDL test has this SQL and correct output:
> revoke select on t11ViewTest from public;
> 0 rows inserted/updated/deleted
> WARNING 01501: The view V21VIEWTEST has been dropped.
> But if instead the statement is prepared and another statement prepared before the execution then the warning will not appear
> prepare R1 as 'revoke select on t11ViewTest from public';
> ij(MAMTA1)> prepare V1 as 'values 1';
> ij(MAMTA1)> execute R1;
> 0 rows inserted/updated/deleted
> ij(MAMTA1)> execute V1;
> 1
> -----------
> 1
> 1 row selected
> If I don't prepare V1 then the exception is seen, so it's not the prepare causing the issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-2504) SQL warning "01501: The view
V21VIEWTEST has been dropped" can be lost (ie. not seen when it should be)
Posted by "Lily Wei (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lily Wei updated DERBY-2504:
----------------------------
Attachment: repro.zipx
Derby-2504.diff
I am adding getLastActivation on ViewDescriptor.makeInvalide for the case of DependencyManager.INTERNAL_RECOMPILE_REQUEST because it helps to cases like repro2.sql. If the privilege was granted and being revoked, revoke it again will fall to case of INTERNAL_RECOMPILE_REQUEST. In that case, the dependency object is still being removed. I think users should get warning for that. However, Dan's point is still true, getLastActivation() has no guarantee of the current executing statement at runtime as repro3.sql demonstrate. I am posting this try fix because I don't understand what is doing on in repro3.sql. When break at 'execute R1', I got the case of DependencyManager.INTERNAL_RECOMPILE_REQUEST, I step in to
lcc.getLastActivation().addWarning(
StandardException.newWarning(
SQLState.LANG_VIEW_DROPPED,
this.getObjectName() ));
However, the debugger just jump in the the default case and stop at SanityManager.THROWASSERT("did not expect to get called");
I believe in repro3.sql case, it should raise a warning. If there is no ActivationObject, I can code it as try and catch. Also, if default case is really being executed, why did not print to derby.log. What am I missing?
> SQL warning "01501: The view V21VIEWTEST has been dropped" can be lost (ie. not seen when it should be)
> --------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2504
> URL: https://issues.apache.org/jira/browse/DERBY-2504
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4
> Reporter: Daniel John Debrunner
> Priority: Minor
> Attachments: Derby-2504.diff, repro.zipx
>
>
> Example, grantRevokeDDL test has this SQL and correct output:
> revoke select on t11ViewTest from public;
> 0 rows inserted/updated/deleted
> WARNING 01501: The view V21VIEWTEST has been dropped.
> But if instead the statement is prepared and another statement prepared before the execution then the warning will not appear
> prepare R1 as 'revoke select on t11ViewTest from public';
> ij(MAMTA1)> prepare V1 as 'values 1';
> ij(MAMTA1)> execute R1;
> 0 rows inserted/updated/deleted
> ij(MAMTA1)> execute V1;
> 1
> -----------
> 1
> 1 row selected
> If I don't prepare V1 then the exception is seen, so it's not the prepare causing the issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-2504) SQL warning "01501: The view
V21VIEWTEST has been dropped" can be lost (ie. not seen when it should be)
Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12485392 ]
Daniel John Debrunner commented on DERBY-2504:
----------------------------------------------
This is because the ViewDescriptor.makeInvalid() is using the getLastActivation() method on LanguageConnectionContext.
At runtime there is no guarantee that the currently executing statement is the last activation.
I just noticed this because the getLastActivation() method caught my eye, I couldn't see any valid reason for such a method, it should be removed as part of this bug fix.
> SQL warning "01501: The view V21VIEWTEST has been dropped" can be lost (ie. not seen when it should be)
> --------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2504
> URL: https://issues.apache.org/jira/browse/DERBY-2504
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.0.0
> Reporter: Daniel John Debrunner
> Priority: Minor
>
> Example, grantRevokeDDL test has this SQL and correct output:
> revoke select on t11ViewTest from public;
> 0 rows inserted/updated/deleted
> WARNING 01501: The view V21VIEWTEST has been dropped.
> But if instead the statement is prepared and another statement prepared before the execution then the warning will not appear
> prepare R1 as 'revoke select on t11ViewTest from public';
> ij(MAMTA1)> prepare V1 as 'values 1';
> ij(MAMTA1)> execute R1;
> 0 rows inserted/updated/deleted
> ij(MAMTA1)> execute V1;
> 1
> -----------
> 1
> 1 row selected
> If I don't prepare V1 then the exception is seen, so it's not the prepare causing the issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.