/[Apache-SVN]
ViewVC logotype

Revision 1526831


Jump to revision: Previous Next
Author: kahatlen
Date: Fri Sep 27 08:41:47 2013 UTC (10 years, 6 months ago)
Changed paths: 24
Log Message:
DERBY-534: Support use of the WHEN clause in CREATE TRIGGER statements

Allow references to transition variables and transition tables in the
WHEN clause. To support this, a new column WHENCLAUSETEXT is added to
the SYS.SYSTRIGGERS table, and a corresponding field is added to the
TriggerDescriptor class.

The logic that transforms triggered SQL statements to internal syntax
for accessing the transition variables and transition tables (via Java
method calls and VTIs) is reused on the WHEN clause text so that the
same transformation happens there.

Upgrade logic is added so that the new column in SYS.SYSTRIGGERS will
be created when a database is upgraded from an older version. The WHEN
clause is now disabled in the parser when running in soft upgrade
mode. An upgrade test case checks that the WHEN clause can only be
used in a hard-upgraded database, and that a reasonable error is
raised otherwise.

Changed paths

Path Details
Directorydb/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/RegisteredFormatIds.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/StoredFormatIds.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/Parser.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/CatalogRowFactory.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DataDescriptorGenerator.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TriggerDescriptor.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TriggerDescriptor_v10_10.java added
Directorydb/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSTRIGGERSRowFactory.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ParserImpl.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/CreateTriggerConstantAction.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericConstantActionFactory.java modified , text changed
Directorydb/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/dblook_test_net.out modified , text changed
Directorydb/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/dblook_test_net_territory.out modified , text changed
Directorydb/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dblook_test.out modified , text changed
Directorydb/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dblook_test_territory.out modified , text changed
Directorydb/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/SystemCatalogTest.java modified , text changed
Directorydb/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TriggerWhenClauseTest.java modified , text changed
Directorydb/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_11.java added
Directorydb/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeRun.java modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26