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 "Rick Hillegas (JIRA)" <ji...@apache.org> on 2008/11/11 21:45:44 UTC
[jira] Created: (DERBY-3945) Generation clauses which mention
user-coded functions may produce different resuls depending on who performs
the triggering INSERT/UPDATE
Generation clauses which mention user-coded functions may produce different resuls depending on who performs the triggering INSERT/UPDATE
-----------------------------------------------------------------------------------------------------------------------------------------
Key: DERBY-3945
URL: https://issues.apache.org/jira/browse/DERBY-3945
Project: Derby
Issue Type: Bug
Affects Versions: 10.5.0.0
Reporter: Rick Hillegas
This is similar to DERBY-3944. The compiler uses the current schema in order to resolve unqualifed function names when preparing INSERT/UPDATE statement. This means that a generation clause may evaluate differently depending on who invokes the triggering INSERT/UPDATE statement. This violates the requirement that generation clause should be deterministic (see part 2 of the ANSI/ISO standard, section 4.16.
Hopefully, the same patch will fix both DERBY-3944 and this 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-3945) Generation clauses which mention
user-coded functions may produce different resuls depending on who performs
the triggering INSERT/UPDATE
Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick Hillegas updated DERBY-3945:
---------------------------------
Derby Info: [Patch Available]
> Generation clauses which mention user-coded functions may produce different resuls depending on who performs the triggering INSERT/UPDATE
> -----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-3945
> URL: https://issues.apache.org/jira/browse/DERBY-3945
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.5.0.0
> Reporter: Rick Hillegas
> Assignee: Rick Hillegas
> Attachments: derby-3945-01-aa-functionSchema.diff, zz.sql
>
>
> This is similar to DERBY-3944. The compiler uses the current schema in order to resolve unqualifed function names when preparing INSERT/UPDATE statement. This means that a generation clause may evaluate differently depending on who invokes the triggering INSERT/UPDATE statement. This violates the requirement that generation clause should be deterministic (see part 2 of the ANSI/ISO standard, section 4.16.
> Hopefully, the same patch will fix both DERBY-3944 and this 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-3945) Generation clauses which mention
user-coded functions may produce different resuls depending on who performs
the triggering INSERT/UPDATE
Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick Hillegas updated DERBY-3945:
---------------------------------
Attachment: derby-3945-02-aa-javadoc.diff
Thanks for the review, Dag. Attaching derby-3945-02-aa-javadoc.diff, which address the javadoc issue. Committed at subversion revision 722177.
> Generation clauses which mention user-coded functions may produce different resuls depending on who performs the triggering INSERT/UPDATE
> -----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-3945
> URL: https://issues.apache.org/jira/browse/DERBY-3945
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.5.0.0
> Reporter: Rick Hillegas
> Assignee: Rick Hillegas
> Attachments: derby-3945-01-aa-functionSchema.diff, derby-3945-02-aa-javadoc.diff, zz.sql
>
>
> This is similar to DERBY-3944. The compiler uses the current schema in order to resolve unqualifed function names when preparing INSERT/UPDATE statement. This means that a generation clause may evaluate differently depending on who invokes the triggering INSERT/UPDATE statement. This violates the requirement that generation clause should be deterministic (see part 2 of the ANSI/ISO standard, section 4.16.
> Hopefully, the same patch will fix both DERBY-3944 and this 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-3945) Generation clauses which mention
user-coded functions may produce different resuls depending on who performs
the triggering INSERT/UPDATE
Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12649868#action_12649868 ]
Dag H. Wanvik commented on DERBY-3945:
--------------------------------------
Patch looks good!
Note: The constructor of DefaultInfoImpl now lacks some @params in its javadoc.
> Generation clauses which mention user-coded functions may produce different resuls depending on who performs the triggering INSERT/UPDATE
> -----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-3945
> URL: https://issues.apache.org/jira/browse/DERBY-3945
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.5.0.0
> Reporter: Rick Hillegas
> Assignee: Rick Hillegas
> Attachments: derby-3945-01-aa-functionSchema.diff, zz.sql
>
>
> This is similar to DERBY-3944. The compiler uses the current schema in order to resolve unqualifed function names when preparing INSERT/UPDATE statement. This means that a generation clause may evaluate differently depending on who invokes the triggering INSERT/UPDATE statement. This violates the requirement that generation clause should be deterministic (see part 2 of the ANSI/ISO standard, section 4.16.
> Hopefully, the same patch will fix both DERBY-3944 and this 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-3945) Generation clauses which mention
user-coded functions may produce different resuls depending on who performs
the triggering INSERT/UPDATE
Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick Hillegas updated DERBY-3945:
---------------------------------
Component/s: SQL
> Generation clauses which mention user-coded functions may produce different resuls depending on who performs the triggering INSERT/UPDATE
> -----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-3945
> URL: https://issues.apache.org/jira/browse/DERBY-3945
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.5.0.0
> Reporter: Rick Hillegas
>
> This is similar to DERBY-3944. The compiler uses the current schema in order to resolve unqualifed function names when preparing INSERT/UPDATE statement. This means that a generation clause may evaluate differently depending on who invokes the triggering INSERT/UPDATE statement. This violates the requirement that generation clause should be deterministic (see part 2 of the ANSI/ISO standard, section 4.16.
> Hopefully, the same patch will fix both DERBY-3944 and this 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-3945) Generation clauses which mention
user-coded functions may produce different resuls depending on who performs
the triggering INSERT/UPDATE
Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick Hillegas updated DERBY-3945:
---------------------------------
Attachment: zz.sql
Attaching zz.sql, a script which demonstrates the problem.
> Generation clauses which mention user-coded functions may produce different resuls depending on who performs the triggering INSERT/UPDATE
> -----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-3945
> URL: https://issues.apache.org/jira/browse/DERBY-3945
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.5.0.0
> Reporter: Rick Hillegas
> Attachments: zz.sql
>
>
> This is similar to DERBY-3944. The compiler uses the current schema in order to resolve unqualifed function names when preparing INSERT/UPDATE statement. This means that a generation clause may evaluate differently depending on who invokes the triggering INSERT/UPDATE statement. This violates the requirement that generation clause should be deterministic (see part 2 of the ANSI/ISO standard, section 4.16.
> Hopefully, the same patch will fix both DERBY-3944 and this 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-3945) Generation clauses which mention
user-coded functions may produce different resuls depending on who performs
the triggering INSERT/UPDATE
Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12649207#action_12649207 ]
Rick Hillegas commented on DERBY-3945:
--------------------------------------
Regression tests ran cleanly for me except for two errors which look like they were introduced by someone else's checkin today. Committed at subversion revision revision 719123. The two errors were:
There were 2 errors:
1) testDefaultValues(org.apache.derbyTesting.unitTests.junit.CharacterStreamDescriptorTest)java.lang.NoClassDefFoundError: org/apache/derby/iapi/jdbc/CharacterStreamDescriptor$Builder
at org.apache.derbyTesting.unitTests.junit.CharacterStreamDescriptorTest.testDefaultValues(CharacterStreamDescriptorTest.java:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:105)
2) testSetValues(org.apache.derbyTesting.unitTests.junit.CharacterStreamDescriptorTest)java.lang.NoClassDefFoundError: org/apache/derby/iapi/jdbc/CharacterStreamDescriptor$Builder
at org.apache.derbyTesting.unitTests.junit.CharacterStreamDescriptorTest.testSetValues(CharacterStreamDescriptorTest.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:105)
FAILURES!!!
Tests run: 8900, Failures: 0, Errors: 2
> Generation clauses which mention user-coded functions may produce different resuls depending on who performs the triggering INSERT/UPDATE
> -----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-3945
> URL: https://issues.apache.org/jira/browse/DERBY-3945
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.5.0.0
> Reporter: Rick Hillegas
> Assignee: Rick Hillegas
> Attachments: derby-3945-01-aa-functionSchema.diff, zz.sql
>
>
> This is similar to DERBY-3944. The compiler uses the current schema in order to resolve unqualifed function names when preparing INSERT/UPDATE statement. This means that a generation clause may evaluate differently depending on who invokes the triggering INSERT/UPDATE statement. This violates the requirement that generation clause should be deterministic (see part 2 of the ANSI/ISO standard, section 4.16.
> Hopefully, the same patch will fix both DERBY-3944 and this issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (DERBY-3945) Generation clauses which mention
user-coded functions may produce different resuls depending on who performs
the triggering INSERT/UPDATE
Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick Hillegas closed DERBY-3945.
--------------------------------
> Generation clauses which mention user-coded functions may produce different resuls depending on who performs the triggering INSERT/UPDATE
> -----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-3945
> URL: https://issues.apache.org/jira/browse/DERBY-3945
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.5.1.1
> Reporter: Rick Hillegas
> Assignee: Rick Hillegas
> Fix For: 10.5.1.1
>
> Attachments: derby-3945-01-aa-functionSchema.diff, derby-3945-02-aa-javadoc.diff, zz.sql
>
>
> This is similar to DERBY-3944. The compiler uses the current schema in order to resolve unqualifed function names when preparing INSERT/UPDATE statement. This means that a generation clause may evaluate differently depending on who invokes the triggering INSERT/UPDATE statement. This violates the requirement that generation clause should be deterministic (see part 2 of the ANSI/ISO standard, section 4.16.
> Hopefully, the same patch will fix both DERBY-3944 and this 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-3945) Generation clauses which mention
user-coded functions may produce different resuls depending on who performs
the triggering INSERT/UPDATE
Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Myrna van Lunteren updated DERBY-3945:
--------------------------------------
Fix Version/s: 10.5.0.0
> Generation clauses which mention user-coded functions may produce different resuls depending on who performs the triggering INSERT/UPDATE
> -----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-3945
> URL: https://issues.apache.org/jira/browse/DERBY-3945
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.5.0.0
> Reporter: Rick Hillegas
> Assignee: Rick Hillegas
> Fix For: 10.5.0.0
>
> Attachments: derby-3945-01-aa-functionSchema.diff, derby-3945-02-aa-javadoc.diff, zz.sql
>
>
> This is similar to DERBY-3944. The compiler uses the current schema in order to resolve unqualifed function names when preparing INSERT/UPDATE statement. This means that a generation clause may evaluate differently depending on who invokes the triggering INSERT/UPDATE statement. This violates the requirement that generation clause should be deterministic (see part 2 of the ANSI/ISO standard, section 4.16.
> Hopefully, the same patch will fix both DERBY-3944 and this 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-3945) Generation clauses which mention
user-coded functions may produce different resuls depending on who performs
the triggering INSERT/UPDATE
Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick Hillegas updated DERBY-3945:
---------------------------------
Attachment: derby-3945-01-aa-functionSchema.diff
Attaching derby-3945-01-aa-functionSchema.diff. This patch forces Derby to use the current schema at DDL time (rather than DML time) to resolve unqualified function references in generation clauses. Running tests now.
There are two pieces to this fix:
1) The persisted default descriptor now stores the current schema which was in effect when the generation clause was defined.
2) At INSERT/UPDATE time, that saved schema temporarily becomes the current schema when we bind the generation clause.
A similar approach could be used for the related bugs having to do with unqualified function names in CHECK constraints (DERBY-3944) and VIEWS (DERBY-3953). Note that this approach does not address the related issues with dblook (DERBY-3954).
Touches the following files:
M java/engine/org/apache/derby/catalog/DefaultInfo.java
M java/engine/org/apache/derby/catalog/types/DefaultInfoImpl.java
Adds the DDL-time current schema to the default descriptor.
M java/engine/org/apache/derby/impl/sql/compile/TableElementList.java
Stuffs the current schema into the default descriptor at CREATE/ALTER time.
M java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java
Temporarily sets the current schema to the schema stored in the default when we bind generation clauses.
M java/testing/org/apache/derbyTesting/functionTests/tests/lang/GeneratedColumnsPermsTest.java
Adds tests.
> Generation clauses which mention user-coded functions may produce different resuls depending on who performs the triggering INSERT/UPDATE
> -----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-3945
> URL: https://issues.apache.org/jira/browse/DERBY-3945
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.5.0.0
> Reporter: Rick Hillegas
> Attachments: derby-3945-01-aa-functionSchema.diff, zz.sql
>
>
> This is similar to DERBY-3944. The compiler uses the current schema in order to resolve unqualifed function names when preparing INSERT/UPDATE statement. This means that a generation clause may evaluate differently depending on who invokes the triggering INSERT/UPDATE statement. This violates the requirement that generation clause should be deterministic (see part 2 of the ANSI/ISO standard, section 4.16.
> Hopefully, the same patch will fix both DERBY-3944 and this issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (DERBY-3945) Generation clauses which mention
user-coded functions may produce different resuls depending on who performs
the triggering INSERT/UPDATE
Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick Hillegas reassigned DERBY-3945:
------------------------------------
Assignee: Rick Hillegas
> Generation clauses which mention user-coded functions may produce different resuls depending on who performs the triggering INSERT/UPDATE
> -----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-3945
> URL: https://issues.apache.org/jira/browse/DERBY-3945
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.5.0.0
> Reporter: Rick Hillegas
> Assignee: Rick Hillegas
> Attachments: derby-3945-01-aa-functionSchema.diff, zz.sql
>
>
> This is similar to DERBY-3944. The compiler uses the current schema in order to resolve unqualifed function names when preparing INSERT/UPDATE statement. This means that a generation clause may evaluate differently depending on who invokes the triggering INSERT/UPDATE statement. This violates the requirement that generation clause should be deterministic (see part 2 of the ANSI/ISO standard, section 4.16.
> Hopefully, the same patch will fix both DERBY-3944 and this issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (DERBY-3945) Generation clauses which mention
user-coded functions may produce different resuls depending on who performs
the triggering INSERT/UPDATE
Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick Hillegas resolved DERBY-3945.
----------------------------------
Resolution: Fixed
> Generation clauses which mention user-coded functions may produce different resuls depending on who performs the triggering INSERT/UPDATE
> -----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-3945
> URL: https://issues.apache.org/jira/browse/DERBY-3945
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.5.0.0
> Reporter: Rick Hillegas
> Assignee: Rick Hillegas
> Attachments: derby-3945-01-aa-functionSchema.diff, zz.sql
>
>
> This is similar to DERBY-3944. The compiler uses the current schema in order to resolve unqualifed function names when preparing INSERT/UPDATE statement. This means that a generation clause may evaluate differently depending on who invokes the triggering INSERT/UPDATE statement. This violates the requirement that generation clause should be deterministic (see part 2 of the ANSI/ISO standard, section 4.16.
> Hopefully, the same patch will fix both DERBY-3944 and this issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.