------------------------------------------------------------------------
r491786 | kahatlen | 2007-01-02 04:47:47 -0800 (Tue, 02 Jan 2007) | 9 lines

DERBY-2200: Add performance tests to Derby using the junit perf framework

This patch (derby2200.p1.diff.txt) adds
-- few simple performance tests using the junit perf framework.
-- small addition to the reporting in JDBCPerfTestCase to indicate the
   framework the test is running in.

Patch contributed by Sunitha Kambhampati.

------------------------------------------------------------------------
r491769 | kahatlen | 2007-01-02 02:16:53 -0800 (Tue, 02 Jan 2007) | 2 lines

DERBY-2149: Replace Vectors and Hashtables with ArrayLists and HashMaps in RAMTransaction

------------------------------------------------------------------------
r491768 | kahatlen | 2007-01-02 02:13:27 -0800 (Tue, 02 Jan 2007) | 4 lines

DERBY-2100: Convert derbynet/prepStmt.java to JUnit

Patch contributed by ?\195?\152ystein Gr?\195?\184vlen.

------------------------------------------------------------------------
r491632 | bpendleton | 2007-01-01 13:10:20 -0800 (Mon, 01 Jan 2007) | 12 lines

DERBY-2202: DROP PROCEDURE depends on SET SCHEMA

This patch was contributed by Yip Ng (yipng168@gmail.com)

The symptom of this jira is the same as those described in DERBY-1304
for DROP VIEW except that it applies to DROP PROCEDURE, DROP FUNCTION
and DROP SYNONYM statements. (Their bind logic are centralized in
DropAliasNode.) The DropAliasNode's bindStatement() should have created
a dependency on the statement, so when its associated alias descriptor
gets dropped, the statement can be invalidated accordingly. This explains
why subsequent DROP PROCEDURE statement fails.

------------------------------------------------------------------------
r489603 | kahatlen | 2006-12-22 02:25:22 -0800 (Fri, 22 Dec 2006) | 2 lines

DERBY-2199: Use initCause() in BaseJDBCTestCase.assertSQLState().

------------------------------------------------------------------------
r489597 | kahatlen | 2006-12-22 02:10:10 -0800 (Fri, 22 Dec 2006) | 5 lines

DERBY-2152: Support diagnostic vti tables that take parameters, such
as SpaceTable

Fix test failures in jdk6. Patch contributed by A B (qozinx@gmail.com).

------------------------------------------------------------------------
r489053 | kahatlen | 2006-12-20 03:28:07 -0800 (Wed, 20 Dec 2006) | 3 lines

DERBY-2191: Cleanup of FormatableBitSet
Removal of dead code. Patch contributed by Dyre Tjeldvoll.

------------------------------------------------------------------------
r488834 | abrown | 2006-12-19 14:29:22 -0800 (Tue, 19 Dec 2006) | 3 lines

Remove unnecessary imports from NewInvocationNode.java that were added as
part of svn #488827. 

------------------------------------------------------------------------
r488827 | abrown | 2006-12-19 14:10:56 -0800 (Tue, 19 Dec 2006) | 21 lines

DERBY-2152: Support diagnostic "table functions" for querying Derby diagnostic
VTIs that take parameters.  The table functions are exposed via the TABLE
constructor syntax:

  SELECT <rcList> from
    TABLE ( <sysdiag-schema>.<vti-table-name> (<arg-list>) )
    [ AS ] corrlationName

 Note that:

  a. We only support VTI table function names that are in the SYSCS_DIAG schema
  b. The correlation name *is* required, though use of the "AS" keyword
     is optional (section 7.6 of the SQL 2003 spec, "<table primary>").
  c. The argument list can be empty if the underlying VTI supports it.

The VTI table names that have been added are as follows:

  SYSCS_DIAG.SPACE_TABLE maps to org.apache.derby.diag.SpaceTable
  SYSCS_DIAG.ERROR_LOG_READER maps to org.apache.derby.diag.ErrorLogReader
  SYSCS_DIAG.STATEMENT_DURATION maps to org.apache.derby.diag.StatementDuration

------------------------------------------------------------------------
r488803 | rhillegas | 2006-12-19 12:45:20 -0800 (Tue, 19 Dec 2006) | 1 line

DERBY-2129: Record release of 10.2.2.0 in the STATUS file.
------------------------------------------------------------------------
r488672 | bernt | 2006-12-19 05:35:14 -0800 (Tue, 19 Dec 2006) | 1 line

DERBY-2147 Enable code that allows pattern and escape in LIKE predicate to be column references
------------------------------------------------------------------------
r487788 | tmnk | 2006-12-16 03:16:04 -0800 (Sat, 16 Dec 2006) | 1 line

- DERBY-1471 Implement layer B streaming for new methods defined in JDBC4.0 - Patch by Tomohito Nakayama (tomonaka@basil.ocn.ne.jp)
------------------------------------------------------------------------
r487742 | djd | 2006-12-15 16:54:35 -0800 (Fri, 15 Dec 2006) | 2 lines

DERBY-2164 Add some comments to EngineType class and clean up its use.

------------------------------------------------------------------------
r487656 | bpendleton | 2006-12-15 12:44:53 -0800 (Fri, 15 Dec 2006) | 1 line

Correct typo in checkForAutoIncrement javadoc
------------------------------------------------------------------------
r487655 | djd | 2006-12-15 12:37:52 -0800 (Fri, 15 Dec 2006) | 3 lines

DERBY-2179 Temp fix to the test to avoid installing a thread context class loader and
losing the previously installed one. Can be omitted beacuse the actual portion of
the test fixture that uses the class loader is blocked by DERBY-2162.
------------------------------------------------------------------------
r487414 | bpendleton | 2006-12-14 17:01:14 -0800 (Thu, 14 Dec 2006) | 55 lines

DERBY-1644: NPE when inserting values to tbl w/ identity col gen by default

When the VALUES clause encounters multiple rows, it generates a UNION
node tree to combine the rows to be inserted. InsertNode notices the
top-level UNION node and calls the special checkAutoincrementUnion()
method which knows how to recursively traverse the Union tree and
call checkAutoIncrement() on the underlying RowResultSetNode instances
at the leaf level of the tree.

HOWEVER, when the number of columns in the rows in the VALUES clause
is a subset of the number of columns in the table we're inserting into,
the top node of the tree is not a UnionNode, but is rather a
ProjectRestrictNode. This means that we skip past the UnionNode test and
just call checkAutoincrement(), which processes the PRN but doesn't
go down to the RowResultSetNode(s) at the leaf level.

This leaves the ResultColumn instance at the leaf level with a NULL column
descriptor, which causes the NPE during the code generation phase.

And, there is a second, related problem. The enhanceRCLForInsert() call
is also only made at the top level of the tree. However, this call is a
necessary pre-condition for calling checkAutoincrement() because
enhanceRCLForInsert() ensures that the proper ResultColumnList values are
in place prior to the checkAutoincrement() reconciliation of the column lists.

The patch solves these problems by merging the code from InsertNode.bind
together with the current recursive processing in
ResultColumnList.checkAutoincrementUnion() to produce a new recursive
routine, which I have called enhanceAndCheckForAutoincrement(), which will
recursively traverse the ResultSet tree, calling *both* enhanceRCLForInsert()
and checkAutoincrement() on the various nodes in the tree.

Thus the primary ideas involved in this patch are:
 - When an INSERT statement will insert multiple rows from the VALUES
   clause, the compiler will compile the various values into a tree of
   UnionNodes with RowResultSetNodes at the leaves of the three
 - The columns specified in the INSERT statement may be a subset
   of the rows in the table. The "extra" columns need to be constructed by
   the INSERT statement, either by generating NULL values for those
   columns which are nullable, or by compiling a default values for those
   columns which have DEFAULT values, or by generating a value for an IDENTITY
   column which is GENERATED. The work of constructing these extra
   column values is done by genNewRCForInsert.
 - For columns which are GENERATED ALWAYS, we must make sure that
   the INSERT statement doesn't allow the user to insert their own value for
   the generated column.
 - The columns which are specified in the INSERT column spec may not match
   the order in which the columns arise in the table. Therefore, the column
   values may need to be re-ordered by the INSERT statement so that they
   occur in the proper order.
 - In the case when the ResultSet which provides the values for the INSERT
   statement is not just a single node, but is rather a tree of UnionNodes, the
   above processing needs to happen throughout the tree, not just at
   the root node. 

------------------------------------------------------------------------
r487314 | mamta | 2006-12-14 11:25:44 -0800 (Thu, 14 Dec 2006) | 10 lines

EmbedCallableStatement.executeStatement stuffs the output parameter value into
ParameterValueSet object. But ParameterValueSet object which is fetched at the
beginning of the method might not be the valid object if a new activation object
got created for the Statement because it was invalid. I am making changes such
that a fetch of ParameterValueSet object into a local variable is done after
the possiblity of new Activation object has been accounted for. I have also put
javadoc comments for the users of ParameterValueSet object which is returned
by EmbedPreparedStatement.getParms method.


------------------------------------------------------------------------
r487307 | djd | 2006-12-14 11:10:45 -0800 (Thu, 14 Dec 2006) | 3 lines

DERBY-2138 Remove the DataDictionaryContext and instead use the fact there is a single DataDictionary per database.
Cleanup DependableFinder to take a passed in reference to a data dictionary rather than trying to find the data
dictionary from the context.
------------------------------------------------------------------------
r486321 | myrnavl | 2006-12-12 13:22:50 -0800 (Tue, 12 Dec 2006) | 2 lines

DERBY-2143 - 1 more master/canon update

------------------------------------------------------------------------
r486240 | djd | 2006-12-12 09:09:19 -0800 (Tue, 12 Dec 2006) | 2 lines

DERBY-2138 (partial) Cleanup DependableFinder and associated classes by removing an unused method
and adding comments to related classes.
------------------------------------------------------------------------
r486201 | djd | 2006-12-12 07:59:52 -0800 (Tue, 12 Dec 2006) | 5 lines

DERBY-2040 (partial) Change the api for jarReader to return the StorageFile rather
than the (potentially) opened jar. Removes the possibility for user code to
access the jar by calling methods of JarReader directly (and hence abusing any
privileged blocks that would be required while opening the jar). Cleans up JarLoader
by having explict calls to open the stream or file within the class loader.
------------------------------------------------------------------------
r484841 | djd | 2006-12-08 15:23:46 -0800 (Fri, 08 Dec 2006) | 4 lines

DERBY-2138 (partial) Move the booting of the DataDictionary to BasicDatabase from LanguageConnectionFactory
wihc makes more sense once there is a single dictionary per database. Change some calls to obtain a reference
to the DataDictionary from Database instead of looking for the pushed DataDictionaryContext.
DataDictionaryContext context is still pushed, this is an incremental step to removing it.
------------------------------------------------------------------------
r484797 | suresht | 2006-12-08 13:42:14 -0800 (Fri, 08 Dec 2006) | 24 lines

DERBY-606 : SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE fails on (very) large tables

Patch Contributed by Mayuresh Nirhali.

Problem was when Allocated Extent associated with last allocated page is being
compressed, All the pages are found to be free, thus new_highest_page is set to
'-1'. Now, when the CompressSpaceOperation is being logged
CompressedNumber.writeInt method is called with value -1. This method is
written to throw exception if the value is less than Zero, hence the 
IOException occurs. 

This patch addresses the problem  by modifying compress 
log record to write the new Highest Page as an uncompressed number, 
if the database is created/hard-upgrade to 10.3. A new Compress Log 
Record Class is created that will read/write new_highest_page in compressed 
format as before 10.3. Old version of compress log Operation is used on 
recovery, if  the log record needs to be replayed on upgrade 
from old-version of the database and also on soft-upgrade to 10.3. 

Test cases for this bug are  added to the existing OnlineCompressTest.java
test and to the upgrade test .



------------------------------------------------------------------------
r484722 | djd | 2006-12-08 12:02:24 -0800 (Fri, 08 Dec 2006) | 4 lines

DERBY-538 DERBY-2040 Remove the FileResource.getAsStream method as the getAsFile()
method now returns a StorageFile and that class has a getInputStream method.
Incremental step in pushing the JarClassLoader to work off URLs for the jar files
and thus allow use of the standard java.net.URLClassLoader.
------------------------------------------------------------------------
r484672 | djd | 2006-12-08 09:51:55 -0800 (Fri, 08 Dec 2006) | 2 lines

DERBY-2083 Fix broken backup/restore tests. Caused by not updating path through code
when a service is directly accessed as a file rather than through the StorageFactory api.
------------------------------------------------------------------------
r484671 | myrnavl | 2006-12-08 09:48:02 -0800 (Fri, 08 Dec 2006) | 10 lines

DERBY-2143 - patch DERBY_2143_2110_trunk.diff2; 
  - adjusting the translated messages for changes of DERBY_2110
  - adjusting the translated messages for some removed messages that are
    still present in 10.2 (XJ089, XJ092, 01J03, 01J09, 01J11)
  - modifying message XJ125 to only mention TYPE_SCROLL_INSENSITIVE in all
    languages except ja_JP, zh_CN, zh_TW (don't know those characters enough
    to tell what to remove)
  - reformat DBLOOK_usage message to not wrap in 80 characters


------------------------------------------------------------------------
r484615 | bernt | 2006-12-08 06:14:39 -0800 (Fri, 08 Dec 2006) | 1 line

DERBY-1856 Added Session.SECACC and Session.CHKSEC to the switch in DRDAConnThread.run()
------------------------------------------------------------------------
r483822 | djd | 2006-12-07 20:28:06 -0800 (Thu, 07 Dec 2006) | 4 lines

DERBY-2164 (partial) Remove AccessFactory (store) from LanguageConnectionFactory and
instead code can find the AccessFactory from the Transaction object.
The AccessFactory getAccessManager() method already existed but was not exposed
at the highest level.
------------------------------------------------------------------------
r483820 | myrnavl | 2006-12-07 20:22:32 -0800 (Thu, 07 Dec 2006) | 3 lines

DERBY-2143 - adding quote that broke the build


------------------------------------------------------------------------
r483767 | djd | 2006-12-07 17:26:19 -0800 (Thu, 07 Dec 2006) | 2 lines

DERBY-2138 (partial) Couple of additional import cleanups for classes that imported
DataDictionaryContext without using it.
------------------------------------------------------------------------
r483766 | djd | 2006-12-07 17:23:18 -0800 (Thu, 07 Dec 2006) | 1 line

DERBY-2138 (partial) Cleanup imports in functionTests.util that imported DatadictionaryContext but did not use it.
------------------------------------------------------------------------
r483765 | djd | 2006-12-07 17:10:25 -0800 (Thu, 07 Dec 2006) | 2 lines

DERBY-2138 (partial) More import cleanups in iapi/db

------------------------------------------------------------------------
r483762 | djd | 2006-12-07 17:02:01 -0800 (Thu, 07 Dec 2006) | 2 lines

DERBY-2138 (partial) Organize imports in impl/sql/catalog for classes that import DataDictionaryContext but do not use it.

------------------------------------------------------------------------
r483761 | djd | 2006-12-07 16:56:25 -0800 (Thu, 07 Dec 2006) | 2 lines

DERBY-2138 (partial) Cleanup imports on impl/sql/execute classes that imported
DataDictionaryContext without using it.
------------------------------------------------------------------------
r483738 | djd | 2006-12-07 15:45:38 -0800 (Thu, 07 Dec 2006) | 3 lines

DERBY-537 Fix sqlj.replace_jar and sqlj.remove_jar to work under a security manager.
Add a test to test the simple mechanics of the the sqlj functions separated from
the jar files being active on the database class path.
------------------------------------------------------------------------
r483696 | myrnavl | 2006-12-07 14:11:50 -0800 (Thu, 07 Dec 2006) | 2 lines

DERBY-2143 - committing patch DERBY2143_misc for servlet and test docs.

------------------------------------------------------------------------
r483653 | djd | 2006-12-07 12:41:11 -0800 (Thu, 07 Dec 2006) | 7 lines

DERBY-552 Fix fetching resources from an installed jar when the database itself is a jar file.
The old code did not handle the case when the length of the resource (jar) entry was unknown.
New code reads the resource from the JarInputStream into a local byte array and returns a
stream based upon that to the application. This also provides better isolation between
the application and derby, denying user code the ability to read the entire jar or
to prevent correct shutdown of the database. Added utilities to AccessibleByteArrayOutputStream
to enable copying an InputStream into a local array.
------------------------------------------------------------------------
r483642 | fuzzylogic | 2006-12-07 12:12:48 -0800 (Thu, 07 Dec 2006) | 3 lines

Remove NLS comments to prevent possible confusion, fix typo in checklocaleinfo
target

------------------------------------------------------------------------
r483628 | rhillegas | 2006-12-07 11:41:23 -0800 (Thu, 07 Dec 2006) | 1 line

DERBY-2132: Mention JDBC4.0 in the javadoc for EmbeddedDriver. Also briefly describe driver autoloading under Java SE 6.
------------------------------------------------------------------------
r483610 | fuzzylogic | 2006-12-07 11:10:27 -0800 (Thu, 07 Dec 2006) | 3 lines

DERBY-2163: Remove service extension entry from locale jars and derbyrun.jar.
Also remove stale references to COPYRIGHT.

------------------------------------------------------------------------
r483606 | djd | 2006-12-07 10:59:27 -0800 (Thu, 07 Dec 2006) | 3 lines

DERBY-2083 Ensure the store closes the StorageFactory it is using at database shutdown time.
Add shutdown code for the JarStorageFactory to close the jar file it has opened.
Ensure the monitor does not use a stream opened from a StorageFactory after it has called shutdown().
------------------------------------------------------------------------
r483596 | fuzzylogic | 2006-12-07 10:31:18 -0800 (Thu, 07 Dec 2006) | 2 lines

DERBY-2143: Split engine messages for new locales.

------------------------------------------------------------------------
r483532 | abrown | 2006-12-07 08:37:58 -0800 (Thu, 07 Dec 2006) | 11 lines

DERBY-2153:

  1. Create a new JUnit utility file, junit/JAXPFinder.java, that is only
     instantiated when all required XML classes are in the classpath.

  2. Move the import of DocumentBuilderFactory out of junit/XML.java and into
     junit/JAXPFinder.java. This extra level of indirection combined with the
     conditional instantiation of JAXPFinder ensures that we do not attempt to
     instantiate a DocumentBuilderFactory unless we have the necessary JAXP
     classes.

------------------------------------------------------------------------
r483356 | fuzzylogic | 2006-12-06 22:27:34 -0800 (Wed, 06 Dec 2006) | 3 lines

DERBY-2143: Merge revision 483352 to trunk, adds updated localized messages
developed during 10.2 release cycle to trunk.

------------------------------------------------------------------------
r483354 | fuzzylogic | 2006-12-06 22:22:00 -0800 (Wed, 06 Dec 2006) | 2 lines

Add new, empty files for the new localized message files for merge to trunk.

------------------------------------------------------------------------
r483307 | djd | 2006-12-06 16:22:47 -0800 (Wed, 06 Dec 2006) | 1 line

Fix up javadoc warnings in ExecSPSNode.
------------------------------------------------------------------------
r483296 | djd | 2006-12-06 16:04:54 -0800 (Wed, 06 Dec 2006) | 1 line

Fix javadoc errors caused by @see tags that referred to http URLs directly instead of through <a href ... /a>
------------------------------------------------------------------------
r483160 | djd | 2006-12-06 09:39:22 -0800 (Wed, 06 Dec 2006) | 3 lines

DERBY-538 (partial) Move the functionality of InstalledJar into JarLoader since there
was a 1-1 correspondence between the classes following the recent cleanup.

------------------------------------------------------------------------
r483157 | davidvc | 2006-12-06 09:34:43 -0800 (Wed, 06 Dec 2006) | 4 lines

Fixed this so that you can change the user and the calendar, making
this more easily "demoable" without having to change code.  Also
fixed svn:ignore properties for stuff we don't want to check in.

------------------------------------------------------------------------
r483148 | djd | 2006-12-06 08:51:13 -0800 (Wed, 06 Dec 2006) | 3 lines

DERBY-538 (partial) Cleanup the setInvalid methods of JarLoader to remove the option of re-creating the
InstalledJar since it was never used.

------------------------------------------------------------------------
r483108 | djd | 2006-12-06 07:15:29 -0800 (Wed, 06 Dec 2006) | 3 lines

DERBY-538 (partial) Cleanup the jar loading code to consistently use the java.util.jar classes
instead of the java.util.zip classes.

------------------------------------------------------------------------
r482983 | bernt | 2006-12-06 01:26:27 -0800 (Wed, 06 Dec 2006) | 1 line

DERBY-1231 LIKE does not match empty strings when used with a prepared statement.
------------------------------------------------------------------------
r482972 | kahatlen | 2006-12-06 00:51:32 -0800 (Wed, 06 Dec 2006) | 4 lines

DERBY-2155: checkDataSource and checkDataSource30 fail in the tinderbox test

Update master files for DerbyNetClient and fix typo in test output.

------------------------------------------------------------------------
r482894 | fuzzylogic | 2006-12-05 21:03:54 -0800 (Tue, 05 Dec 2006) | 2 lines

Fix build error when compiling just with JDK 1.4

------------------------------------------------------------------------
r482850 | djd | 2006-12-05 16:45:46 -0800 (Tue, 05 Dec 2006) | 4 lines

DERBY-538 (partial) Move the jar based code from JarFileJava2 to InstalledJar and remove JarFileJava2.
Since J2ME/CDC/Foundation and J2SE both support java.util.jar there is no need to have a zip based
implementation (which was for the JDK 1.1 no longer supported). More cleanup will be done to completely
switch over to java.util.jar.
------------------------------------------------------------------------
r482835 | djd | 2006-12-05 16:09:45 -0800 (Tue, 05 Dec 2006) | 3 lines

DERBY-538 (partial) Rename jarFile to InstalledJar so that once JarFileJava2 is merged into it the
java.util.jar.JarFile can be used directly without causing confusion.

------------------------------------------------------------------------
r482812 | djd | 2006-12-05 14:39:35 -0800 (Tue, 05 Dec 2006) | 3 lines

DERBY-538 (partial) Initial step in cleaning up JarFile/JarFileJava2 as a step to having a single class since
all environments Derby runs in supports the java.util.Jar package.

------------------------------------------------------------------------
r482806 | mamta | 2006-12-05 14:19:14 -0800 (Tue, 05 Dec 2006) | 4 lines

Add some sanity code to make sure that the connection is indeed idle when the code expects it to. 
Also, enhanced XA related test to make sure that writable XA transaction following a read-only XA 
transaction works correctly.

------------------------------------------------------------------------
r482717 | djd | 2006-12-05 09:30:34 -0800 (Tue, 05 Dec 2006) | 5 lines

Have EmbedResultSet obtain its EmbedStatement's result set concurrency directly rather than
going through the JDBC method api which in turns requires the check on if the Statement is open.
In this case it's known the Statement is open since it is creating the ResultSet.
Mentioned as one of the optimizatons in DERBY-1876.

------------------------------------------------------------------------
r482529 | fuzzylogic | 2006-12-04 23:02:16 -0800 (Mon, 04 Dec 2006) | 5 lines

DERBY-1529: Add LICENSE and NOTICE files to the Eclipse plugins, update build
instructions

Committed for Rajesh Kartha <kartha02@gmail.com>

------------------------------------------------------------------------
r482435 | djd | 2006-12-04 17:07:43 -0800 (Mon, 04 Dec 2006) | 1 line

DERBY-1808 Changes to the metadata test also require the master file for the upgrade test to be fixed.
------------------------------------------------------------------------
r482433 | abrown | 2006-12-04 16:47:02 -0800 (Mon, 04 Dec 2006) | 32 lines

DERBY-1758 (partial): Enable the lang/XMLBindingTest to run under a security
manager. Changes include all of the following:

 - Updates lang/XMLBindingTest.java so that it will run under the default
testing security manager (i.e. removed the "noSecurityManager()" wrapper).

 - Adds a new property, derbyTesting.jaxpjar, to the default testing policy
file. This property holds the location of the JAXP jar picked up from the
classpath _if_ that jar is external to the JVM. If the jar is either embedded
within, or "endorsed" by, the JVM then this property is unused.

    The JAXP jar is then given permission to read the "extin" testing
directory, which is the directory into which the DTD required by XMLBindingTest
is copied (and thus JAXP has permission to read the DTD file).

 - Adds a new static utility method, "getJAXPParserLocation()", to the
junit/XML.java file. This method instantiates a JAXP object and then uses
the implementation-specific class name to try to find out where the JAXP
jar is located.

- Modifies derbyTesing/junit/build.xml so that junit/XML.java will only
build with 1.4 JVMs and higher. This is required because junit/XML.java
now references a JAXP class that is not defined in 1.3.

 - Updates the "getURL()" method of junit/SecurityManagerSetup.java to account
for situations where a class "code source" is null. Also updates the
"determineClasspath()" method of that class to set the derbyTesting.jaxpjar
property as appropriate.

 - And finally, moves the build order of the derbyTesting/junit directory
so that it is built *before* the derbyTesting/harness directory.

------------------------------------------------------------------------
r482426 | djd | 2006-12-04 16:18:17 -0800 (Mon, 04 Dec 2006) | 2 lines

DERBY-1808 Add inbuilt functions SIGN, SQRT, RAND, RANDOM, COSH, COT, SINH and TANH
Patch contributed by  Richard Wheeldon Email: richard@rswheeldon.com
------------------------------------------------------------------------
r482389 | myrnavl | 2006-12-04 14:20:06 -0800 (Mon, 04 Dec 2006) | 2 lines

DERBY-2037 - tool to flag possible errors in localized message files.

------------------------------------------------------------------------
r482358 | bpendleton | 2006-12-04 13:07:25 -0800 (Mon, 04 Dec 2006) | 33 lines

DERBY-1204: TRIGGER with multi-row INSERT action throws OutOfBounds exception

This patch was contributed by Yip Ng (yipng168@gmail.com)

The statement fails because the bindReferencesClause() method in
CreateTriggerNode did not filter those column references that are not
relevent to the conversion processing for OLD/NEW transition variables.
The above trigger action will have the following parse tree: (roughly)

              InsertNode
                 |
              UnionNode
               /     \
        UnionNode    RowRSNode
         /    \            |
RowRSNode RowRSNode  NumericConstantNode
      |       |                    |
 ColRef    NumericConstantNode    333
      |       |
     n.i     999

Note that the CollectNodesVisitor collects *ALL* the ColumnReferences in
the trigger action. In the above case, it returned 3 column references
nodes. One in the top level Union node, one in top level Union Node's
left child which it is also an UnionNode and the last one is found in
the RowResultSetNode.

The UnionNodes will have a copy of the CRs from its left child and
those CRs will not have its beginOffset set which indicates they are
not relevant for the conversion processing here, so the corrective
action here is to skip these entries.


------------------------------------------------------------------------
r482303 | abrown | 2006-12-04 11:27:08 -0800 (Mon, 04 Dec 2006) | 4 lines

DERBY-2131 (partial): Change privileged block in SqlXmlUtil.serializeToString()
so that it contains as little code as possible.  Also adds a catch block
around the privileged block to unwrap security exceptions.

------------------------------------------------------------------------
r482221 | rhillegas | 2006-12-04 07:37:29 -0800 (Mon, 04 Dec 2006) | 1 line

DERBY-2129: Update STATUS and CHANGES files before generating 10.2.2 release.
------------------------------------------------------------------------
r482129 | kahatlen | 2006-12-04 02:54:53 -0800 (Mon, 04 Dec 2006) | 7 lines

DERBY-2140: BlobClob4BlobTest.testSelfDestructiveClob() fails with
"ERROR X0X95: Operation 'DROP TABLE' cannot be performed on object
'TESTCLOB' because there is an open ResultSet dependent on that
object."

Close ResultSet and Statement in testSelfDestructiveClob.

------------------------------------------------------------------------
r481611 | djd | 2006-12-02 11:38:36 -0800 (Sat, 02 Dec 2006) | 2 lines

Add comment to ModuleFactory.getApplicationProperties() describing its functionality.

------------------------------------------------------------------------
r481602 | djd | 2006-12-02 10:50:26 -0800 (Sat, 02 Dec 2006) | 4 lines

DERBY-2094 (partial) Initial partial implementation of the order entry test transactions using the
defined behaviour from the appendix TPC-C specification. Only stock level added.
Also added a JUnit testing frame work to test the functionality of the operations.

------------------------------------------------------------------------
r481574 | djd | 2006-12-02 08:14:48 -0800 (Sat, 02 Dec 2006) | 1 line

DERBY-1965 Ensure sockets opened by NetworkServerControlImpl are explicitly closed.
------------------------------------------------------------------------
r481467 | djd | 2006-12-01 17:01:11 -0800 (Fri, 01 Dec 2006) | 2 lines

DERBY-2096 Missing file from last commit that broke build.

------------------------------------------------------------------------
r481423 | djd | 2006-12-01 14:06:29 -0800 (Fri, 01 Dec 2006) | 1 line

organize imports (using eclipse) in a number of query nodes, cleans up several unrequired imports of DataDictionayContext.
------------------------------------------------------------------------
r481421 | djd | 2006-12-01 14:00:54 -0800 (Fri, 01 Dec 2006) | 1 line

DERBY-2096 Move remaining methods that are limited to StatementNode from QueryTreeNode.
------------------------------------------------------------------------
r481252 | fernanda | 2006-12-01 06:38:49 -0800 (Fri, 01 Dec 2006) | 3 lines

DERBY-2025 convert lang/updatableResultSet.java to JUnit


------------------------------------------------------------------------
r481181 | kahatlen | 2006-12-01 00:16:09 -0800 (Fri, 01 Dec 2006) | 6 lines

DERBY-2122: Optimize ContainerLock.isCompatible() and RowLock.isCompatible()

Build a bit mask from the compatibility tables in ContainerLock and
RowLock, and replace look-up in two-dimensional array with bitwise
and.

------------------------------------------------------------------------
r481117 | abrown | 2006-11-30 16:19:26 -0800 (Thu, 30 Nov 2006) | 7 lines

DERBY-2131: Use a privileged block when calling out to the JAXP parser
so that users running with a security manager can insert XML values
that reference external DTDs without encountering security exceptions.

This patch does not include any tests; however, relevant test cases
will be enabled as part of DERBY-1758.

------------------------------------------------------------------------
r481114 | myrnavl | 2006-11-30 16:10:15 -0800 (Thu, 30 Nov 2006) | 2 lines

DERBY-2135 - add a note re modifying number of parameters in messages.

------------------------------------------------------------------------
r481026 | rhillegas | 2006-11-30 10:17:08 -0800 (Thu, 30 Nov 2006) | 1 line

DERBY-1919: Commit derby-1919-v01.diff, pointing index.html at the release notes as well as the NOTICE and LICENSE files.
------------------------------------------------------------------------
r480861 | kahatlen | 2006-11-29 23:02:10 -0800 (Wed, 29 Nov 2006) | 2 lines

DERBY-2123: Remove workaround for old JIT bug from StoredPage

------------------------------------------------------------------------
r480664 | mikem | 2006-11-29 10:10:22 -0800 (Wed, 29 Nov 2006) | 3 lines

javadoc fix, removing @return from a void function.


------------------------------------------------------------------------
r480299 | davidvc | 2006-11-28 16:25:20 -0800 (Tue, 28 Nov 2006) | 3 lines

Fixed some formatting/comments and one bugfix.  Also added svn:ignore
to the proper places so things don't accidentally get checked in.

------------------------------------------------------------------------
r480228 | mamta | 2006-11-28 13:54:38 -0800 (Tue, 28 Nov 2006) | 2 lines

Remove imports that are not required.

------------------------------------------------------------------------
r480160 | myrnavl | 2006-11-28 11:13:42 -0800 (Tue, 28 Nov 2006) | 2 lines

DERBY-2110 - removing innocent spaces in the tags

------------------------------------------------------------------------
r479886 | djd | 2006-11-27 20:12:14 -0800 (Mon, 27 Nov 2006) | 2 lines

DERBY-2096 (partial) Move needsSavepoint() to StatementNode, remove QueryTreeNode.bind and optimize.
Have GenericStatement use StatementNode for the head of the statement's query tree.
------------------------------------------------------------------------
r479527 | myrnavl | 2006-11-26 22:37:26 -0800 (Sun, 26 Nov 2006) | 9 lines

DERBY-2110 - correcting typos in a number of messages
- fix involved also updating MessageBuilder.java, because the resulting
  dita file did not correctly replace all quotes when put into html.
- also corrected BlobClob4BlobTest which has the string of message 40X0D
  hardcoded.
- also updated errorCode.out masters, incl. for j9_13 and j9_22, even though
  that's not really needed anymore.


------------------------------------------------------------------------
r479119 | kahatlen | 2006-11-25 04:25:28 -0800 (Sat, 25 Nov 2006) | 4 lines

DERBY-812: Scripts to publish Derby test results

Added licence headers.

------------------------------------------------------------------------
r479044 | kahatlen | 2006-11-24 15:06:41 -0800 (Fri, 24 Nov 2006) | 2 lines

Fixed typo in javadoc.

------------------------------------------------------------------------
r478891 | kahatlen | 2006-11-24 06:32:07 -0800 (Fri, 24 Nov 2006) | 4 lines

DERBY-2116: Test files missing svn:eol-style

Set the svn:eol-style property to native.

------------------------------------------------------------------------
r478883 | kahatlen | 2006-11-24 05:51:37 -0800 (Fri, 24 Nov 2006) | 4 lines

DERBY-2115: Some master files don't have the svn:eol-style property

Set the svn:eol-style property to native for these files.

------------------------------------------------------------------------
r478877 | kahatlen | 2006-11-24 05:33:01 -0800 (Fri, 24 Nov 2006) | 5 lines

DERBY-1434: Client can send incorrect database name to server after
having made multiple connections to different databases.

Patch contributed by Julius Stroffek.

------------------------------------------------------------------------
r478802 | kahatlen | 2006-11-24 00:35:04 -0800 (Fri, 24 Nov 2006) | 4 lines

DERBY-812: Scripts to publish Derby test results

Contributed by Ole Solberg.

------------------------------------------------------------------------
r478622 | bpendleton | 2006-11-23 09:27:39 -0800 (Thu, 23 Nov 2006) | 9 lines

DERBY-1089: NPE inserting a join into a table with a generated column
DERBY-2015: NPE in INSERT .. SELECT with IDENTITY column

When an INSERT ... SELECT statement inserts a GENERATED ALWAYS identity
column, the identity column's column reference is NULL, since that
column does not have a corresponding column in the SELECT list. This
NULL expression needs to be skipped over when remapping column references
from the SELECT column list to the INSERT column list. 

------------------------------------------------------------------------
r478348 | abrown | 2006-11-22 14:30:36 -0800 (Wed, 22 Nov 2006) | 4 lines

DERBY-1758 (partial): Remove the old lang/xmlBinding.java test and the
old xmlSuite.  They have now been replaced with lang/XMLBindingTest.java
and suites/XMLSuite.java, respectively, both of which are run with JUnit.

------------------------------------------------------------------------
r478336 | abrown | 2006-11-22 13:47:23 -0800 (Wed, 22 Nov 2006) | 16 lines

DERBY-1758 (partial):

  1. Updates XMLBindingTest to ignore the Windows line-ending character
     ("\r") when counting characters as part of serialization.

  2. Updates XMLBindingTest to run with NO security manager for now.
     This works toward the "progress not perfection" goal of incremental
     development.  Once the questions surrounding the security policy for
     JAXP have been answered the test can be updated to run with the security
     manager.

  3. Creates a new JUnit suite, suites/XMLSuite.java, to run all of the
     XML JUnit tests, and enables that suite to run as part of
     lang/_Suite.java, which in turn means it is executed as part
     suites.All.

------------------------------------------------------------------------
r478031 | djd | 2006-11-21 20:44:35 -0800 (Tue, 21 Nov 2006) | 1 line

DERBY-2096 (partial) Change the main return type from parsing a statement to a StatementNode.
------------------------------------------------------------------------
r477645 | kahatlen | 2006-11-21 04:10:38 -0800 (Tue, 21 Nov 2006) | 4 lines

DERBY-2102: JDBC.assertFullResultSet should handle byte arrays

Patch contributed by ?\195?\152ystein Gr?\195?\184vlen.

------------------------------------------------------------------------
r477420 | djd | 2006-11-20 16:03:11 -0800 (Mon, 20 Nov 2006) | 5 lines

DERBY-2096 (partial) Rename the optimize() method for StatementNode to optimizeStatement() as a step
in switching the return type of a parse statement to StatementNode. Make optimizeStatement() void
as no implementation ever switches the type and several implementations did not handle the
type switching anyway.

------------------------------------------------------------------------
r477371 | djd | 2006-11-20 14:32:53 -0800 (Mon, 20 Nov 2006) | 5 lines

DERBY-2096 (partial) Rename the bind() method for StatementNode to bindStatement() as a step
in switching the return type of a parse statement to StatementNode. Make bindStatement() void
as no implementation ever switches the type and several implementations did not handle the
type switching anyway.

------------------------------------------------------------------------
r477348 | djd | 2006-11-20 13:30:06 -0800 (Mon, 20 Nov 2006) | 3 lines

Delete three node classes that are not used and have not been modified since the initial contribution.
Also removed them from derby.jar.
HashNodeList, QuantifiedBinaryOperator and QuantifiedUnaryOperator.
------------------------------------------------------------------------
r477168 | kahatlen | 2006-11-20 05:17:11 -0800 (Mon, 20 Nov 2006) | 15 lines

DERBY-1132: Truncation Error with Concat

The Char & Varchar functions were not handled separately to assign to
length for the target type (in the bindExpression() method of
CastNode.java) and thus a default value of 15 was getting assigned to
it (from getColumnDisplaySize() method of DataTypeUtilities class)

Now I added a check for the string types (i.e. both Char & Varchar) in
the source type, and using the operand's maximum length or the maximum
length for that data type (whichever is minimum) and assigning it to
be the length for the target type. Thus avoiding the unwanted
truncation error caused by the default value of 15.

Patch contributed by Saurabh Vyas.

------------------------------------------------------------------------
r476662 | kahatlen | 2006-11-18 15:49:04 -0800 (Sat, 18 Nov 2006) | 2 lines

DERBY-2099: Make BasePage.getPageId() final

------------------------------------------------------------------------
r476645 | myrnavl | 2006-11-18 14:50:22 -0800 (Sat, 18 Nov 2006) | 3 lines

DERBY-1850 - SURTest_ij.sql - after sed-ing for j2ME, missed updating client canon


------------------------------------------------------------------------
r476588 | myrnavl | 2006-11-18 11:02:54 -0800 (Sat, 18 Nov 2006) | 5 lines

DERBY-1850 - jdbcapi/SURTest_ij.sql fails on IBM WCTME 5.7 Foundation (jdkJ2ME Spec v1.0)
- added the required ij.dataSource settings 
- added sedding of first CONNECTION line, to avoid extra master


------------------------------------------------------------------------
r476548 | myrnavl | 2006-11-18 08:03:33 -0800 (Sat, 18 Nov 2006) | 5 lines

DERBY-2049 - parameterMapping and updatableResultset failing with wctme5.7 foundation
- updated j9_foundation output to reflect new messages
- adjusted test 48 to not run BigDecimal queries


------------------------------------------------------------------------
r476425 | myrnavl | 2006-11-17 19:26:40 -0800 (Fri, 17 Nov 2006) | 6 lines

DERBY-1849 - grantRevokeDDL and grantRevokeDDL2.sql fail with ibm wctme5.7_foundation (jdkJ2ME Spec v1.0)
- accepting that triggers are not supported with this jvm
- updated masters to latest syntax changes in test
- stopped NPE by adding ij.dataSource properties to grantRevokeDDL2.out


------------------------------------------------------------------------
r476365 | abrown | 2006-11-17 15:30:51 -0800 (Fri, 17 Nov 2006) | 12 lines

DERBY-1758 (partial): Adds a new JUnit test to replace the old
lang/xmlBinding.java test. The patch does the following:

  - Adds XML file insertion utility methods to junit/XML.java
  - Creates a new JUnit test called lang/XMLBindingTest.java that
    uses the new utility methods to test various binding scenarios
    with Derby's SQL/XML operators.
  - Overloads the TestConfiguration.defaultSuite() method with a boolean
    signature to allow optional addition of CleanDatabaseSetup.
  - Updates lang/XMLTypeAndOpsTest to use the new overloaded defaultSuite()
    method. 

------------------------------------------------------------------------
r476353 | djd | 2006-11-17 15:02:30 -0800 (Fri, 17 Nov 2006) | 2 lines

Remove some unused methods from LanguageConnectionContext,
anyoneBlocked,getAccessFactory,setTransaction
------------------------------------------------------------------------
r476342 | djd | 2006-11-17 14:20:12 -0800 (Fri, 17 Nov 2006) | 3 lines

DERBY-2096 (partial) Change the methods in the grammar (sqlgrammar.jj) that return statements to declare thier
return type as the more specific StatementNode rather than QueryTreeNode.

------------------------------------------------------------------------
r476318 | djd | 2006-11-17 13:14:19 -0800 (Fri, 17 Nov 2006) | 2 lines

Remove reference to the connection once it is closed in derbynet/ShutDownDBWhenNSShutsDownTest

------------------------------------------------------------------------
r476316 | djd | 2006-11-17 13:11:59 -0800 (Fri, 17 Nov 2006) | 3 lines

Various changes to ensure JDBC objects are closed when running the JUnit tests in the jdbcapi package.
Change UpdateableResultSetTest to become standard and use the connection provided by
the super class.
------------------------------------------------------------------------
r476315 | djd | 2006-11-17 13:10:17 -0800 (Fri, 17 Nov 2006) | 1 line

Close one of the ResultSets used to clean up databases from CleanDatabaseTestSetup.
------------------------------------------------------------------------
r476224 | djd | 2006-11-17 09:30:43 -0800 (Fri, 17 Nov 2006) | 1 line

Close a CallableStatement in ProcedureTest
------------------------------------------------------------------------
r476204 | djd | 2006-11-17 08:36:14 -0800 (Fri, 17 Nov 2006) | 2 lines

Clean up some assertTrue(..., false) to fail() in HoldabilityTest,
close some ResultSet's left open and simplify the tearDown method.
------------------------------------------------------------------------
r476201 | djd | 2006-11-17 08:33:30 -0800 (Fri, 17 Nov 2006) | 1 line

Close a PreparedStatement in SURTest.
------------------------------------------------------------------------
r476199 | djd | 2006-11-17 08:30:45 -0800 (Fri, 17 Nov 2006) | 1 line

Clean up some asserts and close a PreparedStatement in SURBaseTest
------------------------------------------------------------------------
r476197 | djd | 2006-11-17 08:28:42 -0800 (Fri, 17 Nov 2006) | 1 line

Close some Statement objects left open in XMLTypeAndOpsTest
------------------------------------------------------------------------
r476196 | djd | 2006-11-17 08:27:21 -0800 (Fri, 17 Nov 2006) | 1 line

Null out the DDL connection reference in PrepareExecuteDDL on tearDown.
------------------------------------------------------------------------
r476195 | djd | 2006-11-17 08:25:47 -0800 (Fri, 17 Nov 2006) | 1 line

Ensure ConcurrencyTest closes the second connection it opens in some fixtures.
------------------------------------------------------------------------
r476190 | mikem | 2006-11-17 08:07:35 -0800 (Fri, 17 Nov 2006) | 6 lines

DERBY-2093

Fixed error in initSlotTable() to print the right page info in case
of error during initialization of page from disk into cache.


------------------------------------------------------------------------
r476182 | djd | 2006-11-17 07:46:01 -0800 (Fri, 17 Nov 2006) | 2 lines

Change GroupByExpressionTest to use the standard CleanDatabaseTestSetup rather than
its own mechanism to drop objects.
------------------------------------------------------------------------
r476180 | djd | 2006-11-17 07:35:08 -0800 (Fri, 17 Nov 2006) | 5 lines

Null out the NetworkServerControl in the tearDown method of the
network server decorator. This seems to stop future startups of
the server taking 60+ seconds and causing tests to fail.
Will add a note to DERBY-1966 that this is a possible cause of
network start delays. Also null of the FileOutputStream field.
------------------------------------------------------------------------
r476087 | bernt | 2006-11-17 01:17:55 -0800 (Fri, 17 Nov 2006) | 1 line

DERBY-2084 getTransactionIsolation() in network client should not activate a transaction
------------------------------------------------------------------------
r475817 | kristwaa | 2006-11-16 09:06:34 -0800 (Thu, 16 Nov 2006) | 2 lines

DERBY-1693: Log a token in derby.log for LOBs instead of the actual content when derby.language.logStatementText=true (token: "NULL|[BC]LOB(<length>|<stream class>)")

------------------------------------------------------------------------
r475803 | djd | 2006-11-16 08:36:41 -0800 (Thu, 16 Nov 2006) | 2 lines

DERBY-1030 (partial) Add some comments to the logic for the RETURNS ON NULL INPUT's state field.

------------------------------------------------------------------------
r475780 | djd | 2006-11-16 07:49:28 -0800 (Thu, 16 Nov 2006) | 3 lines

DERBY-927 (partial) Clean up code related to serviceProviders to aid progress towards
merging services and storage factories in the monitor.

------------------------------------------------------------------------
r475779 | djd | 2006-11-16 07:46:52 -0800 (Thu, 16 Nov 2006) | 3 lines

DERBY-927 (partial) StorageFactoryService needs to allow for the return for StorageFile.list()
being null as documented in the api.

------------------------------------------------------------------------
r475728 | kahatlen | 2006-11-16 05:32:06 -0800 (Thu, 16 Nov 2006) | 2 lines

Fix javadoc warnings in JarUtil.

------------------------------------------------------------------------
r475724 | kahatlen | 2006-11-16 05:22:29 -0800 (Thu, 16 Nov 2006) | 2 lines

Removed javadoc templates which hid the excellent javadoc for StoredPage.

------------------------------------------------------------------------
r475492 | djd | 2006-11-15 15:29:21 -0800 (Wed, 15 Nov 2006) | 1 line

DERBY-1030 (partial) Remove test cases from functions.sql that are covered in RoutineTest (junit test).
------------------------------------------------------------------------
r475490 | djd | 2006-11-15 15:22:26 -0800 (Wed, 15 Nov 2006) | 3 lines

DERBY-1030 (partial) Add test cases to RoutineTest that demonstrate this bug, where
a function declared as RETURNS NULL ON NULL INPUT can be called when its argument is NULL.
Look for the comment with this bug number.
------------------------------------------------------------------------
r475449 | djd | 2006-11-15 13:58:34 -0800 (Wed, 15 Nov 2006) | 3 lines

DERBY-1030 (partial) Add a new JUnit test class intended to hold all routine (procedure and function)
test cases. Migrate some test cases from functions.sql related to checking the RETURNS NULL or CALLED
on NULL INPUT clauses for functions. 
------------------------------------------------------------------------
r475446 | djd | 2006-11-15 13:54:40 -0800 (Wed, 15 Nov 2006) | 1 line

Remove test cases from functions.sql that are covered by MathTrigFunctionsTest.
------------------------------------------------------------------------
r475370 | kahatlen | 2006-11-15 11:17:53 -0800 (Wed, 15 Nov 2006) | 4 lines

DERBY-2089: jdbc4/VerifySignatures.junit is failing

Adding "create=true" so that the test database is created.

------------------------------------------------------------------------
r475330 | mikem | 2006-11-15 09:53:45 -0800 (Wed, 15 Nov 2006) | 10 lines

DERBY-2057
contributed by Yip Ng
patch:  derby2057-trunk-diff02.txt

Fixed SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE() implementation to match
documentation.  Arguments should treat non-zero as "true", previous to this
fix only "1" was treated as true.



------------------------------------------------------------------------
r474884 | djd | 2006-11-14 09:31:34 -0800 (Tue, 14 Nov 2006) | 1 line

DERBY-2033 Remove the old dcl.sql test from the old harness.
------------------------------------------------------------------------
r474878 | djd | 2006-11-14 09:21:08 -0800 (Tue, 14 Nov 2006) | 3 lines

DERBY-2033 Convert remaining tests from dcl.sql to DatabaseClassLoadingTest including those
that execute against a database in a jar. Database in a jar tests pass but cause an issue on
clenaup which is entered as DERBY-2083.
------------------------------------------------------------------------
r474803 | kristwaa | 2006-11-14 06:36:38 -0800 (Tue, 14 Nov 2006) | 2 lines

DERBY-2054: Rewrite test derbynet/SuicideOfStreaming to JUnit. Moved tests ByteArrayCombinerStreamTest and SqlExceptionTest from old harness to suites.All.

------------------------------------------------------------------------
r474720 | bernt | 2006-11-14 02:25:51 -0800 (Tue, 14 Nov 2006) | 1 line

DERBY-638 Network driver setTransactionIsolation() causes a commit, but does not complete it locally
------------------------------------------------------------------------
r474695 | kahatlen | 2006-11-14 00:32:25 -0800 (Tue, 14 Nov 2006) | 7 lines

DERBY-801: Allow parallel access to data files

This patch (DERBY-801-7.patch) turns the DEBUG_PRINT messages in
RAFContainer4 into assertions guarding the method entry points.

Patch contributed by Anders Morken.

------------------------------------------------------------------------
r474628 | fuzzylogic | 2006-11-13 18:28:02 -0800 (Mon, 13 Nov 2006) | 2 lines

DERBY-2030: 'show tables' should show system tables.

------------------------------------------------------------------------
r474619 | djd | 2006-11-13 17:17:14 -0800 (Mon, 13 Nov 2006) | 4 lines

Simplify the interaction between the monitor and the StorageFactory when the
monitor is obtaining a list of services to boot. Cleaner code avoids creating
a new StorageFactory implementation for each file and handles non-directories cleaner.

------------------------------------------------------------------------
r474593 | fuzzylogic | 2006-11-13 16:02:35 -0800 (Mon, 13 Nov 2006) | 4 lines

Grant permission to read ${user.home}/junit.properties to all. Left it in the
previous section so that this new section just needs to be removed once
CompatibilityTest has been rewritten.

------------------------------------------------------------------------
r474552 | djd | 2006-11-13 14:57:49 -0800 (Mon, 13 Nov 2006) | 2 lines

Add utility methods for JUnit tests to get a DataSource based upon the current configuration
but pointing to a different database and to shutdown a database from a data source.
------------------------------------------------------------------------
r474502 | bpendleton | 2006-11-13 12:36:51 -0800 (Mon, 13 Nov 2006) | 13 lines

DERBY-1495: Error modifying an identity column after altering the column
DERBY-1645: ALTER TABLE SET INCREMENT turns off "Generated By Default"

This patch changes ModifyColumnNode.bindAndValidateDefault so that it
detects the case(s) where the user is altering aspects of an identity column,
and ensures that the other aspects of that identity column are preserved and
not lost. The crucial issue is that if the column is Generated By Default,
then the DefaultInfoImpl column in the SYSCOLUMNS table needs to get
retained when the user uses ALTER TABLE to change either the start value
or the increment value; otherwise the behavior effectively switches from
Generated By Default to Generated Always.


------------------------------------------------------------------------
r474376 | djd | 2006-11-13 07:50:24 -0800 (Mon, 13 Nov 2006) | 1 line

DERBY-537 (partial) Remove some dead code for handling jar files stored within the database.
------------------------------------------------------------------------
r474015 | kahatlen | 2006-11-12 11:14:32 -0800 (Sun, 12 Nov 2006) | 3 lines

Clean up javadoc comments in ClientBaseDataSource to make them more
readable in the published API.

------------------------------------------------------------------------
r473834 | djd | 2006-11-11 16:08:07 -0800 (Sat, 11 Nov 2006) | 3 lines

DERBY-537 (partial) Call FileResource.add in a privleged block when executing code to add a jar,
driven by sqlj.install_jar. Allows one test fixture in DatabaseClassLoadingTest to be executed
with a security manager.
------------------------------------------------------------------------
r473828 | djd | 2006-11-11 15:11:56 -0800 (Sat, 11 Nov 2006) | 5 lines

DERBY-537 (partial) Fix the reading of the jar file (through a URL or file name) for sqlj.install_jar
and replace_jar to be under a privileged block. Switched the order of lookup from the jar path to
be URL and then as a file name. Otherwise a security exception is thrown trying to open the URL
path as a file name.

------------------------------------------------------------------------
r473783 | djd | 2006-11-11 11:50:15 -0800 (Sat, 11 Nov 2006) | 2 lines

SupportFilesSetup needs to convert from the File to a URL in a privileged block as
that operation requires the permission to read user.dir.
------------------------------------------------------------------------
r473780 | djd | 2006-11-11 11:41:05 -0800 (Sat, 11 Nov 2006) | 2 lines

DERBY-537 (partial) Change the DatabaseClassLoadingTest to install and replace the jar files using
the SupportFilesSetup decorator so that the engine will have the correct permissions to read the jar files.
------------------------------------------------------------------------
r473778 | djd | 2006-11-11 11:33:55 -0800 (Sat, 11 Nov 2006) | 2 lines

Add decorator SupportFilesSetup which allows resources to be copied from the classpath
into the extin, extinout & extout folders to match the old harness behaviour.
------------------------------------------------------------------------
r473688 | kahatlen | 2006-11-11 02:36:16 -0800 (Sat, 11 Nov 2006) | 2 lines

Fixed wrong class name in copyright header.

------------------------------------------------------------------------
r473687 | kahatlen | 2006-11-11 02:28:07 -0800 (Sat, 11 Nov 2006) | 6 lines

DERBY-2067: Assert failure in EmbedConnection.restoreContextStack()
when running lang/closed.java

Change the assert so that it doesn't raise an error if the engine has
been shut down.

------------------------------------------------------------------------
r473603 | bpendleton | 2006-11-10 16:51:33 -0800 (Fri, 10 Nov 2006) | 7 lines

DERBY-2018: NullPointerException in CREATE VIEW ... VALUES NULL

This patch was contributed by Yip Ng (yipng168@gmail.com)

This fix catches untyped null in CreateViewNode at bind phase (same logic
as CursorNode) and throws the exception. 

------------------------------------------------------------------------
r473440 | djd | 2006-11-10 11:31:18 -0800 (Fri, 10 Nov 2006) | 2 lines

DERBY-537 Fix JarLoader missed from last commit.

------------------------------------------------------------------------
r473416 | djd | 2006-11-10 10:30:50 -0800 (Fri, 10 Nov 2006) | 1 line

DERBY-537 (partial) Cleanup JarUtil removing code that is never called and making class package private.
------------------------------------------------------------------------
r473413 | djd | 2006-11-10 10:26:19 -0800 (Fri, 10 Nov 2006) | 3 lines

DERBY-2055 1) Adds a new class Load.java to execute the schema scripts for OE within the junit framework.
2) Adds a new utility method to BaseJDBCTestCase to take a resource name and execute it using runScript. 
Contributed by  Sunitha Kambhampati ksunithaghm@gmail.com
------------------------------------------------------------------------
r473396 | djd | 2006-11-10 09:36:57 -0800 (Fri, 10 Nov 2006) | 3 lines

Add some comments to ConstantActionActivation to inform how the activation gets
hooked up to the ConstantAction.

------------------------------------------------------------------------
r473387 | djd | 2006-11-10 08:39:20 -0800 (Fri, 10 Nov 2006) | 2 lines

DERBY-2040 (partial) Create the class loaders (JarLoader instances) for database class loading
within a privileged block.
------------------------------------------------------------------------
r473366 | djd | 2006-11-10 07:26:58 -0800 (Fri, 10 Nov 2006) | 4 lines

DERBY-2047 Remove TestDataSourceFactory and clean up associated code. Functionality
has been replaced by JDBCDataSource and J2EEDataSource which allows clean separation
for JSR169 which does not include the XA and connection pooling data sources.

------------------------------------------------------------------------
r473176 | djd | 2006-11-09 19:42:54 -0800 (Thu, 09 Nov 2006) | 1 line

DERBY-2063 Add comment to BootTestAll related to this bug.
------------------------------------------------------------------------
r473175 | djd | 2006-11-09 19:36:32 -0800 (Thu, 09 Nov 2006) | 3 lines

DERBY-1952 DERBY-2047 Convert store/BootAllTest to run as a standard JUNit test and
not within the harness. Added a store._Suite and hooked it into the suites.All and
the ant junit-all target.
------------------------------------------------------------------------
r473123 | djd | 2006-11-09 14:49:55 -0800 (Thu, 09 Nov 2006) | 6 lines

DERBY-2063 (partial) Change ShutdownDBWhenNSShutsDown from being a JUnit test run under the old
harness to one that is run as a regular JUnit tests. Add a new _Suite for derbynet and hook it
into suites.All and the ant junit-all target. Required fixing some bugs in the DriverManager
connection handling. Also refactored NetworkServerTestSetup to allow starting the server
from the "command line" and to provide some utility methods for tests, e.g. to get
a correctly setup NetworkServerControl.
------------------------------------------------------------------------
r473079 | djd | 2006-11-09 13:38:52 -0800 (Thu, 09 Nov 2006) | 2 lines

DERBY-1952 DERBY-2047 Remove the remaining code directly related to derbyTesting.xa.single.
This functionality has been replaced with a decorator.
------------------------------------------------------------------------
r472902 | kristwaa | 2006-11-09 05:58:31 -0800 (Thu, 09 Nov 2006) | 2 lines

DERBY-2000: Granted permission to create derby.system.home to derby.jar

------------------------------------------------------------------------
r472859 | kahatlen | 2006-11-09 02:57:47 -0800 (Thu, 09 Nov 2006) | 6 lines

DERBY-2038: lang/releaseCompileLocks.sql and lang/closed.java fail
under JDK 1.6 in insane mode

Added sed scripts which deleted the differing parts of the stack trace
from the test output.

------------------------------------------------------------------------
r472803 | kahatlen | 2006-11-08 23:43:38 -0800 (Wed, 08 Nov 2006) | 5 lines

DERBY-2050: Manipulating CachedItems could be more efficient

Use five boolean fields instead of one int to record CachedItem's
state. Contributed by Dyre Tjeldvoll.

------------------------------------------------------------------------
r472738 | suresht | 2006-11-08 17:55:43 -0800 (Wed, 08 Nov 2006) | 6 lines

simple update to the master file specific to ibm 15 jvm. This file 
did not seems to have got updated correctly  with  sql file
copyright changes. 
   


------------------------------------------------------------------------
r472722 | djd | 2006-11-08 16:56:20 -0800 (Wed, 08 Nov 2006) | 6 lines

DERBY-2047 DERBY-1952 (partial) Implement the ability to run with the default connction coming from
an XADataSource as a decorator via the utility method TestConfiguration.connectionXADecorator.
This will replace the functionality driven by the property derbyTesting.xa.single.
Improved jdbc4.ConnectionTest and PreparedStatementTest to also run their test fixtures with
this XA decorator. This will replace the old harness suite jdbcxa40 which does not seem to be part
of derbyall but the new runs are part of jdbc4._Suite.
------------------------------------------------------------------------
r472708 | bpendleton | 2006-11-08 16:00:45 -0800 (Wed, 08 Nov 2006) | 11 lines

DERBY-1490: Provide RENAME COLUMN functionality

This patch provides a new statement:

  RENAME COLUMN [schema.]table.column TO new-column

The patch contains sqlgrammar.jj changes which implement the new syntax
using the existing execution support in RenameConstantAction.java. The
patch also includes new tests in the lang/altertable.sql test program.


------------------------------------------------------------------------
r472707 | djd | 2006-11-08 16:00:17 -0800 (Wed, 08 Nov 2006) | 3 lines

DERBY-2047 (partial) Expose the generic data source (bean) property setting method in JDBCDataSource
and change DataSourcePropertiesTest to use it as part of clean up to ensure clean separation between
old harness code and JUnit code.
------------------------------------------------------------------------
r472704 | djd | 2006-11-08 15:51:46 -0800 (Wed, 08 Nov 2006) | 3 lines

DERBY-2033 (partial) All of the test cases from dcl.sql are converted to DatabaseClassLoadingTest
except those related to jarring up the database and runing tests against that read-only database.
Add DatabaseClassLoadingTest into lang._Suite.
------------------------------------------------------------------------
r472613 | djd | 2006-11-08 11:49:13 -0800 (Wed, 08 Nov 2006) | 6 lines

DERBY-2048 Add an additional cleanup step(compression) to cleanDatabase() method.
After objects removal is performed via removeObjects(), object compression is performed in the
new compressObjects() method on the SYS.SYSDEPENDS to compact the system table.
(Currently it only compress this system table.)

Contributed by Yip Ng yipng168@gmail.com
------------------------------------------------------------------------
r472391 | abrown | 2006-11-07 20:53:54 -0800 (Tue, 07 Nov 2006) | 8 lines

DERBY-2052: JDBC.assertRowInResultSet compares the wrong value if using
trimmed strings and a SMALLINT column exists. 

Patch that 1) moves the locally scoped variables in JDBC.assertRowInResultSet()
into the for loop, and 2) sets the "obj" variable through all paths.

Contributed by Dan Debrunner (djd@apache.org) 

------------------------------------------------------------------------
r472228 | djd | 2006-11-07 12:05:22 -0800 (Tue, 07 Nov 2006) | 4 lines

DERBY-2023 DERBY-2047 Add JUnit utility class J2EEDataSource to return XA and ConnectionPooling
data source implementations. Split out from JDBCDataSource to ensure no class not found exceptions
when running in JSR169. Changed JUnit tests using the old harness class TestDataSourceFactory
to use the J2EEDataSource and/or JDBCDataSource.
------------------------------------------------------------------------
r472187 | djd | 2006-11-07 10:18:54 -0800 (Tue, 07 Nov 2006) | 7 lines

DERBY-2036 DERBY-2043 DERBY-2047 (partial) Re-work connection handling in JUnit tests.
Create connection factory Connector with two implementations, DataSourceConnector and DriverManagerConnector.
This ensures that running tests does not attempt to load DriverManager when running tests with JSR169.
Ensure DataSource implementation sets user name and password from configuration for the getConnection()
method to ensure the ChangerUserTestSetup works.
Refactor the setting of data source Java bean properties to be from a HashMap rather than a Properties
object to ensure that no special code exists at the lowest level to deal with different property types.
------------------------------------------------------------------------
r472016 | kahatlen | 2006-11-06 23:39:25 -0800 (Mon, 06 Nov 2006) | 17 lines

DERBY-2023: Ensure all tests called by jdbc40._Suite run in embedded
and client as required

The attached patch (derby-2023.diff) makes most of the tests in
jdbc4._Suite run in client and embedded. The exceptions are

  - ClosedObjectTest
  - StatementEventsTest
  - XA40Test
  - UnsupportedVetter
  - DataSourceTest

These tests can only run in embedded mode until DERBY-2047 has been
fixed, and I have added a note about it in their suite() methods.

jdbc4._Suite is removed from jdbc40.runall.

------------------------------------------------------------------------
r471862 | kahatlen | 2006-11-06 11:58:18 -0800 (Mon, 06 Nov 2006) | 7 lines

DERBY-2046: Make class org.apache.derby.iapi.store.raw.PageKey final

The methods of the PageKey class are called frequently both from the
lock manager and the cache manager. Since no other classes extend it,
it should be declared final to help the run-time compiler optimize the
method calls.

------------------------------------------------------------------------
r471808 | djd | 2006-11-06 10:39:16 -0800 (Mon, 06 Nov 2006) | 2 lines

DERBY-2043 DERBY-2047 (partial) More connection utility method cleanup to provide a single consistent
shutdownEngine() method.
------------------------------------------------------------------------
r471459 | bpendleton | 2006-11-05 08:45:24 -0800 (Sun, 05 Nov 2006) | 16 lines

DERBY-2014: NullPointerException with NULLIF in GROUP BY clause

This change was contributed by Yip Ng (yipng168@gmail.com)

The NPE happens in isEquivalent() method where it does not handle
value is null. (same symptom as DERBY-2008) and the patch addresses
this + additonal testcases.

The isEquivalent() method is used to compare the select column
against the group by with expression. Note that it is comparing
the structural form of the two expressions for equivalence at bind phase
and not comparing the actual row values at runtime to produce a result.

This patch converts all the tests in the previous patch into junit.
Also the javadoc for ValueNode.isEquivalent() method has been updated.

------------------------------------------------------------------------
r471366 | fuzzylogic | 2006-11-04 21:14:13 -0800 (Sat, 04 Nov 2006) | 2 lines

Add *.dtd and messages*.xml to list of exclusions for the derbydocs target.

------------------------------------------------------------------------
r471104 | djd | 2006-11-03 18:47:29 -0800 (Fri, 03 Nov 2006) | 3 lines

DERBY-2033 (partial) Add login in CleanDatabaseTestSetup to unset database properties as
part of the cleanup. Specifcally unset derby.database.classpath for the DatabaseClassLoadingTest
but others can be added in the future.
------------------------------------------------------------------------
r471089 | djd | 2006-11-03 17:08:34 -0800 (Fri, 03 Nov 2006) | 4 lines

DERBY-2043 (partial) Cleanup some of the connection methods in TestConfiguration to allow easier
transition of the DataSource code into the junit package. Add a utility shutdownDatabase() method
to TestConfiguration rather than using a getConnection with shutdown=true and duplicated code
for catching the exception and asserting its SQL state.
------------------------------------------------------------------------
r470956 | djd | 2006-11-03 11:17:21 -0800 (Fri, 03 Nov 2006) | 4 lines

DERBY-2033 (partial) Initial test cases for DatabaseClassLoadingTest but test is not ready to
be added to a suite yet. Fix the no security manager decorator to work correctly as it is
required by this test. Add some utility methods to JDBC for testing result sets.

------------------------------------------------------------------------
r470943 | abrown | 2006-11-03 10:57:02 -0800 (Fri, 03 Nov 2006) | 3 lines

Test committer capabilities by making a small fix to comments
in OptimizerImpl.java

------------------------------------------------------------------------
r470909 | jta | 2006-11-03 09:18:43 -0800 (Fri, 03 Nov 2006) | 2 lines

DERBY-1986 Add Cryptographic Software Notice to the README.

------------------------------------------------------------------------
r470862 | rhillegas | 2006-11-03 07:51:16 -0800 (Fri, 03 Nov 2006) | 1 line

DERBY-1868: Point message writers to the website for guidance on how to write messages.
------------------------------------------------------------------------
r470636 | fuzzylogic | 2006-11-02 18:13:30 -0800 (Thu, 02 Nov 2006) | 3 lines

DERBY-2006: Refactor junit-oneclass target to set the jvm from a property,
and set the default to 'java' in junit-init.

------------------------------------------------------------------------
r470604 | fuzzylogic | 2006-11-02 15:50:58 -0800 (Thu, 02 Nov 2006) | 3 lines

DERBY-2006: Add a top-level Ant target that runs the junit tests and generates
a report.

------------------------------------------------------------------------
r470573 | kahatlen | 2006-11-02 14:39:53 -0800 (Thu, 02 Nov 2006) | 6 lines

DERBY-801 (partial) Allow parallel access to data files

DERBY-801-6.patch remedies the noise from the iosInProgress sanity
checking by checking the committed drop state before croaking.
Patch contributed by Anders Morken.

------------------------------------------------------------------------
r470492 | djd | 2006-11-02 11:53:26 -0800 (Thu, 02 Nov 2006) | 1 line

DERBY-2021 Fix ConcurrencyTest to run embedded and client.
------------------------------------------------------------------------
r470476 | djd | 2006-11-02 11:05:48 -0800 (Thu, 02 Nov 2006) | 2 lines

DERBY-2021 Fix DataSourceProperties and SURQueryMixTest to runs tests in client and embedded as needed.
Fix DataSourceProperties to actually run some tests.
------------------------------------------------------------------------
r470463 | djd | 2006-11-02 10:25:58 -0800 (Thu, 02 Nov 2006) | 2 lines

DERBY-2032 Convert MathTrigFunctionsTest to use PreparedStatements instead of many compiled Statements
and thus reduce execution time from eighty seconds to around ten seconds.
------------------------------------------------------------------------
r470434 | djd | 2006-11-02 09:26:44 -0800 (Thu, 02 Nov 2006) | 2 lines

DERBY-467 Add a new test for tesing security issues related to server side Java procedures and functions.
New test is lang.RoutineSecurityTest.
------------------------------------------------------------------------
r470418 | djd | 2006-11-02 09:04:12 -0800 (Thu, 02 Nov 2006) | 1 line

DERBY-2021 Fix SURTest.suite() to run client & embedded.
------------------------------------------------------------------------
r470372 | rhillegas | 2006-11-02 06:26:09 -0800 (Thu, 02 Nov 2006) | 1 line

DERBY-1993: Checkin derby-1993-v03.diff, which puts the demo classes in the org.apache.derbyDemo namespace.
------------------------------------------------------------------------
r470362 | kahatlen | 2006-11-02 05:47:30 -0800 (Thu, 02 Nov 2006) | 5 lines

DERBY-801 (partial) Allow parallel access to data files

Use Derby's own module loading mechanism to load RAFContainer4.
Patch contributed by Anders Morken.

------------------------------------------------------------------------
r470305 | kahatlen | 2006-11-02 02:04:21 -0800 (Thu, 02 Nov 2006) | 4 lines

DERBY-2005: Convert jdbcapi/Stream.java to JUnit

Clean-up patch contributed by Fernanda Pizzorno.

------------------------------------------------------------------------
r470294 | kahatlen | 2006-11-02 01:43:04 -0800 (Thu, 02 Nov 2006) | 6 lines

DERBY-2027: JUnit suite All crashes with OutOfMemoryError when running
LobLengthTest

Use LoopingAlphabetStream instead of ByteArrayInputStream to reduce
memory usage. Patch contributed by Kristian Waagan.

------------------------------------------------------------------------
r470233 | djd | 2006-11-01 20:57:18 -0800 (Wed, 01 Nov 2006) | 3 lines

DERBY-2021 (partial) Change ProcedureTest.suite() to run tests embedded and client. Cleanup
the creation of tables and procedures to use the decorateSQL method of CleanDatabaseTestSetup
rather than a test specific way to drop objects.
------------------------------------------------------------------------
r470223 | djd | 2006-11-01 20:17:20 -0800 (Wed, 01 Nov 2006) | 4 lines

DERBY-2021 (partial) Wrap each suite (embedded and client) in CleanDatabaseSetup when using the defaultSuite() method.
ResultSetCloseTest required this and it makes better sense than the single wrapping of both suites with a clean database
decorator.

------------------------------------------------------------------------
r470221 | djd | 2006-11-01 20:13:48 -0800 (Wed, 01 Nov 2006) | 2 lines

DERBY-2021 (partial) Fix UpdateXXXTest and ResultSetCloseTest suite() methods to run in client as well.

------------------------------------------------------------------------
r470152 | djd | 2006-11-01 16:56:32 -0800 (Wed, 01 Nov 2006) | 2 lines

DERBY-2005 converts the test jdbcapi/Stream.java to Junit.
Contributed by Fernanda Pizzorno fernanda.pizzorno@sun.com
------------------------------------------------------------------------
r470142 | djd | 2006-11-01 15:55:24 -0800 (Wed, 01 Nov 2006) | 3 lines

DERBY-1995 Add final base schema script, index.sql for additional indexes required by the test.
Added copy to the build target to copy the scripts to the classes folder.

------------------------------------------------------------------------
r470128 | rhillegas | 2006-11-01 14:52:42 -0800 (Wed, 01 Nov 2006) | 1 line

DERBY-1868: Commit Knut Anders' patch to point the compiler at antlibrary.dir rather than ant.home.
------------------------------------------------------------------------
r470024 | djd | 2006-11-01 10:32:58 -0800 (Wed, 01 Nov 2006) | 6 lines

DERBY-1974 Add utility method TestConfiguration.sqlAuthorizationDecorator to change the default
database to one that has SQL authorization mode enabled. Have PrepareExecuteDDL use this decorator
and add this test to lang._Suite. Fix a bug in assertDrainResults() where the wrong variable
was being used to check an assert.


------------------------------------------------------------------------
r470008 | rhillegas | 2006-11-01 09:43:29 -0800 (Wed, 01 Nov 2006) | 1 line

DERBY-1868: Delete generated messages_en.properties at clobber time. Teach subversion to ignore this generated file.
------------------------------------------------------------------------
r469975 | rhillegas | 2006-11-01 08:44:26 -0800 (Wed, 01 Nov 2006) | 1 line

DERBY-1868: Check in derby-1868-merged-v01.diff. This causes the Derby build to consume an xml file of message descriptors and generate the engine's messages_en.properties as well as the SQLState tables for the Reference Guide.
------------------------------------------------------------------------
r469965 | djd | 2006-11-01 08:22:51 -0800 (Wed, 01 Nov 2006) | 3 lines

DERBY-2028 add names to existing JUnit test suites without a name.
contributed by Kristian Waagan Kristian.Waagan@Sun.com

------------------------------------------------------------------------
r469713 | djd | 2006-10-31 16:05:24 -0800 (Tue, 31 Oct 2006) | 4 lines

DERBY-1758 Remove the old lang/xml_general.sql test and the corresponding master files.
That test has now been replaced by lang/XMLTypeAndOpsTest.java, which is a JUnit test.
Contributed by A B qozinx@gmail.com

------------------------------------------------------------------------
r469634 | djd | 2006-10-31 12:11:56 -0800 (Tue, 31 Oct 2006) | 1 line

DERBY-1975 Remove work in progress comments from DropDatabaseSetup.
------------------------------------------------------------------------
r469632 | djd | 2006-10-31 12:09:07 -0800 (Tue, 31 Oct 2006) | 2 lines

DERBY-1975 Enhance the single database decorator and DropDatabaseSetup to use a unique database name
and to drop the database at tearDown.
------------------------------------------------------------------------
r469594 | djd | 2006-10-31 10:21:42 -0800 (Tue, 31 Oct 2006) | 1 line

DERBY-1975 (partial) Add some incremental work to support a single use database for a test.
------------------------------------------------------------------------
r469591 | djd | 2006-10-31 10:13:00 -0800 (Tue, 31 Oct 2006) | 2 lines

Name the test suite in the jdbc4._Suite.

------------------------------------------------------------------------
r469588 | djd | 2006-10-31 10:05:31 -0800 (Tue, 31 Oct 2006) | 2 lines

DERBY-1970 Add initial performance test that uses the new JDBCPerfTestCase class.
Contributed by Sunitha Kambhampati ksunithaghm@gmail.com
------------------------------------------------------------------------
r469576 | djd | 2006-10-31 09:35:54 -0800 (Tue, 31 Oct 2006) | 1 line

DERBY-1987 (partial) Add build.xml files to hook order entry classes into build system.
------------------------------------------------------------------------
r469573 | djd | 2006-10-31 09:26:18 -0800 (Tue, 31 Oct 2006) | 2 lines

DERBY-1994 Add the interfaces to execute the business transactions and display the results for the order entry toolkit.

------------------------------------------------------------------------
r469572 | djd | 2006-10-31 09:23:16 -0800 (Tue, 31 Oct 2006) | 2 lines

DERBY-1994 (partial) Add the base POJO classes for the data objects in order entry test toolkit.

------------------------------------------------------------------------
r469567 | djd | 2006-10-31 09:18:43 -0800 (Tue, 31 Oct 2006) | 3 lines

DERBY-1970 Add JDBCPerfTestCase as initial step in adding performance tests to Derby's testing.
Contributed by Sunitha Kambhampati ksunithaghm@gmail.com

------------------------------------------------------------------------
r469410 | kahatlen | 2006-10-31 00:28:26 -0800 (Tue, 31 Oct 2006) | 6 lines

DERBY-1991: Misleading stack traces for exceptions raised by the JDBC
4.0 embedded driver

Don't set the stack trace of the SQLException to the stack trace of
the dummy exception in SQLExceptionFactory40.

------------------------------------------------------------------------
r469272 | djd | 2006-10-30 12:54:52 -0800 (Mon, 30 Oct 2006) | 2 lines

Remove the SQL tests moved to JUnit LangScripts from derbylang.

------------------------------------------------------------------------
r469215 | djd | 2006-10-30 10:12:15 -0800 (Mon, 30 Oct 2006) | 2 lines

Move a set of language SQL scripts from the old harness (derbylang suite) to the JUnit test LangScripts.
Tests moved are: aggbuiltin, comparisons, delete, insert, schemas, select, stringtypes, update, valuesclause, views.
------------------------------------------------------------------------
r469128 | kahatlen | 2006-10-30 03:45:56 -0800 (Mon, 30 Oct 2006) | 4 lines

DERBY-1979: Convert jdbcapi/characterStreams.java to JUnit

Patch contributed by Fernanda Pizzorno.

------------------------------------------------------------------------
r469102 | bernt | 2006-10-30 01:34:06 -0800 (Mon, 30 Oct 2006) | 1 line

DERBY-1953 Test changes. MODE DB2SQL removed from most tests
------------------------------------------------------------------------
r468803 | djd | 2006-10-28 18:34:56 -0700 (Sat, 28 Oct 2006) | 4 lines

DERBY-2007 Add a convenience method in DatabasePropertyTestSetup that returns a decorator
that sets up BUILTIN authentication with the passed in list of users. Use this for the NIST
test as seemed to be the intention under the old harness. Remove the remaining harness properties
files for the nist suite.
------------------------------------------------------------------------
r468696 | bpendleton | 2006-10-28 09:15:09 -0700 (Sat, 28 Oct 2006) | 9 lines

DERBY-2008: NPE with 2-arg SUBSTR call in GROUP BY clause

This patch was contributed by Yip Ng (yipng168@gmail.com)

For SUBSTR function, there can be 2 or 3 arguments, and in the
case of 2-args, the rightOperand of the TernaryOperatorNode will
be null. In its isEquivalent() method, it did not take care of
this case; thus, the NPE.

------------------------------------------------------------------------
r468605 | bpendleton | 2006-10-27 18:00:44 -0700 (Fri, 27 Oct 2006) | 18 lines

DERBY-1758: Enable xmlSuite to run as part of derbyall for qualified JVMs

This patch was contributed by A B (qozinx@gmail.com)

I'm attaching another patch, d1758_followup_v1.patch, that moves the XML
utility methods out of junit.JDBC and into a new class, junit.XML, per Dan's
suggestion (thanks Dan).

Note that I changed the "haveClass()" method in JDBC.java from private to
protected so that it can be called from the junit.XML class.  That was the
easiest thing to do. 

Since checking the classpath is not a JDBC-specific operation, the other
option is to move "haveClass()" to some other class in the junit package.  If
anyone indicates a preference for doing so and also indicates the class to
which the method should be moved, I can do it this way.  Otherwise I'll just
leave it as it is (i.e. keep it in JDBC.java and make it protected).

------------------------------------------------------------------------
r468563 | djd | 2006-10-27 15:24:42 -0700 (Fri, 27 Oct 2006) | 2 lines

DERBY-1930 Apply corrections noted in comments by Dag H. Wanvik in DERBY-1930.

------------------------------------------------------------------------
r468561 | djd | 2006-10-27 15:19:54 -0700 (Fri, 27 Oct 2006) | 3 lines

DERBY-1930 (partial) Initial addition of information from JDBC paper on the web-site
onto the JDBC package.html page for Derby's published Javadoc.

------------------------------------------------------------------------
r468553 | djd | 2006-10-27 14:52:38 -0700 (Fri, 27 Oct 2006) | 2 lines

DERBY-2007 (partial) Remove old properties files used by old harness for the NIST suite.

------------------------------------------------------------------------
r468517 | djd | 2006-10-27 13:09:00 -0700 (Fri, 27 Oct 2006) | 2 lines

DERBY-2007 (partial) Update readme to reflect switch to JUnit for NIST suite.

------------------------------------------------------------------------
r468514 | djd | 2006-10-27 13:04:21 -0700 (Fri, 27 Oct 2006) | 4 lines

DERBY-2007 (partial) Switch NIST suite over to Junit. Removed from old harness suites and added NistScripts
into lang._Suite. Added constraint names to various DDL statements in the nist SQL scripts to produce
constant output. Modify the .out files to match the output under JUnit, including not removing blank lines.
Still cleanup to do including modifying the readme to reflect changes.
------------------------------------------------------------------------
r468503 | bpendleton | 2006-10-27 12:17:28 -0700 (Fri, 27 Oct 2006) | 34 lines

DERBY-1758: Enable xmlSuite to run as part of derbyall for qualified JVMs

This patch was contributed by A B (qozinx@gmail.com)

This patch adds two JUnit tests to lang/_Suite.java. The first test,
XMLTypeAndOpsTest.java, is meant to be a JUnit equivalent to the current
lang/xml_general.sql test. The second test, XMLMissingClassesTest,
tests the behavior of the SQL/XML operators when the required JAXP
or Xalan classes are not in the classpath.

The XML classes can be provided in any of a number of ways:
1) bundled into the JVM
2) installed as endorsed libraries
3) specified in the classpath
Hand-testing was performed to ensure that the new JUnit tests perform
correctly in these various configurations.

If the tests are run in an environment which does not support the XML
features, the tests quietly do nothing.

The patch, d1758_newJUnitTests_v2.patch, also adds a new utility method
and some associated state to JDBC.java for checking two things:
1) that the classpath has JAXP and Xalan classes, and
2) if the classpath has Xalan, check that the version of Xalan meets
the minimum requirement for use of Derby SQL/XML operators.
These methods/flags are then used to determine when to run the new
XML JUnit tests.

NOTE: After this patch has been reviewed/updated and finally committed
I will post a separate patch to remove the old lang/xml_general.sql test
and the corresponding master files. I will then continue addressing the
rest of the tasks for this issue (esp. xmlBinding.java) in incremental fashion.


------------------------------------------------------------------------
r468502 | djd | 2006-10-27 12:06:19 -0700 (Fri, 27 Oct 2006) | 3 lines

DERBY-2007 (partial) Improve CleanDatabaseTestSetup to handle tables in a dependency loop due
to foreign key constraints and simple cases for objects that are dependent across schemas.

------------------------------------------------------------------------
r468448 | djd | 2006-10-27 09:40:08 -0700 (Fri, 27 Oct 2006) | 3 lines

DERBY-2007 (partial) Add setting the lock timeouts for the Nist scripts to match the behaviour under the old harness.
NistScripts is still a work in  progress.

------------------------------------------------------------------------
r468447 | djd | 2006-10-27 09:34:24 -0700 (Fri, 27 Oct 2006) | 5 lines

DERBY-2007 (partial) The dropping of tables in CleanDatabaseTestSetup needs to be smarter for
the nist suite since it has tables that depend on each other. This is an incremental change
that copes with tables in the same schema depending on each other except when two tables
reference each other.

------------------------------------------------------------------------
r468296 | kahatlen | 2006-10-26 23:36:03 -0700 (Thu, 26 Oct 2006) | 26 lines

DERBY-1989: Convert jdbc4/TestDbMetaData.java to JUnit

The new TestDbMetaData tests everything the old one did, except for
the constants in JDBC40Translation. All but one of them are already
tested in JDBC40TranslationTest, and the patch adds the missing one to
that test.

The patch also makes a couple of small changes in junit/JDBC.java:

  * assertColumnNames:
      - declare it as "throws SQLException" instead of "throws
        Exception"
      - changed order in call to Assert.assertEquals() so that errors
        are not shown with expected/actual mixed up.

  * assertRowInResultSet:
      - since a result set can contain values that vary slightly from
        time to time (for instance, identifiers which contain
        timestamps), one needs a way to accept different values for a
        column. With a small change (only changing the order of a call
        to equals()), it was possible to give assertRowInResultSet()
        an object whose equals() method returned true for all
        acceptable values. This makes it possible to use
        assertRowInResultSet() where the old harness used sed scripts
        to filter out varying values.

------------------------------------------------------------------------
r468209 | djd | 2006-10-26 17:31:25 -0700 (Thu, 26 Oct 2006) | 2 lines

DERBY-2003 Add a utility method to allow setting the lock timeouts as a decorator building off DatabasePropertyTestSetup.
Use this decorator in BlobClob4Blob to reduce the wait time.
------------------------------------------------------------------------
r468102 | rhillegas | 2006-10-26 12:36:44 -0700 (Thu, 26 Oct 2006) | 1 line

DERBY-1377: Remove copyright headers from nist sql scripts and canons.
------------------------------------------------------------------------
r468067 | djd | 2006-10-26 10:19:21 -0700 (Thu, 26 Oct 2006) | 3 lines

DERBY-1952 (partial) Change CanonTestCase to not ignore blank lines in the output. The skipping of blank lines in
the old harness was probably due to the use of sed. Skipping blank lines makes it harder to create a new master
file from the output.
------------------------------------------------------------------------
r468046 | djd | 2006-10-26 08:50:47 -0700 (Thu, 26 Oct 2006) | 2 lines

DERBY-1952 (partial) Remove the SQL lang tests from the old harness that are run by the JUnit test LangScripts.

------------------------------------------------------------------------
r467793 | rhillegas | 2006-10-25 15:25:46 -0700 (Wed, 25 Oct 2006) | 1 line

DERBY-1377: Add copyright headers to sql test scripts. Adjust canons accordingly.
------------------------------------------------------------------------
r467755 | djd | 2006-10-25 13:45:18 -0700 (Wed, 25 Oct 2006) | 2 lines

Add test suite names to NistScripts (which is still under development).

------------------------------------------------------------------------
r467612 | kahatlen | 2006-10-25 04:52:05 -0700 (Wed, 25 Oct 2006) | 5 lines

DERBY-815: Prevent unneeded object creation and excessive decoding in
parseSQLDTA_work()

Patch contributed by Dyre Tjeldvoll.

------------------------------------------------------------------------
r467578 | kahatlen | 2006-10-25 00:44:55 -0700 (Wed, 25 Oct 2006) | 4 lines

DERBY-912: OutOfMemory error on continuous execution of SQL statement

Reuse free sort identifiers.

------------------------------------------------------------------------
r467522 | davidvc | 2006-10-24 17:19:57 -0700 (Tue, 24 Oct 2006) | 2 lines

Fixed to point to the correct download site for JUnit 3.8.1

------------------------------------------------------------------------
r467474 | djd | 2006-10-24 13:45:07 -0700 (Tue, 24 Oct 2006) | 1 line

DERBY-1995 (partial) Add SQL scripts to create tables, primary key and foreign key constraints for order entry testkit.
------------------------------------------------------------------------
r467473 | djd | 2006-10-24 13:45:03 -0700 (Tue, 24 Oct 2006) | 1 line

DERBY-1995 (partial) Add SQL scripts to create tables, primary key and foreign key constraints for order entry testkit.
------------------------------------------------------------------------
r467309 | tmnk | 2006-10-24 04:20:47 -0700 (Tue, 24 Oct 2006) | 1 line

- DERBY-1990 Make writeEncryptedScalarStream and writePlainScalarStream methods in org.apache.derby.client.net.Request as private - Patch by Tomohito Nakayama (tomonaka@basil.ocn.ne.jp)
------------------------------------------------------------------------
r466940 | kahatlen | 2006-10-22 23:39:18 -0700 (Sun, 22 Oct 2006) | 2 lines

DERBY-1988: Convert jdbc4/TestJDBC40Exception.java to JUnit

------------------------------------------------------------------------
r466390 | kahatlen | 2006-10-21 05:42:38 -0700 (Sat, 21 Oct 2006) | 2 lines

Removed outdated comment. There are no RowId classes in the Derby code.

------------------------------------------------------------------------
r466279 | suresht | 2006-10-20 15:22:24 -0700 (Fri, 20 Oct 2006) | 8 lines

DERBY-1925 : (Add re-encrytion  of database test cases to the upgrade test.)

Merged fix (r452682) from 10.2 branch to trunk. 

This patch adds test cases to the upgrade test to test encryption of an
un-encrypted database and re-encryption of encrypted database.


------------------------------------------------------------------------
r466221 | suresht | 2006-10-20 11:07:36 -0700 (Fri, 20 Oct 2006) | 14 lines

DERBY-1240 ( creating /restoring a db from backup using createFrom with log at 
             different location copies the log from backup to the db dir also).

Problem was restore code in the RawStore was copying all the files that does 
not exist in the database directory after the restore was completed by the 
data factory and log factory boot methods. Because the log is placed at
different location when an external log location is specified, the log
directory does not exist in the database directory. In this case code in the 
RawStore was incorrectly copying log files also because the log directory does 
not exist in the database directory. This patch fixes the problem by restoring
only the files that are not restored by the other factories. Currently, they
are jar files in the database and backup history file.
 

------------------------------------------------------------------------
r465935 | djd | 2006-10-19 16:34:10 -0700 (Thu, 19 Oct 2006) | 1 line

DERBY-1976 Improvements in the utility JUnit JDBC methods.
------------------------------------------------------------------------
r465694 | kahatlen | 2006-10-19 10:48:44 -0700 (Thu, 19 Oct 2006) | 4 lines

DERBY-1962: Convert jdbcapi/resultsetJdbc30.java to junit

Patch contributed by Fernanda Pizzorno.

------------------------------------------------------------------------
r465673 | djd | 2006-10-19 09:34:22 -0700 (Thu, 19 Oct 2006) | 1 line

DERBY-1976 New & modified utility methods for JDBC JUnit tests to aid conversions of SQL script tests.
------------------------------------------------------------------------
r465601 | kahatlen | 2006-10-19 05:16:12 -0700 (Thu, 19 Oct 2006) | 4 lines

DERBY-1895: Convert jdbcapi/blobclob4BLOB.java to JUnit

Patch contributed by Fernanda Pizzorno.

------------------------------------------------------------------------
r465249 | tmnk | 2006-10-18 06:47:19 -0700 (Wed, 18 Oct 2006) | 1 line

- DERBY-1535 Trial 2 for DERBY-550, improve use of Engine from NetworkServer and reduce memory usage - Replacing call of setByte() to call of setBinaryInputStream(), which was room to improvement in DERBY-1559. - Patch by Tomohito Nakayama (tomonaka@basil.ocn.ne.jp)
------------------------------------------------------------------------
r465122 | bpendleton | 2006-10-17 18:43:14 -0700 (Tue, 17 Oct 2006) | 41 lines

DERBY-1967: UNION (ALL) constraint violation problem

This patch was contributed by Yip Ng (yipng168@gmail.com)

In the bind phase of ConditionalNode (NULLIF), the CAST node is
generated on top of the untyped NULL and it gets the data type
descriptor(DTD) of the left operand. However, the CAST node should
have DTD where its value can be nullable.

BinaryComparisonOperatorNode bcon = (BinaryComparisonOperatorNode)testCondition;

QueryTreeNode cast = getNodeFactory().getNode(
C_NodeTypes.CAST_NODE,
thenElseList.elementAt(0),
bcon.getLeftOperand().getTypeServices(), <=== not nullable!
getContextManager());

The second query:

select nullif('x','x') as f0, f1 from a
   union all
   select nullif('x','x') as f0, nullif(1,1) as f1 from b;

works because it didn't generate a NormalizedResultSet on top of
the PRN on the right hand side of the union since the datatype and
length matches. So it didn't hit the path where it does additional
checking at execution time.

For the first query:

select nullif('x','x') as f0, f1 from a
   union all
   select nullif('x','x') as f0, nullif('x','x') as f1 from b;

The union result column's length does not match with the right hand
side result column, so it generated a NormalizedResultSet on top of
the RHS of the union. When the system retrieves the row from
NormalizedResultSet at execution time, the normalize method is called
on the DTD and checks if the source is NULL and whether its DTD
is not nullable. In this case, the SQLSTATE 23502 is thrown. 

------------------------------------------------------------------------
r465020 | djd | 2006-10-17 12:55:53 -0700 (Tue, 17 Oct 2006) | 3 lines

DERBY-1897 Removed the load of DataSourcePropertiesTest from jdbcapi._Suite for J2ME
by requiring that JDBC 3 be supported for that test.

------------------------------------------------------------------------
r464999 | djd | 2006-10-17 11:45:55 -0700 (Tue, 17 Oct 2006) | 3 lines

DERBY-1952 (partial) DERBY-1971 (partial) Change more of the tests run from jdbcapi._Suite to return suites
that run in embedded and client as primary configurations. Name some of the TestSuites returned from TestConfiguration
to make the hierarchy view in the Swing Test Runner more useful.
------------------------------------------------------------------------
r464970 | suresht | 2006-10-17 10:32:03 -0700 (Tue, 17 Oct 2006) | 11 lines

DERBY-1953 (Make FOR EACH clause and MODE DB2SQL in CREATE TRIGGER 
           statement optional)

Patch Contributed by Yip Ng.

This patch makes the FOR EACH clause optional in CREATE TRIGGER
statement. Since the changes are mainly in the trigger definition of
sqlgrammar.jj file and to make this backward compatibile with previous 
releasesof Derby, I also addressed DERBY-1770, Make MODE DB2SQL optional.


------------------------------------------------------------------------
r464785 | djd | 2006-10-16 20:48:49 -0700 (Mon, 16 Oct 2006) | 4 lines

DERBY-1952 (partial) Add some utility methods in TestConfiguration to allow test classes to easily implement
suite() methods that run in embedded and/or client server.
Convert some tests to use these utility methods. Change NetworkServerTestSetup to create a server console
output file in the logs folder in append mode.
------------------------------------------------------------------------
r464644 | djd | 2006-10-16 12:56:01 -0700 (Mon, 16 Oct 2006) | 2 lines

DERBY-1952 (partial) Remove the _Suite tests from the old harness suites in order to allow faster
conversion of them to Junit suites that run successfully in standalone mode.
------------------------------------------------------------------------
r464610 | djd | 2006-10-16 11:24:53 -0700 (Mon, 16 Oct 2006) | 3 lines

DERBY-1791 Setup the policy file and security manager setup so that the system property
derbyTesting.testjarpath describes the file location of derbyTesting.jar so that ij
can be given permission to read its contents. This is to access the SQL scripts within the resource.
------------------------------------------------------------------------
r464607 | djd | 2006-10-16 11:19:53 -0700 (Mon, 16 Oct 2006) | 4 lines

DERBY-1952 (partial) Setup methods in TestConfiguration to allow tests' suite() methods to add tests that
run in the client/server configuration. Change TimeHandlingTest and LangScripts to use these methods
so that by themselves they run embedded and network server tests.
Remove the Client and Embedded top-level suites as that choice is now driven into a test itself.
------------------------------------------------------------------------
r464592 | djd | 2006-10-16 11:00:47 -0700 (Mon, 16 Oct 2006) | 1 line

Remove unused import from CleanDatabaseTestSetup
------------------------------------------------------------------------
r464551 | bpendleton | 2006-10-16 09:32:50 -0700 (Mon, 16 Oct 2006) | 22 lines

DERBY-737: SYSCS_UTIL.SYSCS_COMPRESS_TABLE should create statistics

This patch was contributed by Mamta A. Satoor (msatoor@gmail.com)

The changes have been very localized in
AlterTableConstantAction.java!updateIndex(). Currently, this method checks
if statistics already exist for an index. If yes, then it sets a flag
updateStatistics to true. Later, the code checks for this flag and drops
the existing statistics and creates new statistics for that index provided
the user table at this point is not empty. So, as we can see, if there is
an index with no preexisting statistics, the flag updateStatistics will be
set to false and hence no statistics related code is executed and hence
even though the user table is not empty at the time of compress, no
statistics get generated for such an index.

I am proposing to fix the problem by still using the flag to see if
an index has pre-existing statistics. If yes, then we should drop
those statistics. Next, whether the index has pre-existing statistics or
not, go ahead and create new statistics for the index provided the
user table is not currently empty.


------------------------------------------------------------------------
r464504 | bernt | 2006-10-16 07:16:43 -0700 (Mon, 16 Oct 2006) | 1 line

DERBY-1893 Convert largedata/lobLengthTests.java to junit. Comitted by ?\195?\152ystein Gr?\195?\184vlen
------------------------------------------------------------------------
r464215 | bpendleton | 2006-10-15 08:35:27 -0700 (Sun, 15 Oct 2006) | 28 lines

DERBY-630: CREATE TRIGGER fails with null pointer exception

This patch was contributed by Yip Ng (yipng168@gmail.com)

The current implementation for CREATE TRIGGER needs to handle null compilation
schema. A compilation schema with null value indicates that the
trigger action statement text does not depend on the current schema. This means:

1. It is safe to compile this statement in any schema since there is no dependency with
    the CURRENT SCHEMA. i.e.: All relevent fields are qualified with a specific schema.

2. The statement cache mechanism can utilize this piece of information to enable
    better statement plan sharing across different schemas; thus, avoiding unnecessary
    statement compilation.

 
So the proposal is:

a) Allow null compilation schema. The system catalog first needs to change the
   compiliation schema id column of SYS.SYSSTATEMENTS and SYS.SYSVIEWS system
   table's nullability to true. This would also require a soft upgrade for the
   previous versions of Derby. This step will resolve the NPE problem of this jira.

b) Handle null compilation schema in statement preparation logic. This can be filed
   as a separate jira as improvement. It may require some work on the SQL parser to
   determine whether the compiled statement depends on the CURRENT SCHEMA or not, so
   that the compilation schema can be properly set. 

------------------------------------------------------------------------
r464202 | tmnk | 2006-10-15 07:36:41 -0700 (Sun, 15 Oct 2006) | 1 line

- DERBY-1942 There exists difference between behavior of setNull(Types.TIME) and setTiime(null) - Patch by Tomohito Nakayama (tomonaka@basil.ocn.ne.jp)
------------------------------------------------------------------------
r464078 | bpendleton | 2006-10-14 17:29:29 -0700 (Sat, 14 Oct 2006) | 11 lines

DERBY-183: Allow unnamed parameters in CREATE FUNCTION

This patch was contributed by James F. Adams (derby@xemaps.com)

The lookahead in the grammar of my previous patches did not work for some
parameter types. I have reworked the lookahead to use syntactic lookahead
similar to that used elsewhere in the grammar. I have included an additional
test that would have failed with the previous patch. I have run the
lang/functions.sql and lang/procedure.java using the various frameworks
without error.

------------------------------------------------------------------------
r463982 | bpendleton | 2006-10-14 10:00:54 -0700 (Sat, 14 Oct 2006) | 47 lines

DERBY-183: Allow unnamed parameters in CREATE FUNCTION

This patch was contributed by James F. Adams (derby@xemaps.com)

The patch does the following:

1) Modifies java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
    a) Initializes parameterName to "" in procedureParameterDefinition
       and functionParameterDefinition
    b) Makes parameterName optional in procedureParameterDefinition
       and functionParameterDefinition

2) Modifies java/engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java
   to ignore function and procedure parameter names equal to "" when
   checking for duplicate parameter names. 

Tests have been added to lang/functions.sql and lang/procedure.java. 

The parameter name is made optional by surrounding its production with [].

This changes the grammar from:

parameterName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true)
  typeDescriptor = dataTypeDDL()

to:

        [ parameterName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true) ]
        typeDescriptor = dataTypeDDL()

This results in a choice conflict because certain tokens satisfy both
identifier() and dataTypeDDL(). An additional token of lookahead resolves
this conflict. This results in:

        [ LOOKAHEAD(2) parameterName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true) ]
        typeDescriptor = dataTypeDDL()

Expressing this in an alternate form such as:

        (
                parameterName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true)
                typeDescriptor = dataTypeDDL()
        ) | typeDescriptor = dataTypeDDL()

still results in a choice conflict so I opted for the more compact form.


------------------------------------------------------------------------
r463565 | kahatlen | 2006-10-12 22:55:18 -0700 (Thu, 12 Oct 2006) | 7 lines

DERBY-1956: Remove stale code from the statement classes in the client driver

The patch removes escapedProcedureCallWithResult_ and all code that is
only executed when the flag is true. It also removes a couple of
methods that became no-ops, and SQLStates and messages that are never
used.

------------------------------------------------------------------------
r462784 | kahatlen | 2006-10-11 05:07:24 -0700 (Wed, 11 Oct 2006) | 23 lines

DERBY-1610: Resolve difference of type compatibility between Embedded
and NetworkServer/NetworkDriver

Fixed failures in the JDBC 4.0 tests. Description of the patch:

  * Check for unsupported types before checking incompatibilities
    since JDBC 4.0 specifies that SQLFeatureNotSupportedException
    should be raised for certain types if they are unsupported.

  * Change timing of calls to checkForClosedStatement() to make
    ClosedObjectTest get the expected SQLState when the statement is
    closed.

  * Add type checking to the JDBC 4.0 length-less blob/clob overloads.

  * Since the type checking already checks for closed statement and
    invalid parameter index, remove those tests from
    checkSetterPreconditions(). Since the only code that is left in
    checkSetterPreconditions() after the removal of those checks is a
    call to checkForEscapedCallWithResult(), replace all calls to
    checkSetterPreconditions() with calls to
    checkForEscapedCallWithResult().

------------------------------------------------------------------------
r462607 | mikem | 2006-10-10 15:23:45 -0700 (Tue, 10 Oct 2006) | 15 lines

DERBY-1785
contributed by Myrna van Lunteren
patch: DERBY-1785_20061007.diff

Attaching a band-aid patch for this issue. I chose to comment out the method 
rather than remove as a way to document the quirky behavior.

Having the method setSecurityProps overload the one in jvm.java causes 
problems when running the junit tests - they *do* successfully run with 
securityManager.
Foundation class tests actually run ok with security manager - except when 
useprocess is false. This is caused by a bug in the jvm. See also DERBY-885.



------------------------------------------------------------------------
r462556 | mikem | 2006-10-10 13:52:49 -0700 (Tue, 10 Oct 2006) | 8 lines

DERBY-1829
contributed by Myrna van Lunteren

Skipping this test with foundation...Triggers are not officially supported with that jvm.

This patch should also go into 10.2.


------------------------------------------------------------------------
r454623 | mikem | 2006-10-09 22:40:37 -0700 (Mon, 09 Oct 2006) | 6 lines

DERBY-1939

Bug was already fixed in trunk, merging added tests and new sanity
check from 10.1 codeline to trunk.


------------------------------------------------------------------------
r454312 | tmnk | 2006-10-09 01:54:58 -0700 (Mon, 09 Oct 2006) | 1 line

- DERBY-1610 Resolve difference of type compatibility between Embedded and NetworkServer/NetworkDriver - adjust index for parameter using checkForEscapedCallWithResult method. - Patch by Tomohito Nakayama (tomonaka@basil.ocn.ne.jp)
------------------------------------------------------------------------
r454269 | davidvc | 2006-10-08 21:02:59 -0700 (Sun, 08 Oct 2006) | 2 lines

Fixed days of week, should only be seven days.

------------------------------------------------------------------------
r454098 | tmnk | 2006-10-08 00:41:08 -0700 (Sun, 08 Oct 2006) | 1 line

- DERBY-1610 Resolve difference of type compatibility between Embedded and NetworkServer/NetworkDriver - Fix to resolve error in jdk13 test of compatibility suite - Patch by Tomohito Nakayama (tomonaka@basil.ocn.ne.jp)
------------------------------------------------------------------------
r454069 | fuzzylogic | 2006-10-07 20:52:56 -0700 (Sat, 07 Oct 2006) | 5 lines

DERBY-1941: Include derbyrun.jar in list of jars needed in the classpath for
testing in java/testing/README.htm

Committed for James F. Adams <derby@xemaps.com>

------------------------------------------------------------------------
r453935 | mikem | 2006-10-07 08:33:24 -0700 (Sat, 07 Oct 2006) | 32 lines

DERBY-1716
contributed by Yip Ng
patch: derby1716-trunk-diff03.txt

Unlike other descriptors, when privilege(s) get revoked from user,
the statement is not subject to recompilation, so then we are back to square one
since the previous patch attempts to bring in the permission descriptor(s) into
the permission cache at compilation time to avoid reading from system tables at
execution time.

I believe the proper proposal fix is to use internal nested read-only transaction
when the system is reading permission descriptors from the system tables. At a
high level, a statement undergoes the following typical steps for it to get executed
by the system:

1. Statement Compilation Phase
a) Parse the statement
b) Bind the statement and collects required permissions for it to be executed.
c) Optimize the statement
d) Generate the activation for the statement


2. Statement Execution Phase
a) Check if the authoration id has the required privileges to execute the statement.
b) Execute the statement


The problem lies in permissions checking step at statement execution phase. Before a statement can be executed in SQL authorization mode, the authorization id's privileges needs to be check against the permission cache or if the privileges are not available in the cache, the system needs to read this metadata information from the system tables. But the system is using *user transaction* to do this, so the shared locks that got acquired by the user transaction may not get released immediately; therefore, leading to lock timeout when the grantor attempts to revoke the user's privilege. To resolve this issue, the system now will start an internal read-only nested transaction(same lock space as the parent transaction) to read permission related info from the system tables and release the shared locks
as soon as the permissions check is completed before statement execution. This tackles the root of the stated problem. 



------------------------------------------------------------------------
r453922 | tmnk | 2006-10-07 07:54:57 -0700 (Sat, 07 Oct 2006) | 1 line

- DERBY-1610 Resolve difference of type compatibility between Embedded and NetworkServer/NetworkDriver - Updated missed 2 master files. - Patch by Tomohito Nakayama (tomonaka@basil.ocn.ne.jp)
------------------------------------------------------------------------
r453913 | rhillegas | 2006-10-07 07:14:19 -0700 (Sat, 07 Oct 2006) | 1 line

DERBY-1940: Remove Ease of Development to conform to recent changes to the JDBC4 api.
------------------------------------------------------------------------
r453886 | tmnk | 2006-10-07 04:24:06 -0700 (Sat, 07 Oct 2006) | 1 line

- DERBY-1610 Resolve difference of type compatibility between Embedded and NetworkServer/NetworkDriver - Patch by Tomohito Nakayama (tomonaka@basil.ocn.ne.jp)
------------------------------------------------------------------------
r453845 | davidvc | 2006-10-06 21:59:28 -0700 (Fri, 06 Oct 2006) | 2 lines

DERBY-1936 - LocalCalendar Sample Application

------------------------------------------------------------------------
r453655 | rhillegas | 2006-10-06 09:09:14 -0700 (Fri, 06 Oct 2006) | 1 line

DERBY-1921: Bring STATUS file uptodate with recent release of 10.2.1.6.
------------------------------------------------------------------------
r453420 | bpendleton | 2006-10-05 16:11:32 -0700 (Thu, 05 Oct 2006) | 33 lines

DERBY-1489: Provide ALTER TABLE DROP COLUMN functionality

This patch provides support for ALTER TABLE t DROP COLUMN c.

The patch modifies the SQL parser so that it supports statements of the form:

  ALTER TABLE t DROP [COLUMN] c [CASCADE|RESTRICT]

If you don't specify CASCADE or RESTRICT, the default is CASCADE.

If you specify RESTRICT, then the column drop will be rejected if it would
cause a dependent view, trigger, check constraint, unique constraint,
foreign key constraint, or primary key constraint to become invalid.

Currently, column privileges are not properly adjusted when dropping a
column. This is bug DERBY-1909, and for now we simply reject DROP COLUMN
if it is specified when sqlAuthorization is true. When DERBY-1909 is fixed,
the tests in altertableDropColumn.sql should be merged into altertable.sql,
and altertableDropColumn.sql (and .out) should be removed.

This new feature is currently undocumented. DERBY-1926 tracks the documentation
changes necessary to document this feature.

The execution logic for ALTER TABLE DROP COLUMN is in AlterTableConstantAction,
and was not substantially modified by this change. The primary changes to
that existing code were:
 -  to hook RESTRICT processing up to the dependency manager so that
    dependent view processing was sensitive to whether the user
    had specified CASCADE or RESTRICT
 -  to reread the table descriptor from the catalogs after dropping all the
    dependent schema objects and before compressing the table, so that the
    proper scheman information was used during the compress.

------------------------------------------------------------------------
r453395 | djd | 2006-10-05 14:40:18 -0700 (Thu, 05 Oct 2006) | 6 lines

DERBY-1732 1. Make change to GenericStatementContext.isLastHandler() so it will return false for JVM errors thus
allowing the outer contexts to take corrective action.
2. Store transaction context treats JVM errors as session severity. To ensure consistency,
map severity for non StandardException instances to be SESSION_SEVERITY in GenericLanguageContext,
and GenericStatementContext.
Patch contributed by  Sunitha Kambhampati ksunithaghm@gmail.com
------------------------------------------------------------------------
r453352 | mikem | 2006-10-05 13:15:41 -0700 (Thu, 05 Oct 2006) | 11 lines

DERBY-1847
contributed by Mamta Satoor
patch: DERBY1846_V1_diff_AddColumnAndGrantRevoke.txt

 To recap the problem, in SQL Authorization mode, when a new column is added to a table, the rows in SYSCOLPERMS for the table in question were not getting updated to incorporate the new column. This caused ASSERT failure when a non-table owner attempted to select the new column. 

 Some background information on system table involved: SYSCOLPERMS keeps track of column level privileges on a given table. One of the columns in SYSCOLPERMS is "COLUMNS" and it has a bit map to show which columns have the given permission granted on them. When a new column is added to the user table, the "COLUMNS" need to be expanded by one bit and that bit should be initialized to zero since no privileges have been granted on that column at the ALTER TABLE...ADD COLUMN time. 

 I have fixed this problem by having AlterTableConstantAction.addNewColumnToTable call the new method in DataDictionary called updateSYSCOLPERMSforAddColumnToUserTable. At this point, we know of only the TableDescriptor's uuid which can help us determine all the rows in SYSCOLPERMS for that given table uuid. I get ColPermsDescriptor for each one of those rows and then use the ColPermsDescriptor's uuid to update the "COLUMNS" column so SYSCOLPERMS is aware of the newly added column in user table. This fixes the problem because at the time of SELECT, when we do privilege lookup in SYSCOLPERMS, we have info on the newly added column. 


------------------------------------------------------------------------
r452983 | kahatlen | 2006-10-04 12:13:47 -0700 (Wed, 04 Oct 2006) | 4 lines

DERBY-1889: Convert jdbcapi/lobStreams.java to JUnit

Removed unused master file.

------------------------------------------------------------------------
r452832 | kahatlen | 2006-10-04 04:02:21 -0700 (Wed, 04 Oct 2006) | 10 lines

DERBY-1910: OutOfMemoryError happens when jdbcapi/_Suite.junit was
executed as DerbyNetClient (in jvm1.4.2)

The problem was being caused by some of the tests that kept a
reference to a connection object which prevented this object from
being garbage collected. The attached patch (derby-1910.diff) fixes
that problem.

Patch contributed by Fernanda Pizzorno.

------------------------------------------------------------------------
r452609 | rhillegas | 2006-10-03 13:36:30 -0700 (Tue, 03 Oct 2006) | 1 line

DERBY-1921: Miscellaneous improvements to the STATUS file.
------------------------------------------------------------------------
r452259 | mikem | 2006-10-02 16:23:04 -0700 (Mon, 02 Oct 2006) | 9 lines

DERBY-1894
contributed by Yip Ng
patch: derby1894-trunk-diff02.txt

The fix is in FromBaseTable's getFromTableByName() method, where it is using 
the resolved synonym table name to do the binding for ORDER BY column. 
Patch includes additional tests.


------------------------------------------------------------------------
r451704 | fuzzylogic | 2006-09-30 18:05:01 -0700 (Sat, 30 Sep 2006) | 2 lines

DERBY-1900: Force execute bit on scripts, attempt number 2.

------------------------------------------------------------------------
r451548 | fuzzylogic | 2006-09-29 23:24:00 -0700 (Fri, 29 Sep 2006) | 2 lines

Add toursdb.xml and toursdb_readme.html to -src distribution.

------------------------------------------------------------------------
r451466 | fuzzylogic | 2006-09-29 14:47:08 -0700 (Fri, 29 Sep 2006) | 2 lines

DERBY-1900: Force filemode on files in -bin to have execute bit.

------------------------------------------------------------------------
r451432 | rhillegas | 2006-09-29 14:01:26 -0700 (Fri, 29 Sep 2006) | 1 line

DERBY-1885: Remove spurious derby.logs from the source distributions.
------------------------------------------------------------------------
r451363 | rhillegas | 2006-09-29 10:53:49 -0700 (Fri, 29 Sep 2006) | 1 line

DERBY-1899: Fix the release generation problems which Andrew found in the source distributions.
------------------------------------------------------------------------
r451255 | kahatlen | 2006-09-29 05:06:36 -0700 (Fri, 29 Sep 2006) | 4 lines

DERBY-1889: Convert jdbcapi/lobStreams.java to JUnit

Patch contributed by Fernanda Pizzorno.

------------------------------------------------------------------------
r451147 | bernt | 2006-09-29 00:48:47 -0700 (Fri, 29 Sep 2006) | 1 line

DERBY-729 Scalar time and date functions return 0 instead NULL when argument is NULL. Submitted by Bernt M. Johnsen
------------------------------------------------------------------------
r451065 | fuzzylogic | 2006-09-28 17:01:16 -0700 (Thu, 28 Sep 2006) | 2 lines

DERBY-1593: Fix paths for test jars inside of lib-debug distribution.

------------------------------------------------------------------------
r450950 | djd | 2006-09-28 11:06:46 -0700 (Thu, 28 Sep 2006) | 1 line

Minor cleanup of query tree ConstantNodes, removing some unused code.
------------------------------------------------------------------------
r450738 | fuzzylogic | 2006-09-28 00:41:58 -0700 (Thu, 28 Sep 2006) | 4 lines

DERBY-1844: Sed out exception diff in blobclob4BLOB.java

Committed for Myrna Van Lunteren <m.v.lunteren@gmail.com>

------------------------------------------------------------------------
r450736 | fuzzylogic | 2006-09-28 00:39:13 -0700 (Thu, 28 Sep 2006) | 4 lines

DERBY-1841: Update lang/groupBy.sql masters for j9.

Committed for Myrna Van Lunteren <m.v.lunteren@gmail.com>

------------------------------------------------------------------------
r450687 | fuzzylogic | 2006-09-27 21:32:41 -0700 (Wed, 27 Sep 2006) | 4 lines

DERBY-1891: Fix XN002 to have correct codepoint name: SECTKN

Committed for Myrna Van Lunteren <m.v.lunteren@gmail.com>

------------------------------------------------------------------------
r450681 | fuzzylogic | 2006-09-27 21:17:46 -0700 (Wed, 27 Sep 2006) | 4 lines

DERBY-1874: update largeDataTests/LobLimits master for new exception names.

Committed for Kristian Waagan <Kristian.Waagan@sun.com>

------------------------------------------------------------------------
r450607 | djd | 2006-09-27 15:33:06 -0700 (Wed, 27 Sep 2006) | 3 lines

DERBY-1879 Save the EmbedResultSetMetaData object and the case-insensitive column name map in the ResultDescription object
and not EmbedResultSet. This means these objects are created once per compiled plan (as needed) and not once per
EmbedResultSet (as needed). This improves the performance by reducing the overhead for simple queries (DERBY-1876).
------------------------------------------------------------------------
r450508 | mikem | 2006-09-27 10:10:56 -0700 (Wed, 27 Sep 2006) | 18 lines

DERBY-1878
contributed by Sunitha Kambhampati
patch: derby1878.diff.txt 

 I am attaching the patch (derby1878.diff.txt) to improve some error handling in some of the network server tests.

 1.The execCmdDumpResults used by the five tests timeslice.java,maxthreads.java,testij.java,runtimeinfo.java,sysinfo.java suffer from the same problems that was fixed for testProperties.java namely
 -- the outputstream for the sub process's is not flushed out
 -- there is no timeout handling for the ProcessStreamResult
 2.Eliminate duplication of code in these 5 tests for execCmdDumpResults(String[] args) method. The execCmdDumpResults method basically exec's a new process and then waits for the process to dump the results. A new utility class - ExecProcUtil is added with execCmdDumpResults that is generalized to take the necessary input from the tests as well as fixes the issues mentioned in #1. The OutputStream is flushed out by calling bos.flush and System.out.flush and the timeout is added for ProcessStreamResult.
 3.Make use of the TimedProcess to kill process if process does not exit within the timeout period.
 4.TestConnection.java test has some variation of the execCmdDumpResults and it also adds some testcases into this method. Hence this method in this test is left as is and timeout handling is added.
 5.testij.out has been updated. The previous master file was eating away the last line that was written to System.out, but now that the process's streams are flushed properly, the last line in testij.out test which prints out 'End test'
 is also seen in the output file.

 Also noticed that these tests - like timeslice.java, maxthreads.java all seem to set the properties for the server and then check if the property is set. The functionality of the server when these properties is set is not being tested. It will be good to add tests that test that the functionality itself is working as expected or not. Please note, recently connecting to server with timeslice options discovered some issues with server (see DERBY-1856). 


------------------------------------------------------------------------
r450155 | mikem | 2006-09-26 12:19:40 -0700 (Tue, 26 Sep 2006) | 23 lines

DERBY-1866
contributed by Army Brown
patch: d1866_v1.patch

Attaching a first patch for this issue, d1866_v1.patch. In short, the problem was that, when pushing predicates to subqueries beneath UNIONs, the predicates were always being pushed to the *first* table in the subquery's FROM list, regardless of whether or not that was actually the correct table. Thus it was possible to push a predicate down to a base table to which it didn't apply, thereby leading to an assertion failure in sane mode and an index out of bounds exception in insane mode.

For details on how this occurred and what the fix is, please refer to the code comments in the patch. The d1866_v1 patch does the following:

1. Adds logic to ensure scoped predicates are only pushed
to the appropriate base tables.

2. Adds one line to OptimizerImpl to solve the hang that
was occuring for the second query shown in repro.sql.
The problem there was just that one variable was not
being properly reset when beginning a new round of
optimization.

3. Adds some test cases to verify the changes for #1 and
#2.

Note that the patch is mostly just explanatory comments for existing and new logic, plus the test cases.


------------------------------------------------------------------------
r450129 | mikem | 2006-09-26 10:53:46 -0700 (Tue, 26 Sep 2006) | 5 lines

DERBY-1890

Fixed gramatical error in XSDFI message.


------------------------------------------------------------------------
r450060 | rhillegas | 2006-09-26 07:25:45 -0700 (Tue, 26 Sep 2006) | 1 line

DERBY-1529: Move LICENSE and NOTICE files to the customary place in an Apache plugin.
------------------------------------------------------------------------
r449930 | kahatlen | 2006-09-25 23:55:54 -0700 (Mon, 25 Sep 2006) | 5 lines

DERBY-1883: I18N tests fail on Linux/JVM 1.4.2 when derbyclient.jar is
the first element of the classpath

Grant derbyclient.jar permission to read derby.* properties.

------------------------------------------------------------------------
r449869 | mikem | 2006-09-25 17:10:45 -0700 (Mon, 25 Sep 2006) | 8 lines

DERBY-1858
contributed by Yip Ng
patch: derby1858-trunk-diff02.txt

Fixes problem that DropSchemaNode's bind phase did not add the required schema 
privilege for it to check at runtime.


------------------------------------------------------------------------
r449695 | rhillegas | 2006-09-25 07:53:49 -0700 (Mon, 25 Sep 2006) | 1 line

DERBY-1886: Remove junit.jar from source distributions.
------------------------------------------------------------------------
r449671 | kahatlen | 2006-09-25 05:58:35 -0700 (Mon, 25 Sep 2006) | 17 lines

DERBY-1751: derbynet/testSecMec.java fails with ShutdownException in
DerbyNetClient framework

The attached patch avoids the problem seen in this issue by setting
the console output of the network server to a file. This change in
made to the following files:

* functionTests/tests/jdbc4/TestConnectionMethods.java
* functionTests/tests/derbynet/testSecMec.java
* functionTests/tests/derbynet/dataSourcePermissions_net.java
* junit/NetworkServerTestSetup.java

It also changes DRDAProtocolException so that agent Errors will be
printed to the network server console instead of System.out.

Contributed by Fernanda Pizzorno.

------------------------------------------------------------------------
r449616 | kahatlen | 2006-09-25 02:14:54 -0700 (Mon, 25 Sep 2006) | 5 lines

DERBY-1326: Network server may abandon sessions when Derby system is
shutdown and this causes intermittent hangs in the client

Added JUnit test case which reliably reproduces the hang.

------------------------------------------------------------------------
r449326 | rhillegas | 2006-09-23 15:57:13 -0700 (Sat, 23 Sep 2006) | 1 line

DERBY-1529: Add LICENSE and NOTICE file to Eclipse core plugin zip.
------------------------------------------------------------------------
r449116 | mikem | 2006-09-22 15:36:20 -0700 (Fri, 22 Sep 2006) | 4 lines

DERBY-1830
missed new file VTITest.java in last commit.


------------------------------------------------------------------------
r449114 | mikem | 2006-09-22 15:29:28 -0700 (Fri, 22 Sep 2006) | 12 lines

DERBY-1830
contributed by Sunitha Kambhampati

The testcase added for derby-1660 in optimizerOverrides.sql uses jdbc:default:connection and does not work with wctme5.7 foundation causing the diff mentioned in this jira. This testcase needs to be excluded and should run only in environments that have support for DriverManager.

This patch (derby1830.diff.txt) converts this particular testcase into a junit test.

1. Add a new Junit test in lang suite - VTITest.java
2. Conditionally add the test fixture bulkInsertVtiTest if JDBC.vmSupportsJDBC2() is true.
3. Since the problematic testcase is converted to junit test, remove this test from optimizerOverrides.sql and update the master files for embedded and server frameworks.


------------------------------------------------------------------------
r448949 | djd | 2006-09-22 07:44:55 -0700 (Fri, 22 Sep 2006) | 2 lines

DERBY-1862 Patch makes a map of column names to column number. The map is populated when the first call to findColumn is made.
Patch contributed by Andreas Korneliussen andreas.korneliussen@sun.com 
------------------------------------------------------------------------
r448948 | djd | 2006-09-22 07:30:53 -0700 (Fri, 22 Sep 2006) | 2 lines

Minor cleanup in EmbedResultSet.java, code to set warning in constructor can use the addWarning() method
rather than repeating code.
------------------------------------------------------------------------
r448900 | kahatlen | 2006-09-22 05:18:15 -0700 (Fri, 22 Sep 2006) | 4 lines

DERBY-1826: Add JUnit utility methods for database/server shutdown

Patch contributed by Deepa Remesh.

------------------------------------------------------------------------
r448833 | kahatlen | 2006-09-21 23:33:15 -0700 (Thu, 21 Sep 2006) | 2 lines

DERBY-1834: Updated master file for jdk16.

------------------------------------------------------------------------
r448758 | suresht | 2006-09-21 17:59:49 -0700 (Thu, 21 Sep 2006) | 16 lines

DERBY-1854 (SYSCS_COMPRESS_TABLE corrupts table with a single column which is both a primary key and a foreign key)

Problem was all the conglomerate descriptor entries in sys.sysconglomerates
were not getting updated with new conglomerate number generated for an index 
during compress/bulk-insert, when an index is shared. Update code was assuming 
conglomerate id is common when an index is shared, but that is not correct. 
ConglomerateID's in sys.sysconglomerates are unique. 

This patch modifies the update conglomerate descriptor code to update each
conglomerate descriptor separately using conglomerateID as the key, when
there are more than one conglomerate descriptor referring to the same 
conglomerate(conglomerate number). 

This patch also adds a test-case to test import into a table that has the same column as a primary key and foreign key,  import was also causing corruption because of the same problem.  See DERBY-1641 , for details. 


------------------------------------------------------------------------
r448691 | mikem | 2006-09-21 14:24:25 -0700 (Thu, 21 Sep 2006) | 9 lines

DERBY-1776
contributed by Army Brown
patch:  d1776_reuseInt.patch

In a review comment for a different issue someone mentioned that instead of creating new Integer() objects it'd be better to use the Derby ReuseFactory where possible to avoid excessive object creation. I get the feeling that's not a big deal with the _v1 patch for this issue, but I nonetheless thought it'd be a good idea to follow that advice with the changes.

So I'm attaching a tiny patch, d1776_reuseInt.patch, that replaces the calls to "new Integer()" in the _v1 patch (which has already been committed) with calls to ReuseFactory.getInteger(). Functionally, the patch doesn't change anything. 


------------------------------------------------------------------------
r448617 | fuzzylogic | 2006-09-21 11:05:52 -0700 (Thu, 21 Sep 2006) | 3 lines

DERBY-1846: Double up the backslashes for tr. Tested on bash and
tcsh on both Mac OS X and Linux, as well as Cygwin and MKS on Windows.

------------------------------------------------------------------------
r448472 | kahatlen | 2006-09-20 23:12:23 -0700 (Wed, 20 Sep 2006) | 2 lines

Fix javadoc warnings caused by non-ascii characters.

------------------------------------------------------------------------
r448465 | kahatlen | 2006-09-20 22:37:44 -0700 (Wed, 20 Sep 2006) | 2 lines

Fix javadoc warning.

------------------------------------------------------------------------
r448456 | djd | 2006-09-20 21:28:14 -0700 (Wed, 20 Sep 2006) | 2 lines

DERBY-1811 Ensure embedded ResultSet.getTimestamp on a TIME column returns a java.sql.Timestamp with a date portion
equal to the current date at the time the getTimestamp method is called.
------------------------------------------------------------------------
r448424 | mikem | 2006-09-20 18:24:25 -0700 (Wed, 20 Sep 2006) | 7 lines

DERBY-1787
contributed by Mamta Satoor
patch: DERBY1787_UseCorrectTerminologyV1diff.txt

Grant revoke functionality was added in Derby 10.2 The comments that went into the grant revoke code, in some places refer to database owner as "dba". They are not the same thing. In the grant revoke world, dba is a role. We haven't added roles into Derby yet but current use of dba in comments might make it confusing when we do start working on roles including dba.


------------------------------------------------------------------------
r448338 | djd | 2006-09-20 13:56:54 -0700 (Wed, 20 Sep 2006) | 2 lines

DERBY-1700 Cleanup some remaining comments that referred to closeCleanup parameters and
a parameter reference in the unused class MergeJoinResultSet.
------------------------------------------------------------------------
r448286 | djd | 2006-09-20 11:24:25 -0700 (Wed, 20 Sep 2006) | 9 lines

DERBY-1700 Next step that changes the methods in ResultSetFactory not to have a closeCleanup method parameter
which due to the previous patches was always being passed in as null. Changed all callers to not pass the null
and thus remove the closeMethodArgument in ResultSetNode.
Since most of the calls are to ResultSetFactory methods are by generated code cannot rely on compile time checks
to ensure all callers are correct. Needed to reduced the argument count by one for the generated method call for
any getXXXResultSet that no longer passes the closeCleanup (null) argument. Have confidence in the change as derbyall
passes and the code coverage numbers at http://wiki.apache.org/db-derby/CodeCoverage show complete coverage of these
factory methods except for ones related to VTIs.

------------------------------------------------------------------------
r448258 | mikem | 2006-09-20 09:35:09 -0700 (Wed, 20 Sep 2006) | 19 lines

DERBY-1775
contributed by Army Brown
committing  d1775_v2.patch

Attaching a patch that does the following:

1. Updates the 2200M message text to be more generic,
as suggested in the description of this issue.

2. Replaces "see next exception" with the in-lined
error message while continuing to do exception
chaining as usual.

3. Also replaces "see next exception" with in-line
error messages for a couple of other SQL/XML
errors--namely UNEXPECTED_XML_ERROR and
XML_QUERY_ERROR. 


------------------------------------------------------------------------
r448133 | kahatlen | 2006-09-20 02:17:38 -0700 (Wed, 20 Sep 2006) | 5 lines

DERBY-1869: lang/timestampArith.java fails if it starts right before midnight

If it is less than two minutes until midnight, wait until after
midnight before running the test.

------------------------------------------------------------------------
r448101 | mikem | 2006-09-20 00:05:01 -0700 (Wed, 20 Sep 2006) | 5 lines

DERBY-1834

master updates for previous error message change.


------------------------------------------------------------------------
r448085 | suresht | 2006-09-19 23:14:29 -0700 (Tue, 19 Sep 2006) | 12 lines

DERBY-1718 ( creating an after insert trigger with trigger action involving 
xml datatype throws java.io.NottSerializableException)

Patch contributed by Yip Ng.

The fix basically implements the Formatable interface for SqlXmlUtil class. 
Currently, it writes out the query expression string instead of the XPath 
object(its serializable I think), and then later recompiles the query once 
at evaluation time. The reason behind this is that I don't want the stored 
form to be tied to a particular XML implementation.


------------------------------------------------------------------------
r448048 | mikem | 2006-09-19 20:45:55 -0700 (Tue, 19 Sep 2006) | 10 lines

DERBY-1772
contributed by Army Brown

Attaching the simplest patch possible for this issue--just changes SQLSTATE '42Z78' to a Derby-specific SQLSTATE, 'XML00'. I also moved SQLSTATE '42Z7Z' to 'XML01' since I believe it falls into the same category of "Derby-specific errors that are not covered by the SQLStandard."

I read through the SQL standard definitions for SQLSTATES and none of them jumped out at me as being more appropriate than '42', so I just created a new set of SQLSTATEs, "XMLxx", for this particular issue. As I said, this was just the easiest way to go; if anyone can suggest a better SQLSTATE to fit the errors, please let me know. Otherwise, the d1772_v1.patch should be all it takes to resolve this issue.

Note: Since we don't currently have any tests for cases where the classpath is missing the required Xalan/JAXP classes, there were no test/master files to update. The need to add tests for such scenarios is filed as part of DERBY-1758. 


------------------------------------------------------------------------
r448034 | mikem | 2006-09-19 19:40:57 -0700 (Tue, 19 Sep 2006) | 31 lines

DERBY-1766
contributed by Army Brown

Well, after that paragraph of justification, it turns out that there are only three places where we use the 42Z79 SQLSTATE. But still, I think it's a useful error message and should be kept around; it could come in handy further down the road if SQL/XML functionality is expanded.

As for line/column numbers, it turns out that those values are readily available from within sqlgrammar.jj and thus can easily be passed as part of the error message. The only potential downside that I can see is that we have to create an Integer object out of the line/col numbers in order to pass them to the StandardException constructor...but maybe that's not a big deal...? The fact that no one has done this earlier makes me wonder if there's some "gotcha" here that I'm missing, but I haven't seen any problems with it just yet...

Attaching a patch d1776_v1.patch that changes the error message for 42Z79 as mentioned in my previous comment and also does the following:

1. Adds line and column numbers to the error message to indicate where
the missing keyword is expected.

2. Removes one "lookahead" call that was causing 42Z79 to be raised
for a missing "AS" keyword when in fact the keyword was present
(what was missing was the datatype). To avoid confusion, I
removed the lookahead and now the user will see a more generic
42X01 error in that particular case.

3. Updated xml_general master files accordingly.

So with this patch applied, instead of:

select xmlserialize(x) from t;
ERROR 42Z72: XML syntax error; missing keyword(s): 'AS'.

we'll now see:

create table t (i int, x xml);
ERROR 42Z72: Missing SQL/XML keyword(s) 'AS' at line 1, column 22. 


------------------------------------------------------------------------
r448026 | bpendleton | 2006-09-19 18:34:21 -0700 (Tue, 19 Sep 2006) | 11 lines

DERBY-1304: DROP VIEW does not always completely remove view

This patch was contributed by Yip Ng (yipng168@gmail.com)

The problem is that DROP VIEW's binding logic is using its superclass
QueryTreeNode's bind() method which just simply returns the object itself.
So there is no actual binding done in DROP VIEW at all! It should have
created a dependency on the statement, so when its associated descriptor
gets dropped, the statement can be invalidated accordingly. This explains
why the second DROP VIEW fails since it is not invalidated by the system.

------------------------------------------------------------------------
r448003 | fuzzylogic | 2006-09-19 15:44:02 -0700 (Tue, 19 Sep 2006) | 2 lines

Add missed files from DERBY-1547 checkin

------------------------------------------------------------------------
r447970 | fuzzylogic | 2006-09-19 14:02:49 -0700 (Tue, 19 Sep 2006) | 4 lines

DERBY-1846: update-with-jdbc4 scripts need to patch up modules.properties
Many other minor fixes and tweaks to the scripts to get them working in
different environments.

------------------------------------------------------------------------
r447922 | fuzzylogic | 2006-09-19 10:35:37 -0700 (Tue, 19 Sep 2006) | 5 lines

DERBY-1547: Include build number in DatabaseMetaData getDatabaseProductVersion
and getDriverVersion calls.

Committed for V. Narayanan <V.Narayanan@sun.com>

------------------------------------------------------------------------
r447877 | bpendleton | 2006-09-19 08:16:00 -0700 (Tue, 19 Sep 2006) | 11 lines

DERBY-147: ERROR 42x79 if specify same column twice and use ORDER BY

This patch contributed by Bernd Ruehlicke (apache@priwall.org)

This patch changes the getOrderByColumn method in ResultColumnList so that
it uses ResultColumn.isEquivalent to determine whether the column specified
in the ORDER BY clause is ambiguous or not. It is ok to select the ORDER BY
column multiple times, so long as all the occurrences are equivalent. If there
is an ambiguity, the statement is rejected and the user must reword it to
clarify which column is to be used for ordering the results.

------------------------------------------------------------------------
r447856 | kahatlen | 2006-09-19 07:24:45 -0700 (Tue, 19 Sep 2006) | 5 lines

DERBY-801 (partial) Allow parallel access to data files

Backing out the patch for DERBY-733 as it is not needed anymore and
the code is cleaner without it.

------------------------------------------------------------------------
r447815 | kahatlen | 2006-09-19 03:58:03 -0700 (Tue, 19 Sep 2006) | 8 lines

DERBY-801 (partial) Allow parallel access to data files

Adding RAFContainer4 which is used instead of RAFContainer on jdk1.4
and higher. RAFContainer4 uses FileChannels to access the data files,
and therefore multiple threads may access them in parallel.

Patch contributed by Anders Morken.

------------------------------------------------------------------------
r447736 | mikem | 2006-09-18 22:12:33 -0700 (Mon, 18 Sep 2006) | 27 lines

DERBY-1694
contributed by Sunitha Kambhampati

I was looking at the testProperties issue that caused problems because of test hang. The test doesnt hang in my environment but I thought I would look to see why the test didnt timeout.

I found couple of issues here:
0. The testProperties.java and several networkserver tests exec new processes to start server, test properties,shutdown server etc. In some cases, we wait to capture the output from the subprocess that is started. ProcessStreamResult is used for this purpose. ProcessStreamResult is part of the harness (see org.apache.derbyTesting.functionTests.harness.ProcessStreamResult) and it starts a thread to read data from the process's stream and writes it out. Once EOS (-1) is reached, the thread exits after doing a notifyAll.

1. ProcessStreamResult.Wait() does not work with the timeout case. I think the original intention of the method that takes the timeout was to force the thread to stop, once the timeout period has elapsed. The method Wait() does not handle this case.
2. On timeout, the myThread needs to stop its work. The run() method does not handle this case.
3. testProperties test does not make use of the ProcessStreamResult timeout mechanism.
4. Process's are exec'd in the tests and they are not destroyed within a timeout period. The network server tests start server using Process, and then cleanup by shutting them down. It will all work ok, if no deadlock or blocking of process's occur. It seems to me though, that we should have a way to destroy the processes that are
started as part of each test given a timeout period. Each test must learn to do the cleanup when it leaves and the test has knowledge of all the sub-processes that it has exec'd. The current test harness has a class TimedProcess which could work.

In the spirit of incremental development, I am attaching a patch(derby1694.p2.diff.txt and corresponding stat file - derby1694.p2.stat.txt) that fixes problems 1,2 and 3. I think #4 can be handled as a separate issue/patch.

This patch
-- fixes the timeout handling in ProcessStreamResult. Instance variable 'interrupted' is a flag to indicate if a timeout has occurred or if the thread's work has been interrupted in between. The flag 'finished' indicates whether the work has been finished by the thread. Changes are in Wait() method to make use of wait(timeoutms) if a timeout is specified in ProcessStreamResult. If timeout time has elapsed, then the interrupted flag is set to true.
-- Adds condition in the run() method to check if interrupted is true. If so, the thread will stop its work and leave.
-- correctly return if the thread's work was interrupted either because of a timeout or if it was interrupted.
-- Make use of the ProcessStreamResult with a timeout setting of 2 minutes in testProperties test. Note, the timeout handling only comes into effect when ProcessStreamResult.Wait() method is called.

other notes:
-- when you run a test, the suite property for timeout does not get picked up. I think this is intentional behavior.
-- Issues mentioned above are not specific to just testProperties but exist for other networkserver tests. There are a total of 7 files in derbynet that make use of this.


------------------------------------------------------------------------
r447644 | bpendleton | 2006-09-18 16:53:11 -0700 (Mon, 18 Sep 2006) | 14 lines

DERBY-1589: CREATE TABLE throws NPE after DROPs and REVOKEs

FKConstraintDefinitionNode, which is the compiler implementation code
for the "foreign key ... references ... " constraint in the compiler,
is not properly registering that the statement containing the
foreign key constraint has a dependency on the table being referenced. Due
to the lack of the dependency, when the referenced table (t11ConstraintTest)
is dropped, the statement is not invalidated. 

This patch changes the compiler so that it creates a dependency from
a statement with a FOREIGN KEY clause in it to the table which is
referenced by that clause. The patch also contains a simple regression
test, based on the original bug.

------------------------------------------------------------------------
r447502 | fuzzylogic | 2006-09-18 11:59:06 -0700 (Mon, 18 Sep 2006) | 3 lines

DERBY-1588: Fix links in demo.html to point to the local copy of the 
documentation instead of the Derby website.

------------------------------------------------------------------------
r447469 | mikem | 2006-09-18 09:54:06 -0700 (Mon, 18 Sep 2006) | 33 lines

DERBY-1784
contributed by Yip Ng

 
After studying the
compiler code abit more, I found that DML statements such as INSERT, UPDATE and DELETE also suffer from the same problem (they use different bind logic)

With that said, this patch attempts to address all the stated problems above
when column reference is qualified with a synonym table name.

The fundamental problem is that Derby does not keep the original unbound table 
name around once the synonym is resolved. So the fix is to address this case 
and apply the qualification properly.

In the VIEW resolution case, the system needs to preserve the synonym name as 
VIEW gets expanded to a subquery, the name to be set should be the exposed 
name of the table and not the resolved table name.

For * expansion in the SELECT list, if the FROM clause happens to be a synonym, 
the system should prepend it with the unbound name and not the resolved table 
name. This way the binding logic is normalized.

For DML cases, the synonym name needs to be normalized to its base table so that
setColumnDescriptor can apply correctly. When the system binds the expression 
for this result column, it will resolve this properly since the column binding 
logic are in the respective FromTable subclasses implementation where they 
will use the exposed name this time to check for qualification.

I wrote more testcases for synonym.sql but I found out that this SQL file is 
actually not part of derbylang suite, so the patch added this back to the test 
bucket. 


------------------------------------------------------------------------
r447462 | kahatlen | 2006-09-18 09:35:25 -0700 (Mon, 18 Sep 2006) | 5 lines

DERBY-1326: Network server may abandon sessions when Derby system is
shutdown and this causes intermittent hangs in the client

Re-enable shutdown in checkDataSource test.

------------------------------------------------------------------------
r447375 | kahatlen | 2006-09-18 04:41:37 -0700 (Mon, 18 Sep 2006) | 7 lines

DERBY-1326 (partial) Network server may abandon sessions when Derby
system is shutdown and this causes intermittent hangs in the client

Don't poison the network server's worker threads when an engine
shutdown is detected. Poisoning the threads could lead to abandoning
of sessions and hangs in the client.

------------------------------------------------------------------------
r447212 | mikem | 2006-09-17 20:25:34 -0700 (Sun, 17 Sep 2006) | 49 lines

DERBY-1706
contributed by Mamta Satoor

This fix addresses the null pointer reported in DERBY-1706.

SESSION schema is a special schema which is used for global temporary tables. 
In order to handle global temporary table, Derby creates a in-memory SESSION 
schema descriptor which does not have any uuid associated with it. A physical 
SESSION schema(with it's uuid set properly) will be created *only* if there is
a persistent object created in it by a user. Global temporary tables can only 
reside in SESSION schema and Derby documentation recommends that SESSION schema
should not be used for other persistent objects. This is because the same 
object name could be referencing different objects within SESSION schema 
depending on in what order they got created.

For instance
create table session.t1(c11 int);
-- the following select will get data from the persistent table t1 in SESSION schema
select * from session.t1;
declare global temporary table session.t1(c11 int, c12 int) on commit delete rows not logged;
-- the following select this time will return data from the temporary table t1 rather than persistent table t1
-- This is because, at any time, if there is a global temporary table by the table referenced by a statement,
-- then Derby will always pick up the global temporary table. If no global temporary table by that name is
-- found, then Derby will look for persistent table in SESSION schema. If none found, then error will be thrown
select * from session.t1;
-- following will drop the temporary table t1 and not the persistent table t1
drop table session.t1;
-- the following select will get data from the persistent table t1 in SESSION schema because temporary table
-- doesn't exist anymore
select * from session.t1;

So, as can be seen from the example above, the statements referencing SESSION schema objects could have different meanings depending on what kind of objects exist in SESSION schema. Because of this, the compiled plans of statements referencing SESSION schema are not saved in the statement cache, rather they get compiled everytime they are executed. In order to enforce this, in the compilation phase, Derby checks if the statement at hand is referencing a SESSION schema object by calling referencesSessionSchema method. If this method returns true, the statement's compiled plan will not be saved in the statement cache.

Now, taking the script provided by Yip which results in NPE
set schema session;
create table t1 (i int);

Derby calls referencesSessionSchema while compiling "create table t1 (i int); " to see if it references SESSION schema object. Since, there is no schema associated with the table t1, Derby will check for the compilation schema which in this case is SESSION schema because we used "set schema session; ". (This happens in QueryTreeNode.getSchemaDescriptor(String schemaName, boolean raiseError) line 1486). The method
then tries to call an equal method on the UUID associated with the SESSION schema descriptor but since it is null(because no physical SESSION schema has been created yet), we end up with a null pointer exception. This will happen only if no physical SESSION schema has been created yet and user tries to create a first persistent object inside SESSION schema after doing a set schema session.

Following will not give a NPE because user hand created SESSION schema before doing set schema SESSION and creating an object inside it.
create schema session;
set schema session;
create table t1 (i int);
The hand creation of SESSION schema causes Derby to have a schema descriptor for SESSION schema with it's uuid set correctly.

The fix for the NPE is simple and that is to check if the UUID is null.


------------------------------------------------------------------------
r447011 | mikem | 2006-09-16 20:57:05 -0700 (Sat, 16 Sep 2006) | 32 lines

DERBY-1707
contributed by       Mamta A. Satoor

Basically, FromBaseTable.verifyProperties method had following if condition

if (constraintSpecified)
{
    ConglomerateDescriptor cd =
    dDictionary.getConglomerateDescriptor(
    consDesc.getConglomerateId());
    String indexName = cd.getConglomerateName();
    tableProperties.remove("constraint");
    tableProperties.put("index", indexName);
}


The if condition above did not do null check for consDesc. In Sunitha's case, 
her sql statement looked as follows 
SELECT * FROM t1 --DERBY-PROPERTIES constraint=null;
When null value is supplied for constraint property, consDesc will be null and the code inside the if condition above should not be executed. I changed the if condition above as follows
if (constraintSpecified && consDesc != null)
and now constraint=nulll does not result in null pointer exception. I added a 
test case for this in lang/optimizerOverrides.sql and noticed that 
constraint=null resulted in an index scan. There is already a test which 
checks for index=null and that property results in a table scan. This behavior 
seems to be in line with the documentation in Tuning Derby Guide for 10.2 
(section name Overriding the default optimizer behavior) which says that if 
null is specified for property index, a table scan will be performed on the 
table. It does not say anything about a table scan for constraint=null
                                      


------------------------------------------------------------------------
r446924 | rhillegas | 2006-09-16 12:27:53 -0700 (Sat, 16 Sep 2006) | 1 line

DERBY-1777: Commit Army's d1777_v2.patch, cleaning up an NPE in the optimizer.
------------------------------------------------------------------------
r446789 | mikem | 2006-09-15 16:54:19 -0700 (Fri, 15 Sep 2006) | 6 lines

DERBY-1736
contributed by Yip Ng, yipng168@gmail.com

Addtional grant and revoke tests developed during the 10.2 buddy testing.


------------------------------------------------------------------------
r446672 | rhillegas | 2006-09-15 11:17:40 -0700 (Fri, 15 Sep 2006) | 1 line

DERBY-1853: Template for bundled release notes, plus release machinery for bundling.
------------------------------------------------------------------------
r446652 | mikem | 2006-09-15 09:41:24 -0700 (Fri, 15 Sep 2006) | 10 lines

DERBY-1729
contributed by Yip Ng, yipng168@gmail.com

Adding a jdk16 specific master.  This is an issue with exception handling in 
jdk16. Reported as DERBY-1629. To temporarily resolve the regression test 
failure a jdk, a jdk16 specific master is being added.  This was what was done 
for procedureInTrigger test.



------------------------------------------------------------------------
r446538 | kahatlen | 2006-09-15 00:52:18 -0700 (Fri, 15 Sep 2006) | 13 lines

DERBY-1326 (partial) Network server may abandon sessions when Derby
system is shutdown and this causes intermittent hangs in the client

Two small cleanups:

  Make NetworkServerControlImpl.startNetworkServer() remove the
  sessions it closes from sessionTable. Also, synchronize on runQueue
  to prevent modifications while the queue is traversed.

  Invoke closeSession() and close() in a finally clause in
  DRDAConnThread.handleException() to ensure proper closing of the
  session when an unexpected error happens.

------------------------------------------------------------------------
r446536 | fuzzylogic | 2006-09-15 00:34:39 -0700 (Fri, 15 Sep 2006) | 4 lines

DERBY-1665 (partial): fix formatting of javadoc for iapi.store.access.Qualifier.
The content of the javadoc for this class needs a review to address the other
comments in this JIRA issue.

------------------------------------------------------------------------
r446527 | fuzzylogic | 2006-09-14 22:56:49 -0700 (Thu, 14 Sep 2006) | 2 lines

DERBY-1741: Remove cloudscape references from toolsmessages files.

------------------------------------------------------------------------
r443169 | fuzzylogic | 2006-09-13 16:45:04 -0700 (Wed, 13 Sep 2006) | 3 lines

DERBY-1846: Trim off the carriage return of each line of the list files.
The files need to be CRLF to be read properly on Windows.

------------------------------------------------------------------------
r443167 | fuzzylogic | 2006-09-13 16:38:49 -0700 (Wed, 13 Sep 2006) | 4 lines

DERBY-1846: Add a script that allows users to easily update their Derby jars
with the JDBC4 classes. Also a minor edit to derby_common.sh which prevents
a warning on Linux.

------------------------------------------------------------------------
r443076 | fuzzylogic | 2006-09-13 12:03:03 -0700 (Wed, 13 Sep 2006) | 2 lines

Minor fix to detect MKS before running `expr index` which can output error text.

------------------------------------------------------------------------
r443038 | suresht | 2006-09-13 10:25:56 -0700 (Wed, 13 Sep 2006) | 25 lines


DERBY-1618: (store/BootAllTest.junit fails on with jdk13 based jvms)

Patch Contributed by Myrna van Lunteren.

On jdk131, in the situation invoked by the testSettingBootAllPropertyWithHomePropertySet() 
test in BootAllTest.java, when the DriverPropertyInfo.choices were accessed.
the problem was because in BaseMonitor.java there were no elements found resulting from
provider.getBootTimeServices(). 

underlying real issue was  database directory was not getting set to the
correct path in the storage factory (DirStorageFactory.java), when all the 
database are loaded (derby.system.bootAll=true) and system home is set. 

This patch correctly sets the database directory in the storage factory, in the
above mentioed scenario.  

Modified the test lang/GetPropertyInfoTest.java to access the choices,
description, and required fields, but it didn't actually duplicate the problem
in BootAllTest.java. But as that's in that test I thought it was unnecessary to
add more.




------------------------------------------------------------------------
r442958 | kahatlen | 2006-09-13 05:23:34 -0700 (Wed, 13 Sep 2006) | 5 lines

DERBY-1833: Remove messages made unused by implementation of DERBY-690
and DERBY-775

Patch contributed by Dag H. Wanvik.

------------------------------------------------------------------------
r442761 | fuzzylogic | 2006-09-12 17:04:40 -0700 (Tue, 12 Sep 2006) | 4 lines

Minor javadoc fix for iapi/types/XML.java

Committed for Army Brown <qozinx@gmail.com>

------------------------------------------------------------------------
r442737 | fuzzylogic | 2006-09-12 15:23:16 -0700 (Tue, 12 Sep 2006) | 3 lines

Set svn:eol-style on shell scripts to LF and batch files to CRLF to prevent
accidental switch of the line endings. Fix command in stopNetworkServer

------------------------------------------------------------------------
r442677 | fuzzylogic | 2006-09-12 12:20:55 -0700 (Tue, 12 Sep 2006) | 3 lines

Unset svn:eol-style on batch files so that they have the correct line endings
if the distributions are built on Linux.

------------------------------------------------------------------------
r442674 | fuzzylogic | 2006-09-12 12:00:58 -0700 (Tue, 12 Sep 2006) | 2 lines

DERBY-1032: Allow new scripts to run on MKS.

------------------------------------------------------------------------
r442647 | suresht | 2006-09-12 10:25:10 -0700 (Tue, 12 Sep 2006) | 20 lines

DERBY-1786 (a crash during re-encryption may cause an unrecoverable db)

The problem was when transaction log spans more than one log file during (re)
encryption of the database and if there is a crash just before switching the
database to use the new encryption properties; On recovery checkpoint in the
first log file is used as reference and the next log file is assumed to have
the commit log record for (re) encryption and deleted incorrectly to force the
roll-back , which lead to the incomplete rollback of re-encryption. And that
caused recovery failures on next (re) encryption crashed. 

This patch fixes the problem by ensuring there a checkpoint record in the
last log file before creating a new log file with new encryption properties
and writing the commit log record. Log is also flushed before making the
transaction log use the new encryption key to avoid any part of old log 
records in the buffers getting encrypted with the new encryption key. 
While working on this problem , I noticed error message thrown incase of 
re-encryption failures are confusing, added a new error message to indicate 
failures specific to (re) encryption. 


------------------------------------------------------------------------
r442646 | fuzzylogic | 2006-09-12 10:03:01 -0700 (Tue, 12 Sep 2006) | 2 lines

DERBY-1843: Pass arguments to derby_common.bat for processing.

------------------------------------------------------------------------
r442490 | kahatlen | 2006-09-11 23:55:44 -0700 (Mon, 11 Sep 2006) | 9 lines

DERBY-803: derbynet/DerbyNetAutoStart.java test fails intermittently
with org.apache.derby.iapi.services.context.ShutdownException

Let the test wait between closing client connections and shutting down
the engine. This way, the server threads get time to close the
connections cleanly before the engine is taken down.

Patch contributed by Fernanda Pizzorno.

------------------------------------------------------------------------
r442464 | kahatlen | 2006-09-11 22:59:34 -0700 (Mon, 11 Sep 2006) | 7 lines

DERBY-1832: sysinfo test fails with "access denied
(java.util.PropertyPermission java.class.path read)" when
derbyclient.jar is first in classpath

Grant derbyclient.jar privileges needed for sysinfo and
sysinfo_withproperties.

------------------------------------------------------------------------
r442463 | kahatlen | 2006-09-11 22:57:41 -0700 (Mon, 11 Sep 2006) | 9 lines

DERBY-1817: Race condition in network server's thread pool

Clean-up of NetworkServerControlImpl:
  - moves generation of connection number into addSession()
  - adds new method removeThread() which can be used instead of
    getThreadList().remove()
  - removes methods that are no longer used
  - makes methods that are only used by NetworkServerControlImpl private

------------------------------------------------------------------------
r442462 | kahatlen | 2006-09-11 22:55:31 -0700 (Mon, 11 Sep 2006) | 5 lines

DERBY-1817: Race condition in network server's thread pool

Reduce the amount of code synchronized on runQueue in
NetworkServerControlImpl.addSession().

------------------------------------------------------------------------
r442199 | andreask | 2006-09-11 05:48:11 -0700 (Mon, 11 Sep 2006) | 1 line

DERBY-1691 blobclob4BLOB.java fails under DerbyNet framework. Fixed by printing stack traces to stdout. Contributed by Oystein.Grovlen@sun.com
------------------------------------------------------------------------
r441802 | kahatlen | 2006-09-09 08:50:02 -0700 (Sat, 09 Sep 2006) | 14 lines

DERBY-1817: Race condition in network server's thread pool

Instead of always putting new sessions in the run queue when there are
free threads, the network server now compares the number of free
threads and the size of the run queue. This is done to prevent the run
queue from growing to a size greater than the number of free
threads. Also, the server now synchronizes on runQueue until the
session has been added to the queue. This is to prevent two threads
from deciding that there are enough free threads and adding the
session to the run queue, when there in fact only were enough free
threads for one of them. With this patch, I am not able to reproduce
DERBY-1757 on platforms where the failure was easily reproduced
before.

------------------------------------------------------------------------
r441789 | kahatlen | 2006-09-09 07:38:54 -0700 (Sat, 09 Sep 2006) | 2 lines

DERBY-1767: Made UpdatableResultSetTest run as part of _Suite.

------------------------------------------------------------------------
r441779 | kahatlen | 2006-09-09 04:26:03 -0700 (Sat, 09 Sep 2006) | 5 lines

DERBY-1675: Network Server should not send to client that it supports
EUSRIDPWD when running against Sun JVM

Updating comments. Patch contributed by Sunitha Kambhampati.

------------------------------------------------------------------------
r441740 | bpendleton | 2006-09-08 21:40:56 -0700 (Fri, 08 Sep 2006) | 29 lines

DERBY-1759: XMLSERIALIZE doesn't follow spec when serializing sequence

This patch was contributed by Army Brown (qozinx@gmail.com)

The patch does the following:

  1. Adds logic to SqlXmlUtil.serializeToString() to perform the
     steps of "sequence normalization" as required by XML serialization
     rules. This includes throwing an error if the user attempts to
     explicitly serialize a sequence that contains one or more top-level
     attribute nodes.

  2. In order to ensure that the serialization error is only thrown
     when the user performs an explicit XMLSERIALIZE, I added a
     new field, "containsTopLevelAttr", to the XML class. This field
     indicates whether or not the XML value corresponds to a sequence
     with a top-level attribute node. If the user calls XMLSERIALIZE
     on an XMLDataValue for which containsTopLevelAttr is true,
     then we'll throw the serialization error 2200W as dictated by
     SQL/XML.

  3. Adds appropriate test cases to lang/xml_general.sql to verify
     the fix.

  4. Since Xalan doesn't provide a built-in way to retrieve a sequence
     of attribue values (as opposed to attribute nodes), I also included
     in lang/xml_general.sql a (rather ugly) way to accomplish that
     task within the serialization restrictions of SQL/XML. 

------------------------------------------------------------------------
r441722 | mikem | 2006-09-08 18:29:42 -0700 (Fri, 08 Sep 2006) | 20 lines

DERBY-1675
contributed by Sunitha Kambhampati

USRIDPWD support depends on the JCE available in the classpath of the server

This patch(derby1675.diff.txt) does the following
1. Add code to check if server jvm can support EUSRIDPWD.
2. Throw an error if the derby.drda.securityMechanism is set to ENCRYPTED_USER_AND_PASSWORD_SECURITY
and if the server jvm cannot support EUSRIDPWD.
3. Server sends the client the list of supported security mechanisms as part of ACCSECRD. Now, the server will correctly only send EUSRIDPWD as an option if the running server can support this security mechanism.

Test related changes:
Changes were made to testProtocol.java and a new method readSecMecAndSECCHKCD is added to TestProto to read the SECMEC and SECCHKCD values. Note, that with ibm142 and ibm15 jvms that support eusridpwd, the SECMEC value 9 (eusridpwd) will be sent as part of the ACCSECRD response. But for the jvms that dont support the eusridpwd, the SECMEC value of 9 wont be sent. The new method readSecMecAndSECCHKCD takes
care of printing out the SECMEC values that are sent by the server - this results in the need for a new master file for the jvm that support eusridpwd and the jvm that cannot support it. A new master file has been added for ibm14.

Tests for codepath that covers #2 is already present in testSecMec.java. This results in themaster updates for the jvms that do not support eusridpwd for the case where server is started with
derby..drda.securityMechanism=ENCRYPTED_USER_AND_PASSWORD_SECURITY.



------------------------------------------------------------------------
r441601 | djd | 2006-09-08 11:21:43 -0700 (Fri, 08 Sep 2006) | 3 lines

DERBY-1809 Fix bug where use of builtin functions in the SYSFUN schema within VIEWs would throw an exeception
at CREATE VIEW time. Caused by the AliasDescriptor for such functions reporting they were persistent (had rows
in SYSALIASES) when they are not persistent.
------------------------------------------------------------------------
r441584 | mikem | 2006-09-08 10:39:50 -0700 (Fri, 08 Sep 2006) | 15 lines

DERBY-1522
contributed by Deepa Remesh, dremesh@gmail.com

Attaching a patch 'derby1522_v2.diff. It includes a JUnit test for testing the 
switch to SQL standard authorization. It tests following:

1. grant/revoke is not available if derby.database.sqlAuthorization property 
is not set.
2. grant/revoke is available when derby.database.sqlAuthorization is set to true.
3. Once derby.database.sqlAuthorization is set to true, it cannot be set to any other value.

This patch also modifies DatabasePropertyTestSetup.tearDown method. The tearDown method resets the property values to old values. It will now ignore exceptions when property reset is not supported. I am including this small change in the above patch. (I had opened DERBY-1827 for the issue with tearDown method. ). I am using TestUtil.getConnection method to shutdown the database. I have opened DERBY-1826 to add methods to Derby's JUnit classes for shutdown.



------------------------------------------------------------------------
r441426 | fuzzylogic | 2006-09-08 01:14:00 -0700 (Fri, 08 Sep 2006) | 3 lines

DERBY-706: Fix multiple declarations of properties in 
testProperties_derby.properties reported by John Embretsen

------------------------------------------------------------------------
r441232 | djd | 2006-09-07 14:31:54 -0700 (Thu, 07 Sep 2006) | 5 lines

DERBY-1700  Patch the removes closeCleanup from ResultSet implementations:

- remove any field storing the reference to a close cleanup method
- remove any calling of the method
- remove passing the reference to the method in the constructor. 
------------------------------------------------------------------------
r441185 | kahatlen | 2006-09-07 12:29:00 -0700 (Thu, 07 Sep 2006) | 5 lines

DERBY-1767: insertRow(), updateRow() and deleteRow() cannot handle
table names and column names containing double quotes

Patch contributed by Fernanda Pizzorno.

------------------------------------------------------------------------
r441140 | mikem | 2006-09-07 09:54:09 -0700 (Thu, 07 Sep 2006) | 23 lines

DERBY-1729, contributed by Yip Ng
committing derby1729-trunk-diff03.txt patch.

The GrantNode and RevokeNode should have derived from DDLStatementNode instead
of MiscellaneousStatementNode. Subclassing DDLStatementNode will generate a
call to GenericResultSetFactory's getDDLResultSet() in the activation class
and invokes the GenericAuthorizer's authorize() method with the proper
parameters to enforce the correct semantics.

public ResultSet getDDLResultSet (Activation activation) throws StandardExceptio
n
{
        getAuthorizer(activation).authorize(activation, Authorizer.SQL_DDL_OP);
            return getMiscResultSet( activation);
}

Also adding an additional sql file for derbylang. The reason I didn't include
this in grantRevokeDDL.sql is because of name collision and this testcase is
one of the many additonal grant/revoke tests that I wrote and I'll like to
append the rest of those testcases to this file(grantRevokeDDL2.sql) when I
submit my patch for DERBY-1736.


------------------------------------------------------------------------
r441131 | djd | 2006-09-07 09:16:15 -0700 (Thu, 07 Sep 2006) | 4 lines

DERBY-1686 The original fix retrieves all the relevent providers such as table, view, and routine descriptor(s)
of the given view at bind time and pass this information to runtime later
for it to determine if the privilege is grantable or not by the grantor.
Patch contributed by Yip Ng - yipng168@gmail.com
------------------------------------------------------------------------
r441105 | djd | 2006-09-07 07:55:02 -0700 (Thu, 07 Sep 2006) | 6 lines

DERBY-1700 (partial) Change the compile time code generation to always pass null for the close cleanup method
when generating ResultSets. This is because the close cleanup method adds no value since it is only used
for current time & date resetting, which is also performed at every execute if a statement uses the SQL
current time or date constructs. Incremental development, first just run with no close cleanup method,
future steps will include removal of related code from the implementations of ResultSets, then from
the ResultSetFactory api and its callers.
------------------------------------------------------------------------
r441098 | djd | 2006-09-07 07:42:46 -0700 (Thu, 07 Sep 2006) | 1 line

DERBY-1802 Fix accidental bad change for lang._Suite.
------------------------------------------------------------------------
r441097 | djd | 2006-09-07 07:35:35 -0700 (Thu, 07 Sep 2006) | 4 lines

DERBY-1802  Patch which contains JUnit tests for DERBY-475 and DERBY-592,
the built-in math functions and JDBC escape functions.
Contributed by Susan Cline home4slc@yahoo.com

------------------------------------------------------------------------
r441088 | djd | 2006-09-07 07:07:22 -0700 (Thu, 07 Sep 2006) | 1 line

Move GroupByExpression test from the derbylang suite to the lang._Suite.
------------------------------------------------------------------------
r440846 | mikem | 2006-09-06 12:45:15 -0700 (Wed, 06 Sep 2006) | 3 lines

javadoc fixes.


------------------------------------------------------------------------
r440762 | djd | 2006-09-06 09:20:34 -0700 (Wed, 06 Sep 2006) | 2 lines

DERBY-1700 (partial) Add JUnit lang/TimeHandlingTest that perfoms tests on CURRENT TIME and CURRENT TIMESTAMP
and can be exapnded to test CURRENT DATE and other date & time functionality.
------------------------------------------------------------------------
r440550 | bpendleton | 2006-09-05 18:00:35 -0700 (Tue, 05 Sep 2006) | 10 lines

DERBY-1491: Provide ALTER TABLE functionality to change a column's default value

This change contains new test cases in the altertable.sql test which explore
the behavior of the ALTER TABLE ALTER COLUMN statement to alter a column's
defaults. Note that this patch only includes new tests; the current product
already supports the functionality to change a column's default value. The
code to support this was a side effect of the DERBY-119 changes, which wired up
the already-existing parser routines to the new ALTER TABLE t ALTER COLUMN c
statement.

------------------------------------------------------------------------
r440517 | kahatlen | 2006-09-05 15:43:23 -0700 (Tue, 05 Sep 2006) | 4 lines

DERBY-1813: Fix hard-coded JDBC 4.0 type constants

Updated JDBC40Translation with the new values.

------------------------------------------------------------------------
r440373 | djd | 2006-09-05 08:34:44 -0700 (Tue, 05 Sep 2006) | 4 lines

DERBY-1791 Change the test Security Manager policy files to use a different variable for derbyTesting.jar and derbyclient.jar.
Allows these jars to be in different directories to the other derby jars (e.g. the new distribution layout with
top level test folder). Makes the old harness use the eisting variables set up by the new JUnit related class
SecurityManagerSetup.
------------------------------------------------------------------------
r440321 | kahatlen | 2006-09-05 04:32:42 -0700 (Tue, 05 Sep 2006) | 2 lines

DERBY-1768: Removed empty JDBC 4.0 RowId classes

------------------------------------------------------------------------
r440062 | andreask | 2006-09-04 06:05:32 -0700 (Mon, 04 Sep 2006) | 1 line

DERBY-1800 testSetBinaryStreamLengthLessOnBlobTooLong fails with Unexpected SQL state. Fix is to flush the BLOB data when there is an SQLException
------------------------------------------------------------------------
r439861 | djd | 2006-09-03 15:41:46 -0700 (Sun, 03 Sep 2006) | 6 lines

DERBY-1700 (partial) Initial version of a TimeHandlingTest that includes tests for CURRENT TIME.
Will expand to also test CURRENT DATE and CURRENT TIMESTAMP.
Not yet added to the suites.
Improve CleanDatabaseTestSetup to allow it to be the super-class for a decorator that
performs initial schema setup with automatic dropping of everything.
Improved CleanDatabaseTestSetup to drop functions.
------------------------------------------------------------------------
r439845 | djd | 2006-09-03 14:09:19 -0700 (Sun, 03 Sep 2006) | 1 line

Improve JDBC.dropSchema to include dropping synoyms based upon JDBC metadata. Includes a workaround for DERBY-1790.
------------------------------------------------------------------------
r439775 | mikem | 2006-09-03 06:21:33 -0700 (Sun, 03 Sep 2006) | 19 lines

DERBY-1756
patch Derby1756.2.diff.txt contributed by Sunitha Kambhampati

with derby-962 changes, if client jvm supports EUSRIDPWD then the client would 
use EUSRIDPWD as the security mechanism. But it is possible that the server jvm
might not support EUSRIDPWD and the connection can fail.
When DERBY-1517, DERBY-1755 is fixed, there might be a way to use EUSRIDPWD 
when both client and server vm's have support for it.

This patch does the following:
o Do not use EUSRIDPWD as the default security mechanism even if the client vm can support it.
o Fix comments in testSecMec.java.
o Existing tests in testSecMec.java cover this codepath and the master file 
output reflects the changes made. Note, only the ibm14 client master file has 
changed since only ibm141 and greater jvms come with jce that can support 
eusridpwd.



------------------------------------------------------------------------
r439702 | mikem | 2006-09-02 19:28:35 -0700 (Sat, 02 Sep 2006) | 8 lines

DERBY-1810

Bumping the time to wait for server to start in this test.  In my environment
this test is failing consistently (and bad error handling in the test then 
causes this test to hang forever).  Bumping the timeout so far has made it 
pass (I tried it 10 times), where before it failed 10 times.


------------------------------------------------------------------------
r439335 | fuzzylogic | 2006-09-01 07:38:24 -0700 (Fri, 01 Sep 2006) | 4 lines

Additional j9 masters for DERBY-1702.

Committed for Myrna Van Lunteren <m.v.lunteren@gmail.com>

------------------------------------------------------------------------
r439315 | rhillegas | 2006-09-01 06:34:57 -0700 (Fri, 01 Sep 2006) | 1 line

DERBY-1566: Commit Jean's diff-4 changes to the message generator.
------------------------------------------------------------------------
r439279 | kahatlen | 2006-09-01 04:57:54 -0700 (Fri, 01 Sep 2006) | 8 lines

DERBY-418: outofmemory error when running large query in autocommit=false mode
DERBY-1142: Metadata calls leak memory

Notify GenericLanguageConnectionContext when activations are marked as
unused, and clean up unused activations when a new one is added.

Patch contributed by Mayuresh Nirhali.

------------------------------------------------------------------------
r439209 | fuzzylogic | 2006-08-31 23:37:39 -0700 (Thu, 31 Aug 2006) | 6 lines

Update j9 master due to recent changes for issues DERBY-836, DERBY-1554,
DERBY-1702, and add a comment regarding why floattypes is skipped on 1.3.1-level
VMs including wsdd5.6/wctme5.7.

Committed for Myrna Van Lunteren <m.v.lunteren@gmail.com>

------------------------------------------------------------------------
r439128 | suresht | 2006-08-31 18:19:50 -0700 (Thu, 31 Aug 2006) | 7 lines

DERBY-1783 (opening of file even on jvms with support for "rwd" mode incorrectly maps to "rw" mode). 

Patch that fixes the logical code error by adding parentheses around the OR clause. In addition one minor fix to the javadoc for the method is done.

Patch Contributed by Olav Sandstaa.


------------------------------------------------------------------------
r439098 | djd | 2006-08-31 16:25:25 -0700 (Thu, 31 Aug 2006) | 1 line

DERBY-1315 Missed UnionNode on last commit.
------------------------------------------------------------------------
r439093 | rhillegas | 2006-08-31 16:20:41 -0700 (Thu, 31 Aug 2006) | 1 line

DERBY-1566: Check in the SQLState generator written by David and debugged by Jean and John.
------------------------------------------------------------------------
r439083 | djd | 2006-08-31 15:57:32 -0700 (Thu, 31 Aug 2006) | 3 lines

DERBY-1315 This patch adds a small amount of logic to remove entries from an Optimizable's "best plan" HashMap when they are no longer needed. For more on when this is possible, see the discussion here:
http://article.gmane.org/gmane.comp.apache.db.derby.devel/26051
Patch contributed by "A B" qozinx@gmail.com
------------------------------------------------------------------------
r439048 | djd | 2006-08-31 14:06:49 -0700 (Thu, 31 Aug 2006) | 1 line

Fix type in javadoc for BaseJDBCTEstCase.
------------------------------------------------------------------------
r439041 | mikem | 2006-08-31 13:39:25 -0700 (Thu, 31 Aug 2006) | 15 lines

DERBY-1793

Increasing the maximum time to wait for the server to start up from 30 to 60 
seconds.  The test checks in 500ms increments, so this change does not increase
the time for test to run for those who are already successfully running it.
So far this change has made this test pass in my environment, where previously
it failed consistently.  Since this test passes in the nightly full test runs
across a number of environments I assume the network server startup time is
somehow related to my particular machine (processor, memory, disk frag, firewall, vpn, ...)

Others have seen this issue so I am committing to the codeline.  I have filed
a separate issue that work should be done to measure the performance of 
network server startup as a targeted test (DERBY-1794).


------------------------------------------------------------------------
r438996 | fuzzylogic | 2006-08-31 10:35:14 -0700 (Thu, 31 Aug 2006) | 3 lines

Put toursdb into a subdirectory in toursdb.jar so that it is possible to connect
to it.

------------------------------------------------------------------------
r438975 | djd | 2006-08-31 09:18:34 -0700 (Thu, 31 Aug 2006) | 5 lines

DERBY-1555 Add some code to allow different JUnit TestConfigurations at start up based upon if the TestConfiguration
class determines it is running within the old harness or not. Add a utility method to allow JUnit suites or tests
to determine if they are running in the harness or not, and thus have temporary code to ease transistion from
the old harness. With this commit the code is setup to assume it's always running in the harness, need some
more testing to fully support this flag when running outside the harness.
------------------------------------------------------------------------
r438972 | djd | 2006-08-31 09:15:07 -0700 (Thu, 31 Aug 2006) | 2 lines

Clean up some methods in BaseTestCase that were declared to throw PrivilegedActionException but actually had
no code that would do so.
------------------------------------------------------------------------
r438971 | djd | 2006-08-31 09:13:19 -0700 (Thu, 31 Aug 2006) | 1 line

Add some comments to hopefully clarify LangScripts purpose.
------------------------------------------------------------------------
r438942 | mikem | 2006-08-31 07:39:55 -0700 (Thu, 31 Aug 2006) | 11 lines

DERBY-1583
contributed by Bryan Pendleton

If a particular
ColumnDescriptor has no associated TableDescriptor at the
time that CompilerContextImpl.addRequiredColumnPriv is
called, then there is no column privilege that needs to be added. 




------------------------------------------------------------------------
r438578 | mikem | 2006-08-30 11:31:45 -0700 (Wed, 30 Aug 2006) | 3 lines

a couple of simple javadoc fixes.


------------------------------------------------------------------------
r438489 | andreask | 2006-08-30 07:11:08 -0700 (Wed, 30 Aug 2006) | 1 line

removed duplicated lines in properties file - DERBY-1558 followup
------------------------------------------------------------------------
r438478 | andreask | 2006-08-30 06:06:05 -0700 (Wed, 30 Aug 2006) | 1 line

DERBY-1559 when receiving a single EXTDTA object representing a BLOB, the server do not need to read it into memory before inserting it into the DB. Patch which reduces memory usage from 350 MB to 40 MB in network server vm when inserting a 64MB BLOB
------------------------------------------------------------------------
r438299 | djd | 2006-08-29 16:51:29 -0700 (Tue, 29 Aug 2006) | 4 lines

DERBY-1555 Add configuration decorator to change the default user for a configuaration
and use it in the NistScripts JUnit test. NistScripts is an initial pass at the setup of running
nist under JUnit, it fails at the moment in about a third of the test cases probably due to
output that is being sed'ed in the old harness and should not be.
------------------------------------------------------------------------
r438289 | fuzzylogic | 2006-08-29 16:26:32 -0700 (Tue, 29 Aug 2006) | 2 lines

Fix location of test directory in the -lib distribution.

------------------------------------------------------------------------
r438273 | djd | 2006-08-29 15:48:27 -0700 (Tue, 29 Aug 2006) | 1 line

Add comments to nist/readme to indicate changes to tests as required for revisions 438211 and 365776
------------------------------------------------------------------------
r438211 | djd | 2006-08-29 13:59:44 -0700 (Tue, 29 Aug 2006) | 1 line

Minor fix to nist scripts basetab, schema1 and schema5 not to call exit at the end as it is not required.
------------------------------------------------------------------------
r438122 | mikem | 2006-08-29 10:25:23 -0700 (Tue, 29 Aug 2006) | 21 lines

DERBY-1130
contributed by Deepa Remesh

Committing patch 'd1130-v2.diff' which ensures that database name set using setConnectionAttributes does not get used by client data sources. Changes are:

1) Appends the attributes in setConnectionAttributes method to database name only if database name has been already set on the data source. This will handle both these cases successfully:

a) When database name is not set as a DataSource property - In this case, if we pass in database name as a connection attribute, it will not get used. databaseName is a required Derby DataSource property. If it is not set, we cannot get a connection using the DataSource. It will fail with the following exception:
08001 - Required Derby DataSource property databaseName not set.
So, there is no need to append the connectionAttributes to the database name variable if databaseName DataSource property is not set. This way, we can avoid using database name in case it is passed in as a connection attribute.

Without the patch, if database name was not set, the code was using "null" as database name and creating a database named null if "create=true" is specified or throwing an exception that it cannot connect to database named null.

b) When database name is set as a DataSource property - In this case, if we pass in database name as a connection attribute, it will not be used. This is because database name set as DataSource property will over-ride it. This case is correctly handled (even without the patch).

2) The exception message is changed to indicate we are referring to "Derby DataSource" property:
08001 - Required Derby DataSource property databaseName not set.

3) Adds test to jdbcapi/checkDataSource.java. Adds a new method "testClientDSConnectionAttributes" which is run only in client framework. Modifies master files. 


------------------------------------------------------------------------
r437976 | kahatlen | 2006-08-28 22:50:44 -0700 (Mon, 28 Aug 2006) | 6 lines

DERBY-1417: Add new, lengthless overloads to the streaming api

Prevent materialization of lengthless streams in SQLBlob.setWidth().

Contributed by Kristian Waagan.

------------------------------------------------------------------------
r437832 | djd | 2006-08-28 14:02:18 -0700 (Mon, 28 Aug 2006) | 1 line

DERBY-1555 Remove comment left in after re-naming of method.
------------------------------------------------------------------------
r437823 | djd | 2006-08-28 13:53:57 -0700 (Mon, 28 Aug 2006) | 1 line

DERBY-1674 (partial) Remove TabInfo interface as the implementation of system tables is private to the impl/sql/catalog package.
------------------------------------------------------------------------
r437822 | djd | 2006-08-28 13:47:43 -0700 (Mon, 28 Aug 2006) | 5 lines

DERBY-1292 1) The addition of a copy method to org.apache.derby.client.am.ColumnMetaData.
2) Modifications to org.apache.derby.client.am.PreparedStatement to hold on to a copy of the column meta data for each entry used in batch updates.
3) A test was added to org.apache.derbyTestingfunctionTests.tests.derbynet.prepStmt. 

Patch contributed by James F. Adams derby@xemaps.com
------------------------------------------------------------------------
r437380 | mikem | 2006-08-27 08:10:06 -0700 (Sun, 27 Aug 2006) | 10 lines

DERBY-1681
contributed by Army Brown

Adding extra tests for this issue, fix already committed.  

Note that the test cases which were added for DERBY-1633 actually already 
demonstrate the problem reported (and now fixed) in this issue. This checkin
is a dedicated test case for this issue.


------------------------------------------------------------------------
r437215 | bpendleton | 2006-08-26 12:42:02 -0700 (Sat, 26 Aug 2006) | 18 lines

DERBY-119: Add ALTER TABLE option to change column from NULL to NOT NULL

This change merges the db2AlterColumn and columnAlterClause routines in
the parser to provide a single ALTER TABLE ALTER COLUMN statement that
provides support for changing the NULL / NOT NULL constraint on a
column in a table.

I believe that the existing execution code in AlterTableConstantAction
is correct, and so this patch primarily involves parser changes to hook
up the compiler to the existing execution code.

The patch also modifies the constraint handling in ModifyColumnNode so
that a column cannot be changed to NULL-able if it is part of either a
primary key or a unique constraint. Prior to the patch, ModifyColumnNode
only checked for a PRIMARY KEY constraint, so this patch also adds a check
for a UNIQUE constraint. It also rewords the error message to describe the
new conditions which can cause the ALTER COLUMN to be rejected.

------------------------------------------------------------------------
r437168 | kahatlen | 2006-08-26 07:31:51 -0700 (Sat, 26 Aug 2006) | 4 lines

DERBY-705: Re-enable test which was disabled in DERBY-506 commit

Patch contributed by V. Narayanan.

------------------------------------------------------------------------
r437127 | kahatlen | 2006-08-26 01:43:58 -0700 (Sat, 26 Aug 2006) | 15 lines

DERBY-1473: Add cut-off and truncation logic to streaming classes in
the embedded driver

This patch adds the capability to handle length less streams
properly. Such streams are now capped at the maximum length of the
column it is inserted into. If the stream is longer than the limit, a
DerbyIOException (subclass of IOException) is thrown, causing a
statement severity StandardException to be thrown. The exception
handling system takes care of cleaning up.

If a stream is shorter or longer than the specified length, an
exception is thrown as required by JDBC 3.0.

Contributed by Kristian Waagan.

------------------------------------------------------------------------
r437070 | djd | 2006-08-25 20:55:39 -0700 (Fri, 25 Aug 2006) | 2 lines

DERBY-883 Enhance GROUP BY clause to support expressions instead of just column references.
Patch contributed by  Manish Khettry - manish_khettry@yahoo.com
------------------------------------------------------------------------
r437009 | djd | 2006-08-25 16:12:15 -0700 (Fri, 25 Aug 2006) | 2 lines

DERBY-1555 (partial) Have SURDataModelSetup test for embedded vs. network using utility methods
in the JUnit classes.
------------------------------------------------------------------------
r436965 | djd | 2006-08-25 14:39:24 -0700 (Fri, 25 Aug 2006) | 1 line

DERBY-1555 (partial) Embedded and Client need to be public classes to run as JUnit tests.
------------------------------------------------------------------------
r436957 | djd | 2006-08-25 14:21:58 -0700 (Fri, 25 Aug 2006) | 4 lines

DERBY-1555 (partial) Add some top level JUnit suites that run all the tests in the packages (AllPackages),
all the tests in Embedded and (Derby) Client configurations and run All the configurations.
Also adds the logic in TestConfiguration to switch configurations to Client.
Just a checkpoint (incremental development), more work needed, see some failures running All.
------------------------------------------------------------------------
r436955 | djd | 2006-08-25 14:14:55 -0700 (Fri, 25 Aug 2006) | 1 line

Change jdcb40 suite to run most of the JUnit tests through _Suite.
------------------------------------------------------------------------
r436904 | mikem | 2006-08-25 11:57:57 -0700 (Fri, 25 Aug 2006) | 5 lines

DERBY-1698, contributed by Deepa Remesh

adds an additional test to jdbcapi/SetQueryTimeoutTest.java. This patch adds a test for executeUpdate method call.


------------------------------------------------------------------------
r436820 | djd | 2006-08-25 07:53:01 -0700 (Fri, 25 Aug 2006) | 5 lines

Make BaseTestCase install a security manager for its tests including adapting to the existing test
harness by not installing a security manager in that case. Allows JUnit tests to be run standalone
while installing a security manager automatically. Does require that the caller sets derby.system.home
when running the tests in JUnit test runners outside of the old harness. This will be addressed to
remove that requirement.
------------------------------------------------------------------------
r436817 | djd | 2006-08-25 07:37:38 -0700 (Fri, 25 Aug 2006) | 3 lines

Add some the JUnit test LnagScripts to the lang._Suite suite to start testing of running the .sql
scripts using JUnit. Currently it runs up to about eight test depending on configuration. These
tests do not currently replace the running of the scripts as regulaar tests.
------------------------------------------------------------------------
r436672 | fuzzylogic | 2006-08-24 23:20:13 -0700 (Thu, 24 Aug 2006) | 5 lines

DERby-1695: Add update4d testSecMec masters for JCC 2.6 and 2.8 needed after
DERBY-528.

Committed for Sunitha Kambhampati <ksunithaghm@gmail.com>

------------------------------------------------------------------------
r436660 | djd | 2006-08-24 22:02:56 -0700 (Thu, 24 Aug 2006) | 3 lines

Provide a consistent mechanism to test if the classes are being loaded by jars or
not in JUnit tests. Uses the SecurityManagerSetup class which basically already
determined this information at its startup.
------------------------------------------------------------------------
r436658 | fuzzylogic | 2006-08-24 21:57:36 -0700 (Thu, 24 Aug 2006) | 2 lines

Fix single quotes in a few messages to follow MessageFormat rules.

------------------------------------------------------------------------
r436653 | djd | 2006-08-24 21:52:09 -0700 (Thu, 24 Aug 2006) | 3 lines

Add DatabasePropertyTestSetup decorator that sets and clears database properties.
Fix a bug in SystemPropertyTestSetup noticed while testing DatabasePropertyTestSetup.
Change ConcurrencyTest to use DatabasePropertyTestSetup to work around bug DERBY-1762.
------------------------------------------------------------------------
r434587 | djd | 2006-08-24 18:27:39 -0700 (Thu, 24 Aug 2006) | 1 line

remove debug println accidently left in.
------------------------------------------------------------------------
r434586 | djd | 2006-08-24 18:26:59 -0700 (Thu, 24 Aug 2006) | 2 lines

Cleanup the autoloading tests to move the setup checks out of TestConfiguration into the tests
themselves as they are very specific to the autoloading tests.
------------------------------------------------------------------------
r434581 | djd | 2006-08-24 17:35:49 -0700 (Thu, 24 Aug 2006) | 1 line

Remove the assertSQLState from JDBC, one was already in BaseJDBCTestCase.
------------------------------------------------------------------------
r434577 | mikem | 2006-08-24 17:08:39 -0700 (Thu, 24 Aug 2006) | 5 lines

DERBY-1708, contributed by yip ng

Fixes the problem that the lock table statement is missing the logic to collect the required privilege at compilation phase; thus, it fails to enforce the required privilege needed by the statement at execution time. 


------------------------------------------------------------------------
r434562 | djd | 2006-08-24 16:31:20 -0700 (Thu, 24 Aug 2006) | 2 lines

Add methods to get a consistent folder for JUnit tests to store any failure information in.
Split the output comparision and handling from ScriptTestCase into CanonTestCase.
------------------------------------------------------------------------
r434556 | bpendleton | 2006-08-24 15:59:52 -0700 (Thu, 24 Aug 2006) | 36 lines

DERBY-688: Enhancements to XML functionality toward XPath/XQuery support

This patch was submitted by Army Brown (qozinx@gmail.com)

Attaching a "phase 7" patch, d688_phase7_v1.patch, that does the following:

  1 - Makes changes to catch all "Throwable" errors that might be
      thrown by Xalan or JAXP, instead of just catching the exceptions
      declared by the APIs. This is per the email thread here:

      http://www.nabble.com/xalan-assertion-when-execution-a-xml-query...-tf2149830.html#a5953476

      This allows Derby to continue working as normal if/when an
      unexpected Xalan/JAXP error (such NPE or assertion failure)
      occurs. In that case the statement itself will fail and the
      error will be printed, but Derby will continue to work as
      expected after the failure.

  2 - Slight change so that, in the event of an unexpected Xalan
      compilation error, the name of the operator that encountered
      the error will be printed as part of Derby's message. Currently
      the operator name isn't passed in and thus "{0}" shows up
      in the error message, which is incorrect.

  3 - Fixes a small bug in XML query execution code that was leading
      to NPEs in Xalan. Namely, the current code passes a null argument
      into Xalan where a non-null is expected (and required) for namespace
      prefix resolution.

  4 - Makes the first of two changes required to ensure Derby SQL/XML
      support agrees with the specification. The two changes are
      mentioned in my previous comments; this phase 7 patch addresses
      the first one (insertion of a non-Document node into a Derby XML
      column should not be allowed).


------------------------------------------------------------------------
r434408 | rhillegas | 2006-08-24 08:58:27 -0700 (Thu, 24 Aug 2006) | 1 line

DERBY-1582: Commit Deepa's d1582_v2.diff patch, raising a warning for vacuous REVOKEs.
------------------------------------------------------------------------
r434309 | kahatlen | 2006-08-23 23:11:32 -0700 (Wed, 23 Aug 2006) | 8 lines

DERBY-1500: PreparedStatement#setObject(int parameterIndex, Object x)
throws SQL Exception when binding Short value in embedded mode

setObject(int, Byte) is translated to setByte(int, byte)
setObject(int, Short) is translated to setShort(int, short)

Added test cases in jdbcapi/parameterMapping.java.

------------------------------------------------------------------------
r434273 | djd | 2006-08-23 17:38:45 -0700 (Wed, 23 Aug 2006) | 1 line

DERBY-1555 fix stray character in TestConfiguration that broke build.
------------------------------------------------------------------------
r434257 | djd | 2006-08-23 17:06:33 -0700 (Wed, 23 Aug 2006) | 3 lines

DERBY-1555 (partial) Remove access and use of static variables to store the current test configuration.
Changed to use a ThreadLocal private to TestConfiguration and access to the current configuration
is through utility methods in the base classes or TestConfiguration.getCurrent().
------------------------------------------------------------------------
r434245 | fuzzylogic | 2006-08-23 16:23:13 -0700 (Wed, 23 Aug 2006) | 3 lines

DERBY-1691: exclude blobclob4BLOB from running against JCC until the test
can be fixed.

------------------------------------------------------------------------
r434192 | djd | 2006-08-23 14:31:54 -0700 (Wed, 23 Aug 2006) | 2 lines

DERBY-1555 Change BaseJDBCTestCase.getXConnection() to getConnection and provide consistent initialization
of all connections returned by instance methods of BaseJDBCTestCase.
------------------------------------------------------------------------
r434169 | djd | 2006-08-23 13:42:13 -0700 (Wed, 23 Aug 2006) | 2 lines

Update the jdbc4 JUnit tests to use the recent additions, such as the single connection provided
by BaseJDBCTestCase and the test decorator base class BaseJDBCTestSetup.
------------------------------------------------------------------------
r434111 | rhillegas | 2006-08-23 11:14:11 -0700 (Wed, 23 Aug 2006) | 1 line

DERBY-1633: Commit Army's d1633_v3 patches, fixing the regression introduced by DERBY-805 in the behavior of views that involve joins.
------------------------------------------------------------------------
r434100 | djd | 2006-08-23 10:49:17 -0700 (Wed, 23 Aug 2006) | 5 lines

DERBY-1674 (partial) CatalogRowFactory.buildEmptyIndexRow() row was implemented in all the sub-classes but could
never be called, except for SYSTABLESRowFactory. Seen by code inspection and double checked with the code
coverage. Remove all the methods (except SYSTABLESRowFactory) and abstract definition in CatalogRowFactory.
Changed DataDictionaryImpl to call buildEmptyIndexRow using a reference to SYSTABLESRowFactory since it
was special case code for SYSTABLES.
------------------------------------------------------------------------
r434083 | djd | 2006-08-23 10:12:01 -0700 (Wed, 23 Aug 2006) | 1 line

DERBY-1734 (partial) Switch to simpler definition of system columns for SYSCHECKS, SYSCOLPERMS, SYSDUMMY1 and SYSFILES.
------------------------------------------------------------------------
r434046 | rhillegas | 2006-08-23 06:48:54 -0700 (Wed, 23 Aug 2006) | 1 line

DERBY-1621: Commit derby1621trunkdiff04.txt, causing recompilation of trigger actions after ddl.
------------------------------------------------------------------------
r434018 | kahatlen | 2006-08-23 05:02:52 -0700 (Wed, 23 Aug 2006) | 5 lines

DERBY-1743: derbynet/testSecMec.java fails with NullPointerException
(intermittent failure)

Make sure the logWriter is not null before printing the stack trace.

------------------------------------------------------------------------
r433931 | fuzzylogic | 2006-08-22 23:25:34 -0700 (Tue, 22 Aug 2006) | 2 lines

Add note about using ant -propertyfile to BUILDING.txt

------------------------------------------------------------------------
r433816 | fuzzylogic | 2006-08-22 17:44:18 -0700 (Tue, 22 Aug 2006) | 4 lines

DERBY-1033 DERBY-1405 DERBY-935: Add new top-level index.html to -bin
distribution which has links to the docs, demos, javadoc and external
resources. Also add the logo to the -bin distribution.

------------------------------------------------------------------------
r433790 | fuzzylogic | 2006-08-22 15:54:32 -0700 (Tue, 22 Aug 2006) | 3 lines

Add some JCC and JDK version specific masters in the hopes of fixing the
blobclob4BLOB test.

------------------------------------------------------------------------
r433688 | djd | 2006-08-22 09:51:41 -0700 (Tue, 22 Aug 2006) | 4 lines

DERBY-1674 (partial) Step towards removing iapi.sql.dictionary.TabInfo as its implementation TabInfoImpl
should be package private to impl.sql.catalog. All references now use TabInfoImpl directly instead
of TabInfo. Next step is to move the javadoc comments from TabInfo into TabInfoImpl and remove the class.
Simplify TabInfoImpl and IndexInfoImpl to not duplicate variables from CatalogRowFactory.
------------------------------------------------------------------------
r433685 | djd | 2006-08-22 09:48:11 -0700 (Tue, 22 Aug 2006) | 1 line

DERBY-1674 (partial) Remove IndexScan class from impl.sql.catalog as it is never used.
------------------------------------------------------------------------
r433655 | tmnk | 2006-08-22 07:57:58 -0700 (Tue, 22 Aug 2006) | 1 line

- Rollback DERBY-1513_DERBY-1535 see DERBY-1610 for detail - Patch by Tomohito Nakayama (tomonaka@basil.ocn.ne.jp)
------------------------------------------------------------------------
r433632 | djd | 2006-08-22 06:50:53 -0700 (Tue, 22 Aug 2006) | 1 line

DERBY-1674 Remove some unused methods related to TabInfo classes.
------------------------------------------------------------------------
r433607 | andreask | 2006-08-22 04:46:13 -0700 (Tue, 22 Aug 2006) | 2 lines

DERBY-1558 enable more testcases in ConcurrencyTest. The patch makes use of SystemPropertiesTestSetup within the ConcurrencyTest.suite method to reduce lock timeout. It additionally makes use of NetworkServerTestSetup from the _Suite.suite() method. The _Suite_app.properties has been added to disable starting of network server. 

------------------------------------------------------------------------
r433491 | djd | 2006-08-21 20:47:44 -0700 (Mon, 21 Aug 2006) | 2 lines

DERBY-1739 Fix build error by missed change in SYSVIEWSRowFactory.java

------------------------------------------------------------------------
r433487 | djd | 2006-08-21 20:33:15 -0700 (Mon, 21 Aug 2006) | 4 lines

DERBY-1739 Do not have a set of column name for indexesin implementations of CatalogRowFactory
as they were never used and are of no need. If the column name was needed it would be better
to derive it from the column postions of the index, rather than duplicating information.

------------------------------------------------------------------------
r433450 | bpendleton | 2006-08-21 18:20:11 -0700 (Mon, 21 Aug 2006) | 9 lines

DERBY-688: Enhancements to XML functionality toward XPath/XQuery support

This patch was contributed by Army Brown (qozinx@gmail.com)

This change contains d688_phase6_v1.patch, which changes the SQLSTATEs for
XML errors to match the SQL/XML specification where possible, and that
moves the Derby-specific XML sql states to a compile-time range
(42Z70 - 42Z7Z) instead of an execution-time range (X0Xxx). 

------------------------------------------------------------------------
r433446 | djd | 2006-08-21 17:47:33 -0700 (Mon, 21 Aug 2006) | 1 line

DERBY-1739 (partial) Clean up implementation classes IndexInfoImpl and TabInfoImpl to not have public scope.
------------------------------------------------------------------------
r433445 | djd | 2006-08-21 17:41:28 -0700 (Mon, 21 Aug 2006) | 2 lines

DERBY-744 Add dependency of buildsource on the demo target to ensure correct ordering when executing ant all

------------------------------------------------------------------------
r433443 | djd | 2006-08-21 17:38:03 -0700 (Mon, 21 Aug 2006) | 3 lines

DERBY-744 Correct checking if the sane property is set.
Patch contributed by Andrew McIntyre

------------------------------------------------------------------------
r433434 | djd | 2006-08-21 17:05:45 -0700 (Mon, 21 Aug 2006) | 5 lines

DERBY-1734 (partial) Change SYSALIASESRowFactory to use the utility methods to obtain SystemColumn implementations
to avoid passing redundant parameters leading to bugs (see DERBY-1742). Fix the bug described by DERBY-1742
so that the column descriptor for SYSTEMALIAS BOOLEAN column is created correctly. Remove the calls to
convert the case for the SYSTEMALIASES columns as the system tables are an implementation detail of
Derby which is fixed at upper case.
------------------------------------------------------------------------
r433349 | djd | 2006-08-21 13:31:07 -0700 (Mon, 21 Aug 2006) | 5 lines

DERBY-1734 (partial) Add some utilitiy static factory methods to SystemColumnImpl to allow
easier building of system column lists for CatalogRowFactory. Remove column position (identifer)
from SystemColumn since it was redundant information. Still passed in some constructors of
SystemColumnImpl until all of the CatalogRowFactory implementations are modified to have
cleaner buildColumnList methods.
------------------------------------------------------------------------
r433331 | djd | 2006-08-21 12:19:07 -0700 (Mon, 21 Aug 2006) | 5 lines

DERBY-1609 Add IJRunScriptTest and _Suite JUnit tests for the testing of ij.runScript.
Modify runScript to take an OutputStream instead of a PrintStream, fix it to
correctly return the number of errors seen while running the script.
Add utility methods to BaseJDBCTestCase to run setup scripts from an InputStream or a String.

------------------------------------------------------------------------
r433274 | djd | 2006-08-21 09:11:36 -0700 (Mon, 21 Aug 2006) | 1 line

DERBY-1609 (partial) Remove some unused code in JDBCDisplayUtil.
------------------------------------------------------------------------
r433273 | djd | 2006-08-21 09:10:43 -0700 (Mon, 21 Aug 2006) | 2 lines

DERBY-1609 (partial) Fix a security exception reading the system property ij.showErrorCode.
Add code to return an error count for runScript (still needs to be tested).
------------------------------------------------------------------------
r433261 | djd | 2006-08-21 08:21:52 -0700 (Mon, 21 Aug 2006) | 4 lines

Remove largeCodeGen from lang._Suite as the test is too unstable to run in the nightlies
due to the different memory usage across vms. DERBY-1315 and DERBY-1735 should address
adding the test back in.

------------------------------------------------------------------------
r433085 | djd | 2006-08-20 16:22:04 -0700 (Sun, 20 Aug 2006) | 4 lines

DERBY-766 DERBY-1714 Convert largeCodeGen to a JUnit test, add it to the lang._Suite and add that to
the derbylang.runall old harness suite. Added tests for insert a large number of rows with a VALUES
clause. Test needs further improvements due to errors from DERBY-1315 and stack overflow with
a large INSERT VALUES clause.
------------------------------------------------------------------------
r432972 | djd | 2006-08-20 07:46:09 -0700 (Sun, 20 Aug 2006) | 3 lines

DERBY-1674 (partial) Move PermissionsCatalogRowFactory into its correct location under impl/sql/catalog.
System tables are a detail of the catalog implementation, not the dictionary api. The class was only ever referenced
in the impl/sql/catalog package.
------------------------------------------------------------------------
r432929 | bandaram | 2006-08-19 20:15:57 -0700 (Sat, 19 Aug 2006) | 4 lines

DERBY-1538: Disable GRANT or REVOKE operations for object owners and raise an error when attempted. Also Database owner will not be able to revoke or grant access to object owners as well.

Submitted by Satheesh Bandaram (bandaram@gmail.com)

------------------------------------------------------------------------
r432895 | djd | 2006-08-19 16:17:24 -0700 (Sat, 19 Aug 2006) | 2 lines

DERBY-1674 (partial) Clean up SystemColumn interface and implementation to hold the data type of
the column using the standard DataTypeDescriptor class rather than individual fields.
------------------------------------------------------------------------
r432859 | fuzzylogic | 2006-08-19 11:54:29 -0700 (Sat, 19 Aug 2006) | 2 lines

DERBY-1730: Fix generation of OSGi attributes in derby.jar manifest

------------------------------------------------------------------------
r432856 | djd | 2006-08-19 11:40:47 -0700 (Sat, 19 Aug 2006) | 7 lines

DERBY-766 DERBY-1714 Working method in CodeChunk that splits expressions out of generated methods that are too large.
Bumps the number of unions supported in largeCodeGen to over 6,000 from around 800. Also increases the
number of rows supported in a VALUES clause. A large number of UNION clauses still requires a large amount of
memory for optimization (see DERBY-1315). A large number of rows in a VALUES clause fails at some point due to
a StackOverflow. Subsequent commit will modify largeCodeGen to be a JUnit test and adapt to these changes
but running into issues finding a useful workign limits that can produce repeatable results without
hitting memory issues.
------------------------------------------------------------------------
r432705 | fuzzylogic | 2006-08-18 12:55:13 -0700 (Fri, 18 Aug 2006) | 2 lines

Minor javadoc fix to NetConnectionReply. Make @param parameter names match the method declaration.

------------------------------------------------------------------------
r432654 | djd | 2006-08-18 10:23:21 -0700 (Fri, 18 Aug 2006) | 1 line

Fix jdbcapi._Suite in DB2 client run by disabling ResultSetCloseTest
------------------------------------------------------------------------
r432645 | kahatlen | 2006-08-18 10:15:37 -0700 (Fri, 18 Aug 2006) | 10 lines

DERBY-244: with linux, depending on env setting $LANG and console
encoding, some i18n tests fail

  * Run the i18n tests run with -Dfile.encoding=UTF-8 and
    -Dconsole.encoding=UTF-8
  * Use UTF-8 encoding in ProcessStreamResult for the i18n tests
  * Make Sed.java read result files from i18n tests using UTF-8 encoding
  * Respect the derby.ui.codeset setting in i18n tests, and use UTF-8 if it
    is not specified.

------------------------------------------------------------------------
r432569 | andreask | 2006-08-18 06:05:45 -0700 (Fri, 18 Aug 2006) | 1 line

Fixed bug in setUp causing it to only start server when running in embedded mode. Removed import of ..functionalTests.util package.
------------------------------------------------------------------------
r432493 | kahatlen | 2006-08-17 22:47:07 -0700 (Thu, 17 Aug 2006) | 10 lines

DERBY-1710: Unchecked casts from SQLException to EmbedSQLException
cause ClassCastException in NetworkServerControlImpl when running
Java SE 6

The attached patch makes NetworkServerControlImpl use
SQLException.getSQLState() instead of EmbedSQLException.getMessageId()
where possible. Where it is not possible, check that the exception is
EmbedSQLException before casting, and fall back to a more generic
approach if it is not.

------------------------------------------------------------------------
r432487 | djd | 2006-08-17 21:41:49 -0700 (Thu, 17 Aug 2006) | 1 line

Move the framework JUnit classes for Derby into org.apache.derbyTesting.junit package.
------------------------------------------------------------------------
r432484 | djd | 2006-08-17 21:02:13 -0700 (Thu, 17 Aug 2006) | 1 line

Change ShutDownDBWhenNSShutsDownTest.java to use the connection provided by BaseJDBCTestCase.
------------------------------------------------------------------------
r432481 | djd | 2006-08-17 20:55:02 -0700 (Thu, 17 Aug 2006) | 1 line

Have ScriptTestCase use the connection provided by BaseJDBCTestCase.
------------------------------------------------------------------------
r432480 | djd | 2006-08-17 20:52:01 -0700 (Thu, 17 Aug 2006) | 1 line

Add a clean database test decorator to ProcedureTest.
------------------------------------------------------------------------
r432479 | djd | 2006-08-17 20:43:52 -0700 (Thu, 17 Aug 2006) | 1 line

Add a couple _Suite JUnit suites in lang and jdbc4, as framework, neither is used yet.
------------------------------------------------------------------------
r432478 | djd | 2006-08-17 20:42:29 -0700 (Thu, 17 Aug 2006) | 2 lines

Add some grant/revoke tests to PrepareExecuteDDL.

------------------------------------------------------------------------
r432477 | djd | 2006-08-17 20:39:11 -0700 (Thu, 17 Aug 2006) | 2 lines

Removing throwing Exception from setting up the Suite for ClosedObjectTest.

------------------------------------------------------------------------
r432475 | djd | 2006-08-17 20:37:20 -0700 (Thu, 17 Aug 2006) | 2 lines

DERBY-1712 Missed commit of TestConfiguration.

------------------------------------------------------------------------
r432469 | djd | 2006-08-17 19:48:15 -0700 (Thu, 17 Aug 2006) | 1 line

Remove Junit tests from jdbcapi.runall that included in _Suite.
------------------------------------------------------------------------
r432468 | djd | 2006-08-17 19:43:47 -0700 (Thu, 17 Aug 2006) | 3 lines

The patch (DERBY-1712.diff) has a new class NetworkServerTestSetup. This class is put into a new package for junit components, called org.apache.derbyTesting.junit, and the patch therefore also contains a new build file.
TestConfiguration had to be modified so that the new class could use DERBY_TEST_CONFIG attribute. 
patch contributed by Andreas Korneliusse nandreas.korneliussen@sun.com
------------------------------------------------------------------------
r432457 | djd | 2006-08-17 18:01:29 -0700 (Thu, 17 Aug 2006) | 3 lines

Change DataSourcePropertiesTest to be a self describing test and not rely on the old
test harness _app.properties method. Add it and ResultSetCloseTest to jdbcapi._Suite.

------------------------------------------------------------------------
r432456 | djd | 2006-08-17 17:59:18 -0700 (Thu, 17 Aug 2006) | 2 lines

Make ResultSetCloseTest and BLOBTest use the utility methods from BaseJDBCTestCase instead of using getXConnection().

------------------------------------------------------------------------
r432453 | djd | 2006-08-17 17:51:57 -0700 (Thu, 17 Aug 2006) | 2 lines

Change ProcedureTest to use the utility methods provided by BaseJDBCTestCase instead of using getXConnection.

------------------------------------------------------------------------
r432451 | djd | 2006-08-17 17:50:41 -0700 (Thu, 17 Aug 2006) | 3 lines

Change UpdateXXXTest suite method to pick up test methods starting with test automatically and
rename test that needs to be added when jdbc 2 or greater is supported.

------------------------------------------------------------------------
r432450 | djd | 2006-08-17 17:47:41 -0700 (Thu, 17 Aug 2006) | 4 lines

DERBY-1555 DERBY-1701 (partial) Change the tests that extend SURBaseTest to use the utilitiy methods
rather than the con field from SURBaseTest to fit into the generic single connection model provided
by BaseJDBCTestCase. Incremental development, next step will be to remove the con field from SURBaseTest.

------------------------------------------------------------------------
r432438 | djd | 2006-08-17 17:00:20 -0700 (Thu, 17 Aug 2006) | 5 lines

DERBY-1555 DERBY-1701 (partial) Incremental step in changing the tests that extend
SURBaseTest to use the single connection provided by BaseJDBCTestCase. Added
initialize method to BaseJDBCTestCase to allow tests to have a consistent
initial state for a connection. The SURBaseTest still has its con variable,
will be cleaned up in subsequent commits.
------------------------------------------------------------------------
r432432 | davidvc | 2006-08-17 16:38:38 -0700 (Thu, 17 Aug 2006) | 7 lines

DERBY-1691: jdbcapi/blobclob4BLOB.java fails under DerbyNet framework 
with JCC 2.6.

I filtered out the odd class obfuscation differences with the SqlException
class.  Passes with JCC 2.6 (I got the upgrade from the Cloudscape
site).

------------------------------------------------------------------------
r432367 | mikem | 2006-08-17 12:53:33 -0700 (Thu, 17 Aug 2006) | 12 lines

DERBY-1681, submitted by Army Brown

Fixes the following issue:
If Derby chooses to do a join between two FromTables and the right table is a chain of UNIONs, then the optimizer may choose to push the join predicate (if provided) down into the UNION and to both children of every UNION in the chain. But if the predicate cannot be pushed to the children of any of the UNIONs (except the top-level one) the predicate can end up being ignored altogether with respect to that UNION's children. The result is that query execution can return rows that do not satisfy the predicate.

This is a regression introduced in 10.1.2.4 and thus it affects 10.1.3 and 10.2. I came across this while tracing through code for DERBY-1633.

For more detailed explanation of problem and solution see html doc attached to
DERBY-1681.



------------------------------------------------------------------------
r432222 | djd | 2006-08-17 06:05:24 -0700 (Thu, 17 Aug 2006) | 2 lines

DERBY-1555 DERBY-1701 (partial) Add utiltiy methods to BaseJDBCTestCase to get Statements, PreparedStatements against
the default connection for the test.
------------------------------------------------------------------------
r432159 | fuzzylogic | 2006-08-16 22:51:03 -0700 (Wed, 16 Aug 2006) | 3 lines

DERBY-1032: Add scripts in bin to distributions and snapshots, remove frameworks
from snapshots.

------------------------------------------------------------------------
r432031 | djd | 2006-08-16 13:58:01 -0700 (Wed, 16 Aug 2006) | 1 line

DERBY-1701 (partial) change SURDataModelSetup to extend from BaseJDBCTestSetup and use its connection handling.
------------------------------------------------------------------------
r432029 | kahatlen | 2006-08-16 13:43:34 -0700 (Wed, 16 Aug 2006) | 8 lines

DERBY-1692: Client driver does not use the query timeout value set
using Statement.setQueryTimeout() for subsequent executions using the
same statement object

Make Statement resend the timeout value for each execution, and extend
SetQueryTimeoutTest with test cases for re-execution of Statement,
PreparedStatement and CallableStatement.

------------------------------------------------------------------------
r432028 | djd | 2006-08-16 13:42:18 -0700 (Wed, 16 Aug 2006) | 2 lines

DERBY-1555 DERBY-1701 (partial) Convert more tests to use the instance based get[X]Connection method
or the static openDefault method.
------------------------------------------------------------------------
r431999 | djd | 2006-08-16 12:25:31 -0700 (Wed, 16 Aug 2006) | 6 lines

DERBY-1555 DERBY-1701 (partial) Improve the BaseJDBCTest by adding support for a default connection
exactly like BaseJDBCTestSetup. Provides consistent handling for a connection in the common case
of a test using just one. Removes duplicated/inconistent code across many tests. First step
has the getConnection method called getXConnection until all the tests ahve stopped using the getConnection
static method and instead use the openDefaultConnection method.
Change the tests in jdbcapi to the new scheme.
------------------------------------------------------------------------
r431939 | djd | 2006-08-16 09:27:48 -0700 (Wed, 16 Aug 2006) | 1 line

DERBY-1701 (partial) Close statements and result sets in BLOBTest.
------------------------------------------------------------------------
r431919 | djd | 2006-08-16 08:19:05 -0700 (Wed, 16 Aug 2006) | 4 lines

DERBY-1555 DERBY-1701 (partial) Change the name of the TestConfiguration methods to openConnection from getConnection.
Step to having BaseJDBCTestCase.getConnection() be a method matching BaseJDBCTestSetup.getConnection, a handle
to a default connection stored in the instance. This will remove a lot of code in the classes that extend BaseJDBCTestCase
that store a connection locally and have N different ways of cleaning it up.
------------------------------------------------------------------------
r431916 | djd | 2006-08-16 08:10:04 -0700 (Wed, 16 Aug 2006) | 1 line

DERBY-1701 (partial) close a Statement object in the BlobTest
------------------------------------------------------------------------
r431884 | andreask | 2006-08-16 05:08:06 -0700 (Wed, 16 Aug 2006) | 1 line

added PGP key for Andreas Korneliussen
------------------------------------------------------------------------
r431844 | kahatlen | 2006-08-15 23:44:17 -0700 (Tue, 15 Aug 2006) | 2 lines

Added my PGP key.

------------------------------------------------------------------------
r431799 | djd | 2006-08-15 21:39:51 -0700 (Tue, 15 Aug 2006) | 4 lines

DERBY-1701 (partial) Clean up some of the jdbcapi tests by closing statements when finished and
cleaning up the connection. The connection handling needs to be simplified by having default connection
handling in BaseJDBCTestCase.

------------------------------------------------------------------------
r431744 | rhillegas | 2006-08-15 17:13:05 -0700 (Tue, 15 Aug 2006) | 1 line

DERBY-1689: Commit remove_10_2_upg_test.diff, removing the test for 10.1 to 10.2 upgrade.
------------------------------------------------------------------------
r431741 | bpendleton | 2006-08-15 16:48:22 -0700 (Tue, 15 Aug 2006) | 17 lines

DERBY-415 : sysinfo with -cp client should not complain about DB2 Driver

This change modifies the behavior of the "-cp client" argument to the
sysinfo tool. Formerly, this argument checked for both the DerbyNetClient
and the DB2 JCC driver, and complained if both drivers were not present.

Increasingly, users of Derby are using just the DerbyNetClient, and the use
of the JCC driver is less common, so it makes sense that "-cp client" should
focus on the DerbyNetClient, and the DB2 JCC driver can be treated separately.

So, "-cp client" now only checks for the DerbyNetClient, and a new argument
"-cp db2driver" is added to check for the DB2 JCC driver. The new behavior is:
   java sysinfo -cp: checks all the various components of the classpath
   java sysinfo -cp client: just checks the network client
   java sysinfo -cp db2driver: just checks the JCC driver


------------------------------------------------------------------------
r431734 | suresht | 2006-08-15 16:26:50 -0700 (Tue, 15 Aug 2006) | 4 lines

This patch fixes couple of java doc warnings. 

Contributed by Army Brown (qozinx@gmail.com).

------------------------------------------------------------------------
r431698 | mikem | 2006-08-15 13:55:21 -0700 (Tue, 15 Aug 2006) | 9 lines

DERBY-1652, submitted by Yip Ng

The cause of the problem is that the trigger descriptor is created after the stored prepared statement(SPS) has been compiled, so the compiled form of the SPS is not aware of that its trigger action can fire on the trigger table itself. Hence, the constant action was not generated correctly.

During upgrade, the SPSs are invalidated at database boot time. The SPS will be recompile when it is being invoked and the recompilation at this point will of course detect the relevent trigger and generate the correct constant action for the SPS and produce the expected behavior when the SPS is executed - throwing an error when it exceeds the trigger's maximum depth in the above case.

The simplest solution without introducing another revalidation of the SPS is to create the trigger descriptor first before compiling the SPS. I ran derbyall and had to go over the testcases which have the wrong master outputs and I have corrected them on this patch.


------------------------------------------------------------------------
r431697 | djd | 2006-08-15 13:38:48 -0700 (Tue, 15 Aug 2006) | 2 lines

DERBY-1694 Cleanup derbynet/testProperties so that it always handles the output from the processes it forks.
Not handling the output can lead to hangs according to the javadoc for java.lang.Process.
------------------------------------------------------------------------
r431696 | djd | 2006-08-15 13:37:07 -0700 (Tue, 15 Aug 2006) | 2 lines

Fix testSecMec so that if the server fails to start (checked by pinging it) the test prints a fail message
and completes, rather than just calling System.exit().
------------------------------------------------------------------------
r431663 | davidvc | 2006-08-15 11:35:54 -0700 (Tue, 15 Aug 2006) | 2 lines

DERBY-1691: jdbcapi/blobclob4BLOB.java fails under DerbyNet framework 

------------------------------------------------------------------------
r431603 | kahatlen | 2006-08-15 07:20:46 -0700 (Tue, 15 Aug 2006) | 5 lines

DERBY-1688: ConsistencyToken.hashCode() is not thread safe

Rewrite the method to use a thread-safe approach as suggested by The
"Double-Checked Locking is Broken" Declaration.

------------------------------------------------------------------------
r431593 | kahatlen | 2006-08-15 05:46:30 -0700 (Tue, 15 Aug 2006) | 12 lines

DERBY-1574: NullPointerException in UPDATE with COALESCE and subquery

This patch
- adds a preprocess method to CoalesceFunctionNode to override the one
  in ValueNode, thus making sure the arguments get handled.
- adds a printSubNodes method to CoalesceFunctionNode (was missing
  too, I discovered, when I was trying to look at the parse tree after
  binding).
- adds a new test case to coalesceTests.java and an updated master

Patch contributed by Dag H. Wanvik.

------------------------------------------------------------------------
r431474 | djd | 2006-08-14 16:50:03 -0700 (Mon, 14 Aug 2006) | 5 lines

DERBY-766 (partial) Almost working code in CodeChunk that splits expressions out from a method into
a sub-method for generated code. Increased the number of unions supported in the largeCodeGen test
from ~800 to ~1300. Code not yet enabled as some unexpected errors exist at 1400 unions, leading
to a ClassCastException. Committing as a checkpoint, the actual split call from BCMethod is commented
out to avoid any problems running it.
------------------------------------------------------------------------
r431395 | davidvc | 2006-08-14 11:17:57 -0700 (Mon, 14 Aug 2006) | 5 lines

DERBY-1664: (Partial) This is the first pass at a test that can be used
to gauge how long it takes to do each part of the startup process.  
This could likely be extended to also test how long it takes to create
tables of different size, how long it takes to insert rows, etc.

------------------------------------------------------------------------
r431293 | bandaram | 2006-08-13 22:06:16 -0700 (Sun, 13 Aug 2006) | 4 lines

DERBY-634: Prevent StackOverflow due to bad subquery optimization. Prevent cases of subquery optimization that can cause runtime stack overflow.

Submitted by Satheesh Bandaram (satheesh@gmail.com)

------------------------------------------------------------------------
r431195 | djd | 2006-08-13 10:08:04 -0700 (Sun, 13 Aug 2006) | 5 lines

Have the test harness jdbcapi run a single JUnit suite jdbcapi._Suite that includes most of the JUnit tests
that were run individually. Tests in this suite that were excluded in derby net or had _app.properties file
now self-exclude themselves based upon the JUnit utility methods indicating which JDBC client they are running.
Remaining JUnit tests should be included in jdbcapi._Suite, think they were added after I has started the _Suite
work.
------------------------------------------------------------------------
r430946 | fuzzylogic | 2006-08-11 19:37:38 -0700 (Fri, 11 Aug 2006) | 2 lines

Fix missed masters due to 10.3 bump

------------------------------------------------------------------------
r430894 | djd | 2006-08-11 13:57:18 -0700 (Fri, 11 Aug 2006) | 3 lines

Junit improvements, have the ScriptTestCase use the openTestResource method in BaseTestCase to get the script
file to avoid exceptions with a security manager. Added a couple more tests to the language scripts and added
the clean database decorator to each test run.
------------------------------------------------------------------------
r430891 | kmarsden | 2006-08-11 13:50:29 -0700 (Fri, 11 Aug 2006) | 7 lines

Backout change for 

DERBY-1130 Client should not allow databaseName to be set with setConnectionAttributes

To address concerns with the patch


------------------------------------------------------------------------
r430889 | djd | 2006-08-11 13:38:49 -0700 (Fri, 11 Aug 2006) | 3 lines

Junit improvements in the functionTests.tests.jdbcapi package. Add a _Suite to run all the JUnit tests.
Add checks to ConcurrencyTest, ProcedureTest and ScrollResultSet test to define their own requirements.
Make ConcurrencyTest not use the old harness to define when it is run.
------------------------------------------------------------------------
r430872 | djd | 2006-08-11 12:36:04 -0700 (Fri, 11 Aug 2006) | 2 lines

Junit improvements - setup security manager (not yet enabled for standalone tests) to be driven
by the test configuration, add openTestResource method in BaseTestCase that works with a security manager.
------------------------------------------------------------------------
r430867 | djd | 2006-08-11 12:22:33 -0700 (Fri, 11 Aug 2006) | 2 lines

DERBY-1556 (partial) Add an initial test decorator that cleans a database using the utility method JDBC.dropSchema.
More work is needed to drop functions, synonyms and handle dependencies between objects.
------------------------------------------------------------------------
r430864 | fuzzylogic | 2006-08-11 12:11:01 -0700 (Fri, 11 Aug 2006) | 3 lines

DERBY-1593: Separate test jars from "product" jars, add testing README.htm
and jakarta-oro-2.0.8.jar to test directory.

------------------------------------------------------------------------
r430857 | fuzzylogic | 2006-08-11 11:54:07 -0700 (Fri, 11 Aug 2006) | 2 lines

Bump trunk version to 10.3.0.0 alpha

------------------------------------------------------------------------
r430855 | djd | 2006-08-11 11:48:59 -0700 (Fri, 11 Aug 2006) | 2 lines

DERBY-1556 (partial) Add TODO's for the JDBC.dropSchema() method that shows work still needs to
be done to drop function and synonyms.
------------------------------------------------------------------------
r430853 | djd | 2006-08-11 11:41:09 -0700 (Fri, 11 Aug 2006) | 2 lines

DERBY-1556 (partial) Add the initial implementation of a  utility method in the JUnit JDBC class to drop a schema
and all of its objects. Will be called by a test decorator I will be committing soon.
------------------------------------------------------------------------
r430825 | davidvc | 2006-08-11 09:51:20 -0700 (Fri, 11 Aug 2006) | 4 lines

DERBY-1516: Inconsistent behavior for getBytes and getSubString for 
embedded versus network.  Contributed by Craig Russell


------------------------------------------------------------------------
r430815 | rhillegas | 2006-08-11 09:16:02 -0700 (Fri, 11 Aug 2006) | 1 line

DERBY-1530: Commit derby-1530_v01.diff, aligning Derby with the last JDBC4 signature changes.
------------------------------------------------------------------------
r430799 | mikem | 2006-08-11 07:35:00 -0700 (Fri, 11 Aug 2006) | 7 lines

DERBY-1660, submitted by Sunitha Kambhampati

This patch adds two new classes WarehouseVTI and TableVTI.
adds a new test case to test SYSCS_BULK_INSERT. This testcase is added to the existing optimizerOverrides.sql.
updates master files for embedded and network server. 


------------------------------------------------------------------------
r430714 | suresht | 2006-08-11 00:51:11 -0700 (Fri, 11 Aug 2006) | 14 lines

DERBY -1156 (partial) re-encryption of the database.

This patch:
1) prevents configuring a database for encryption or encryption with new 
key while restoring from backup using connection URL attributes createFrom/
restoreFrom/rollForwardRecoveryFrom. 

2) Modified the re-encryption crash recovery test to perform (re)encryption  while 
recovering from a previous crash with same attributes. 
 
3) Minor cleanup in  RawStore.java related to re-encryption.

 

------------------------------------------------------------------------
r430681 | fuzzylogic | 2006-08-10 22:29:52 -0700 (Thu, 10 Aug 2006) | 6 lines

DERBY-1597: set classpath in frameworks scripts from the value of DERBY_HOME instead of
sourcing the set*CP scripts. This prevents an accumulation of multiple Derby jar files in
the classpath after multiple runs of the scripts.

Committed for Ramandeep Kaur <ramandhindsa@gmail.com>

------------------------------------------------------------------------
r430677 | fuzzylogic | 2006-08-10 22:11:29 -0700 (Thu, 10 Aug 2006) | 2 lines

DERBY-1032 (partial): Add Windows batch scripts to bin

------------------------------------------------------------------------
r430670 | bpendleton | 2006-08-10 22:06:29 -0700 (Thu, 10 Aug 2006) | 30 lines

DERBY-688: Enhancements to XML functionality toward XPath and XQuery support

This revision contains d688_phase5_v1.patch.

This patch was contributed by Army Brown (qozinx@gmail.com).

The phase 5 patch, d688_phase5_v1.patch, adds code to determine whether or
not the user's classpath has the required XML classes and, if not, to throw
a user-friendly(-ier) error message whenver the user attempts to use any of
the XML operators.

I inquired as to the best way to do this in the following thread:

http://thread.gmane.org/gmane.comp.apache.db.derby.devel/25307/focus=25315

Dan suggested a) looking at the Derby code that loads modules, and
b) adding a new utility method to the ClassInspector class.

I looked at the module-loading code and it ultimately just makes a call to
Class.forName() and ignores a module if that call throws a LinkageError or
a ClassNotFoundException; see the getImplementations() method in
BaseMonitor.java. So based on that I added a utility method to ClassInspector
that does the same thing, except that it just returns "true" if the call
to Class.forName() succeeds and "false" otherwise. I made the new method
static because it doesn't rely on any state specific to ClassInspector and
because it would have taken a good deal of searching for me to figure out
how to instantiate an instance of ClassInspector correctly from within
the XML datatype class.


------------------------------------------------------------------------
r430668 | fuzzylogic | 2006-08-10 22:03:07 -0700 (Thu, 10 Aug 2006) | 2 lines

DERBY-1032 (partial): Add Unix scripts to bin directory

------------------------------------------------------------------------
r430641 | kmarsden | 2006-08-10 20:34:22 -0700 (Thu, 10 Aug 2006) | 9 lines

DERBY-1130 Client should not allow databaseName to be set with setConnectionAttributes

Attaching a patch 'd1130-client-v1.diff' which disallows databaseName attribute to be set using setConnectionAttributes method in client data sources. Tests added to jdbcapi/checkDataSource.java.


Contributed by Deepa Remesh



------------------------------------------------------------------------
r430626 | bpendleton | 2006-08-10 19:25:08 -0700 (Thu, 10 Aug 2006) | 37 lines

DERBY-688: Enhancements to XML functionality toward XPath and XQuery support

This revision contains d688_phase4_v2.patch.

This patch was contributed by Army Brown (qozinx@gmail.com).

The phase 4 patch, d688_phase4_v2.patch, adds some additional restrictions to
the ways in which XML values can be used. In particular:

  1. XML types cannot be used in CREATE PROCEDURE or CREATE FUNCTION statements.

  2. XML types cannot be used in import/export functions.

  3. XML types cannot be declared as columns in a global temp table.

I admit that I'm a bit fuzzy as to *why* these restrictions need to be in
place, but these are the restrictions that apply to the other "long" datatypes
in Derby (LOBs, LONG VARCHAR) so I'm enforcing them for XML, as well, to be
safe. It'll be easier to remove these restrictions in the future than it
will be to block them after users have potentially been relying on them.

One final restriction added by this patch is as follows: if a parameter is
used for the operand to an XMLPARSE operation, the parameter must have an
explicit cast to a character string type. I've put this restriction in place
because, based on my reading of the spec, this is required for SQL/XML[2006]
conformance. Further explanation can be found in comments for the relevant code.

d688_phase4_v2.patch also adds some simple test cases for each of these
restrictions to the lang/xml_general.sql test, with the corresponding master
updates.

And finally, the phase 4 patch includes two new error messages: one for the
XMLPARSE restriction, and one for missing XML classes, which is actually for
phase 5 but I included it in the phase 4 patch so that the two patches can
be applied sequentially (phase 4 then phase 5) without conflict. 


------------------------------------------------------------------------
r430578 | mikem | 2006-08-10 15:57:40 -0700 (Thu, 10 Aug 2006) | 38 lines

DERBY-1661, submitted by Sunitha 

Cause:
--On linux on the machine where the problem was hit, the default number for open file descriptors allowed is 1024. 
-- The problem lies in the sort code. The create index step involves the external merge sort.  There are some knobs in the code for the maximum number of input runs  to be used at a time. This is given by DEFAULT_MAX_MERGE_RUN in ExternalSortFactory.java. The default value is 1024.
--If the number of merge runs exceeds the limit given by DEFAULT_MAX_MERGE_RUN (lets call it 'x'), we combine the x number of runs into one larger run.  This process involves opening the x number of tmp files which is required to do the merge.
In this particular issue, when opening the 974th merge run, the too many files open is hit on this machine. 

See code:
org.apache.derby.impl.store.access.sort.MergeScan.init()

// Open a scan on each merge run.
int scanindex = 0;
Enumeration e = mergeRuns.elements();
while (e.hasMoreElements())
{
    // get the container id
    long id = ((Long) e.nextElement()).longValue();

    Transaction rawTran = tran.getRawStoreXact();  // get raw transaction
    int segmentId = StreamContainerHandle.TEMPORARY_SEGMENT;
    openScans[scanindex++] = 
    rawTran.openStreamContainer(segmentId, id, hold);   // <---------  This call throws the FileNotFoundException.
}

Workaround:
Increase the open file descriptor limit on the OS to a higher number. This solves the problem without any changes to derby.But this requires the user to explicitly change this limit on the machine, not a good option.
E.g on linux, the command to change the open file descriptor limit to 2048, 
$ulimit -n 2048 

To see the new /all limits, the command is
$ulimit -a


Fix to the problem:
1)change the DEFAULT_MAX_MERGE_RUN to 512.


------------------------------------------------------------------------
r430522 | djd | 2006-08-10 13:41:02 -0700 (Thu, 10 Aug 2006) | 3 lines

DERBY-766 (partial) Clean up the existing split methods to avoid confusion over a code
length passed in. Now length of the method's code is determined inside the methods rather
than being passed around.
------------------------------------------------------------------------
r430467 | mikem | 2006-08-10 11:11:46 -0700 (Thu, 10 Aug 2006) | 7 lines

DERBY-1660, submitted by Sunitha Kambhampati

This patch fixes the sql query used in the SYSCS_BULK_INSERT procedure to 
correctly use the optimizer hints using --DERBY-PROPERTIES clause instead of 
PROPERTIES.


------------------------------------------------------------------------
r430396 | mikem | 2006-08-10 07:38:33 -0700 (Thu, 10 Aug 2006) | 15 lines

DERBY-1248

This problem was caused because the backup of the database did not get all
the log records describing the changes to the data files that it got.
The problem is that the online backup reads page "through" the cache, rather 
than from disk so it is picking up "dirty" pages where the associated log 
records have not yet been flushed to disk. 
The backup of the log file on the other hand goes directly from disk and thus 
sometimes in this concurrent test misses some of the log records in the 
unflushed part of the log file. The fix is to flush the log file up to the
end at the end of the backup process after the data files have been copied
and before we copy the last of the log files to the backup.



------------------------------------------------------------------------
r430306 | djd | 2006-08-10 01:17:27 -0700 (Thu, 10 Aug 2006) | 2 lines

DERBY-766 (partial) Move code in CodeChunk into a sub-method so that it can be shared (in a future
commit) between the two ways of splitting a large method into sub-methods. 
------------------------------------------------------------------------
r430301 | fuzzylogic | 2006-08-10 01:13:30 -0700 (Thu, 10 Aug 2006) | 4 lines

DERBY-1470: Commit -alt4 patch, which adds sysinfo to derbyclient.jar and
unseals org.apache.derby.loc in derbynet.jar and derbyclient.jar to prevent
sealing problems.

------------------------------------------------------------------------
r430293 | djd | 2006-08-10 00:24:49 -0700 (Thu, 10 Aug 2006) | 5 lines

DERBY-766 (partial) Catch IOExceptions written while generating byte code in CodeChunk
as an exception means a limit of the class file format has been hit and subsequently
the generated code will be invalid. E.g. by trying to represent a invalid constant
pool index which is greater than 64k in two bytes.
Remove the unused class BCUnsupported.
------------------------------------------------------------------------
r430193 | djd | 2006-08-09 17:05:59 -0700 (Wed, 09 Aug 2006) | 6 lines

DERBY-766 (partial) Modify the approach in the split expressions method of CodeChunk to only identify
self-contained chunks of byte code from a limited set of instructions. Thus this is a "fail-safe" approach,
rather than trying to catch all the opcodes that would make a set of byte code not self-contained.
Incremental development, method is still not called and does not perform any splits yet,
I test it with calls from BCMethod and a reduced split threshold (e.g. split if the method
is ~3k big instead of the limit of 64k).
------------------------------------------------------------------------
r430189 | fuzzylogic | 2006-08-09 16:47:31 -0700 (Wed, 09 Aug 2006) | 2 lines

Back out accidental change to EmbedDatabaseMetaData.java

------------------------------------------------------------------------
r430177 | fuzzylogic | 2006-08-09 15:53:53 -0700 (Wed, 09 Aug 2006) | 4 lines

DERBY-1146: Add SHOW TABLES and DESCRIBE commands to ij.

Committed for Havard Mork <havard.mork@gmail.com>

------------------------------------------------------------------------
r430173 | djd | 2006-08-09 15:48:08 -0700 (Wed, 09 Aug 2006) | 3 lines

DERBY-1315 (minor cleanup) Remove a couple of unused fields and associated methods to save runtime space.
Reduce the scope of some fields and methods to better understand their use.

------------------------------------------------------------------------
r430172 | davidvc | 2006-08-09 15:42:20 -0700 (Wed, 09 Aug 2006) | 3 lines

DERBY-1377: (Partial) Inserted license headers into miscellaneous
files throughout the tree that were missed.

------------------------------------------------------------------------
r430170 | djd | 2006-08-09 15:38:46 -0700 (Wed, 09 Aug 2006) | 1 line

DERBY-1643 Rename the Dependency manager invalidation constant to represent its use of revoke restrict.
------------------------------------------------------------------------
r430149 | fuzzylogic | 2006-08-09 14:47:16 -0700 (Wed, 09 Aug 2006) | 3 lines

DERBY-1377 (partial): cleanup a couple of missed files, insert proper license
header into the generated ClassSizeCrawler.java

------------------------------------------------------------------------
r430143 | fuzzylogic | 2006-08-09 13:50:15 -0700 (Wed, 09 Aug 2006) | 2 lines

DERBY-1377: Fix license headers on remaining java files.

------------------------------------------------------------------------
r430077 | bpendleton | 2006-08-09 08:45:21 -0700 (Wed, 09 Aug 2006) | 38 lines

DERBY-1533: ArrayIndexOutOfBoundsException in DDMReader

DERBY-1533 follows in a series of bugs (DERBY-170, DERBY-428, DERBY-491,
DERBY-492, DERBY-614 among others) which have to do with the particulars of
the DRDA protocols used for handling long messages and large amounts of data.
In this particular issue, the problems involve the situation in which the
server is receiving a message which is segmented across multiple layer A
blocks using DSS continuations. This is a relatively unusual case, as
generally large amounts of data flow from the server to the client, not vice
versa.

This change contains two modifications to DDMReader, as well as some tests:

1) The Network Server method DDMReader.compressBLayerData was incorrect in
several respects. Rather than going through that code in detail, I noticed
that an almost identical version of this routine exists in the DerbyNetClient,
in the class Reply, and I am pretty confident that the client side code is
working, so I just wholesale modified the server's compressBLayerData method
so that it matched the client's method.

2) When the client is sending parameter data to the server, and the data to be
sent is a large array of bytes for a blob, the client, the client may send the
data inline as DRDA_TYPE_NVARBYTE, or it may externalize the data and send it
as DRDA_TYPE_NLOBBYTES. I believe that similar things happen with CLOB.
The client makes this decision based on the length of the data to be sent;
short values are sent inline, and long values are sent externalized. 
When the server receives the data, it must decide whether it is reading an
inline string of bytes, or externalized data, and it, too, makes this decision
based on the length of the data. However, the server's code for this was
comparing the length of the byte string against the amount of data left in the
current segment, as opposed to comparing it against the constant threshold
value for switching from inline bytes to externalized bytes; hence if a long
byte string happened to start late in a buffer, and was then segmented
(continued) into a subsequent buffer, the server would mistakenly think the
byte string was being sent as externalized bytes, when in fact it was sent as
inline bytes. 


------------------------------------------------------------------------
r430056 | rhillegas | 2006-08-09 06:51:30 -0700 (Wed, 09 Aug 2006) | 1 line

DERBY-528: Commit Francois' 528_diff_v5.txt patch, adding username/password substitution to our authentication options.
------------------------------------------------------------------------
r430051 | rhillegas | 2006-08-09 06:36:51 -0700 (Wed, 09 Aug 2006) | 1 line

DERBY-694: Commit Narayanan's DERBY-694_v6.diff patch so that statement severity errors don't close jdbc objects which they shouldn't.
------------------------------------------------------------------------
r429990 | suresht | 2006-08-09 01:39:52 -0700 (Wed, 09 Aug 2006) | 12 lines

DERBY -1156 (partial) encryption of an un-encrypted database and 
re-encryption of an encrypted databases with a new key.

This patch adds code required to do the following:
-- prevent (re) encryption of a database when it is read-only.
-- prevent (re) encryption of a database when it is in log archive mode. 
-- A  new test is added to check the above two error cases.
-- after (re) encryption of a container with newly gernerated encryption key , 
   it is synced to the disk, 



------------------------------------------------------------------------
r429957 | fuzzylogic | 2006-08-08 21:33:12 -0700 (Tue, 08 Aug 2006) | 2 lines

DERBY-1377 (partial): Update checkToursDB master due to license header additions.

------------------------------------------------------------------------
r429935 | fuzzylogic | 2006-08-08 20:00:38 -0700 (Tue, 08 Aug 2006) | 4 lines

DERBY-1596: Add Working With Derby java files.

Committed for Stan Bradbury <Stan.Bradbury@gmail.com>

------------------------------------------------------------------------
r429927 | davidvc | 2006-08-08 19:01:26 -0700 (Tue, 08 Aug 2006) | 2 lines

DERBY-1377: Final mods for java/engine tree

------------------------------------------------------------------------
r429925 | davidvc | 2006-08-08 18:57:04 -0700 (Tue, 08 Aug 2006) | 2 lines

DERBY-1377: (Partial)  Add header for build.xml in root of iapi tree

------------------------------------------------------------------------
r429924 | davidvc | 2006-08-08 18:55:16 -0700 (Tue, 08 Aug 2006) | 2 lines

DERBY-1377: (Partial) Dag's mods to iapi/util

------------------------------------------------------------------------
r429923 | davidvc | 2006-08-08 18:54:08 -0700 (Tue, 08 Aug 2006) | 2 lines

DERBY-1377: (Partial) - Dag's mods to iapi/reference

------------------------------------------------------------------------
r429922 | davidvc | 2006-08-08 18:52:43 -0700 (Tue, 08 Aug 2006) | 2 lines

DERBY-1377: (Partial) - Dag's mods to iapi/error

------------------------------------------------------------------------
r429920 | davidvc | 2006-08-08 18:44:23 -0700 (Tue, 08 Aug 2006) | 2 lines

DERBY-1377: (Partial) Dag's changes to iapi/sql/execute

------------------------------------------------------------------------
r429919 | davidvc | 2006-08-08 18:43:06 -0700 (Tue, 08 Aug 2006) | 2 lines

DERBY-1377: (Partial) Dag's mods to iapi/sql

------------------------------------------------------------------------
r429918 | davidvc | 2006-08-08 18:41:45 -0700 (Tue, 08 Aug 2006) | 2 lines

DERBY-1377: (Partial) - Dag's adjustments to iapi/sql/dictionary

------------------------------------------------------------------------
r429914 | davidvc | 2006-08-08 18:36:46 -0700 (Tue, 08 Aug 2006) | 2 lines

DERBY-1377: (Partial) - Dag's changes to iapi/sql/depend

------------------------------------------------------------------------
r429897 | fuzzylogic | 2006-08-08 17:15:01 -0700 (Tue, 08 Aug 2006) | 2 lines

DERBY-1377 (partial): Update license headers in impl/load

------------------------------------------------------------------------
r429893 | djd | 2006-08-08 17:01:25 -0700 (Tue, 08 Aug 2006) | 1 line

DERBY-1315 (minor cleanup) Make optimizerToBestPlanMap private scope and change its description into a javadoc comment.
------------------------------------------------------------------------
r429891 | rhillegas | 2006-08-08 16:56:09 -0700 (Tue, 08 Aug 2006) | 1 line

DERBY-1377: Rototill trees under java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/ and java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/
------------------------------------------------------------------------
r429889 | fuzzylogic | 2006-08-08 16:45:21 -0700 (Tue, 08 Aug 2006) | 3 lines

DERBY-1377 (partial): update license headers on functionTests files outside of
the tests directory.

------------------------------------------------------------------------
r429870 | fuzzylogic | 2006-08-08 15:57:12 -0700 (Tue, 08 Aug 2006) | 2 lines

DERBY-1377 (partial): Update license headers for non-impl/non-iapi engine files.

------------------------------------------------------------------------
r429867 | davidvc | 2006-08-08 15:35:22 -0700 (Tue, 08 Aug 2006) | 2 lines

DERBY-1377: (Partial) - Dag's mods to iapi/sql/conn

------------------------------------------------------------------------
r429863 | davidvc | 2006-08-08 15:34:16 -0700 (Tue, 08 Aug 2006) | 2 lines

DERBY-1377: (Partial) Dag's updates to iapi/sql/compile

------------------------------------------------------------------------
r429860 | fuzzylogic | 2006-08-08 15:29:25 -0700 (Tue, 08 Aug 2006) | 2 lines

DERBY-1377 (partial): Update the rest of the files in java/tools.

------------------------------------------------------------------------
r429856 | rhillegas | 2006-08-08 15:17:46 -0700 (Tue, 08 Aug 2006) | 1 line

DERBY-1377: Rototill java/engine/org/apache/derby/iapi/db/, java/engine/org/apache/derby/iapi/jdbc/, and java/engine/org/apache/derby/iapi/types/
------------------------------------------------------------------------
r429847 | bpendleton | 2006-08-08 15:06:01 -0700 (Tue, 08 Aug 2006) | 33 lines

DERBY-688: Enhancements to XML functionality toward XPath/XQuery support

This revision contains d688_phase3_v1_code.patch and d688_phase3_v1_tests.patch

This patch was contributed by Army Brown (qozinx@gmail.com).

Attaching a "phase 3" patch that implements the XMLQUERY operator. The patch is in two parts:

  - d688_phase3_v1_code.patch
  - d688_phase3_v1_tests.patch

When committed, though, *both* patches should be committed together in
order to avoid test diffs.

The SQL parsing/compile time logic was added as part of the phase 2 patch;
this patch handles the execution-time logic by making the necessary Xalan
calls to evaluate an expression and to retrieve the results.

The phase 3 patch also adds logic to distinguish between two "types" of XML:
XML(DOCUMENT(ANY)) and XML(SEQUENCE), as defined in the SQL/XML[2006]
specification. The reason we need to distinguish between the two is that
the result of evaluating an XML query expression against an XML document
can be an arbitrary list of items including atomic values, attributes,
etc.--i.e. a sequence of items that is *not* required to form a valid
DOCUMENT node. For now, though, we only allow valid DOCUMENTs to be
inserted into XML columns, so we have to be able to look at the results
of the XMLQUERY operator to determine whether or not it's a valid DOCUMENT,
and if not we disallow insertion of that result into an XML column.
We can, however, keep the result transiently and pass it into other
operations that accept an XML value (namely, XMLSERIALIZE, which a user
can then use to retrieve the results in serialized form). 


------------------------------------------------------------------------
r429845 | davidvc | 2006-08-08 15:01:23 -0700 (Tue, 08 Aug 2006) | 3 lines

DERBY-1377: (Partial) - Added license text to build.xml files for
the tools subdirectory

------------------------------------------------------------------------
r429839 | davidvc | 2006-08-08 14:52:33 -0700 (Tue, 08 Aug 2006) | 2 lines

DERBY-1377: (Partial) - Dag's changes to sql/execute/rts

------------------------------------------------------------------------
r429838 | davidvc | 2006-08-08 14:50:02 -0700 (Tue, 08 Aug 2006) | 2 lines

DERBY-1377: (Partial) - Dag's changes to sql/execute

------------------------------------------------------------------------
r429836 | rhillegas | 2006-08-08 14:49:27 -0700 (Tue, 08 Aug 2006) | 1 line

DERBY-1377: Rototill trees under java/engine/org/apache/derby/impl/db/ and java/engine/org/apache/derby/impl/io/
------------------------------------------------------------------------
r429834 | davidvc | 2006-08-08 14:47:07 -0700 (Tue, 08 Aug 2006) | 2 lines

DERBY-1377: (Partial) - Dag's changes to impl/sql

------------------------------------------------------------------------
r429830 | davidvc | 2006-08-08 14:40:29 -0700 (Tue, 08 Aug 2006) | 2 lines

DERBY-1377: (partial) - Dag's changes for sql/depend

------------------------------------------------------------------------
r429828 | davidvc | 2006-08-08 14:36:31 -0700 (Tue, 08 Aug 2006) | 2 lines

DERBY-1377: (Partial) Dag's changes to impl/sql/conn for the license header

------------------------------------------------------------------------
r429826 | fuzzylogic | 2006-08-08 14:30:24 -0700 (Tue, 08 Aug 2006) | 2 lines

DERBY-1377: Update license headers in java/demo

------------------------------------------------------------------------
r429816 | rhillegas | 2006-08-08 14:15:30 -0700 (Tue, 08 Aug 2006) | 1 line

DERBY-1377: Rototill tree under java/engine/org/apache/derby/iapi/store/
------------------------------------------------------------------------
r429812 | fuzzylogic | 2006-08-08 14:06:26 -0700 (Tue, 08 Aug 2006) | 2 lines

DERBY-1377: Update license headers in org.apache.derbyTesting.unitTests

------------------------------------------------------------------------
r429811 | rhillegas | 2006-08-08 13:56:54 -0700 (Tue, 08 Aug 2006) | 1 line

DERBY-1377: Rototill tree under java/engine/org/apache/derby/iapi/services/
------------------------------------------------------------------------
r429803 | fuzzylogic | 2006-08-08 13:30:30 -0700 (Tue, 08 Aug 2006) | 2 lines

DERBY-1377 (partial): Update license headers on files in drda

------------------------------------------------------------------------
r429802 | rhillegas | 2006-08-08 13:29:46 -0700 (Tue, 08 Aug 2006) | 1 line

DERBY-1377: Rototill tree under java/engine/org/apache/derby/impl/store/
------------------------------------------------------------------------
r429795 | fuzzylogic | 2006-08-08 13:08:27 -0700 (Tue, 08 Aug 2006) | 2 lines

DERBY-1377 (partial): Update license headers for client

------------------------------------------------------------------------
r429794 | rhillegas | 2006-08-08 13:02:58 -0700 (Tue, 08 Aug 2006) | 1 line

DERBY-1377: Rototilled tree under java/engine/org/apache/derby/impl/services/
------------------------------------------------------------------------
r429791 | rhillegas | 2006-08-08 12:37:11 -0700 (Tue, 08 Aug 2006) | 1 line

DERBY-1377: Rototill tree under java/engine/org/apache/derby/impl/jdbc/
------------------------------------------------------------------------
r429781 | rhillegas | 2006-08-08 12:11:11 -0700 (Tue, 08 Aug 2006) | 1 line

DERBY-1377: Rototill remaining files under java/shared/org/apache/derby/shared/
------------------------------------------------------------------------
r429773 | jta | 2006-08-08 12:01:40 -0700 (Tue, 08 Aug 2006) | 2 lines

DERBY-1377 (partial): update license headers for plugins subdirectory.

------------------------------------------------------------------------
r429771 | rhillegas | 2006-08-08 11:54:02 -0700 (Tue, 08 Aug 2006) | 1 line

DERBY-1377: Rototill java/shared/org/apache/derby/shared/common/error/
------------------------------------------------------------------------
r429768 | rhillegas | 2006-08-08 11:44:05 -0700 (Tue, 08 Aug 2006) | 1 line

DERBY-1377: Rototill java/shared/org/apache/derby/shared/common/reference/
------------------------------------------------------------------------
r429764 | bpendleton | 2006-08-08 11:39:07 -0700 (Tue, 08 Aug 2006) | 34 lines

DERBY-688: Enhancements to XML functionality toward XPath/XQuery support

This revision contains d688_phase2_v1_code.patch and d688_phase2_v3_tests.patch

This patch was contributed by Army Brown (qozinx@gmail.com).

Attaching a "phase 2" patch that does the following:

- Adds syntax and binding logic for XMLQUERY operator

- Updates syntax for XMLEXISTS to match XMLQUERY and does some refactoring
so that the two can share code. The most user-visible change in this area
is the change from BY VALUE to BY REF syntax, which required test updates
and corresponding master file updates.

Also as part of these changes I've rewritten some of the parse logic to
make it more easily extendible to a broader XMLQUERY syntax (as defined in
SQL/XML[2006]) when/if Derby supports the broader syntax (esp. optional
context items and variable bindings) in the future.

- These phase 2 patches do *not* actually implement the XMLQUERY operator
yet; they just allow parsing and binding of the operator. Execution-time
logic will come in a subsequent patch.

For the sake of review I've separated the Phase 2 patches into two
different parts:

  d688_phase2_v1_code.patch: The code changes.
  d688_phase2_v3_tests.patch: The test/master changes.

When committed, though, *both* patches should be committed together
in order to avoid test diffs.


------------------------------------------------------------------------
r429763 | davidvc | 2006-08-08 11:37:38 -0700 (Tue, 08 Aug 2006) | 2 lines

DERBY-1377: Dag's updates of header files for sql/compile.

------------------------------------------------------------------------
r429762 | davidvc | 2006-08-08 11:33:04 -0700 (Tue, 08 Aug 2006) | 2 lines

DERBY-1377: (Partial) - Dag's submission for impl/sql/catalog

------------------------------------------------------------------------
r429734 | davidvc | 2006-08-08 10:07:27 -0700 (Tue, 08 Aug 2006) | 2 lines

DERBY-1377 (Partial) - Fix license headers for the dblook subdirectory.

------------------------------------------------------------------------
r429728 | rhillegas | 2006-08-08 09:51:59 -0700 (Tue, 08 Aug 2006) | 1 line

DERBY-1524: Add new assertion overload.
------------------------------------------------------------------------
r429698 | bpendleton | 2006-08-08 08:53:29 -0700 (Tue, 08 Aug 2006) | 55 lines

DERBY-688: Enhancements to XML functionality toward XPath/XQuery support

This revision contains d688_phase1_v3.patch.

This patch was contributed by Army Brown (qozinx@gmail.com).

Attaching a "phase 1" patch, d688_phase1_v1.patch, for this issue that does the following:

  1. Reorganizes XML-specific code as follows:

    - Moves all code that relies on JAXP and Xalan classes
      out of XML.java and into a new class, SqlXmlUtil.java.
      See comments at the beginning of SqlXmlUtil for an
      explanation of why this was done.

    - Creates a new class, SqlXmlExecutor, in the impl.sql.execute
      package that serves as the class on which all XML operator
      calls are generated. Ex. for XMLEXISTS, instead of
      generating:

         <xmlOperand>.XMLExists(<query-expr>, xmlOperand)

      we now generate:

         <SqlXmlExecutor>.XMLSerialize(<query-expr>, xmlOperand)

      Along with making the code cleaner by allowing all
      XML operator calls to be defined in the same class,
      this new class has other benefits, as well--see
      comments at the beginning of SqlXmlExecutor for
      more of an explanation.

  2. Changes implementation of XPath from XSLT processing to
     the low-level Xalan API, which is faster, more flexible,
     and better for implementation of the XMLQUERY operator
     (the XMLQUERY operator will be coming in subsequent
     phases). Note that as part of this change I've removed
     the dependency on an explicit declaration of Xerces
     as the parser; Derby will now pick up the parser from
     the JVM (i.e. this patch resolves DERBY-567).

  3. Makes a small change to the XMLEXISTS operator to bring
     it more in line with SQL/XML spec. More specifically,
     the query expression that is specified must now be a string
     literal; parameters and other expressions are not allowed.

  4. Updates the XML test and master files (lang/xml_general.sql
     and lang/xmlBinding.java) to bring them in sync with the latest
     Derby codeline. Since the XML tests are not (yet) run
     as part of derbyall, the master files need to be updated
     to reflect some client/server changes that have gone into
     the codeline for 10.2 (for example, server pre-fetching
     behavior).


------------------------------------------------------------------------
r429677 | rhillegas | 2006-08-08 08:05:02 -0700 (Tue, 08 Aug 2006) | 1 line

DERBY-1649: Better sed'ing of cursor names in wisconsin output.
------------------------------------------------------------------------
r429648 | tmnk | 2006-08-08 06:21:18 -0700 (Tue, 08 Aug 2006) | 1 line

- DERBY-1637 OutBufferedStream.java fails on ibm131/jdk131 jvms. - Patch by Sunitha Kambhampati(ksunithaghm@gmail.com)
------------------------------------------------------------------------
r429561 | fuzzylogic | 2006-08-07 21:26:35 -0700 (Mon, 07 Aug 2006) | 4 lines

DERBY-1320: Fix lang/procedure.java on IBM JDK 1.5. 

Committed for Manjula Kutty <manjula.kutty@gmail.com>

------------------------------------------------------------------------
r429551 | fuzzylogic | 2006-08-07 20:20:12 -0700 (Mon, 07 Aug 2006) | 3 lines

DERBY-1431: Remove demos from snapshots and remove link to demos from
frameworks/readme.html, which is in the snapshot.

------------------------------------------------------------------------
r429550 | fuzzylogic | 2006-08-07 20:16:23 -0700 (Mon, 07 Aug 2006) | 5 lines

DERBY-1614: Do not set any heap size flags or network server apart from those
specified by the jvmflags property.

Committed for John Embretsen <John.Embretsen@sun.com>

------------------------------------------------------------------------
r429515 | davidvc | 2006-08-07 16:53:01 -0700 (Mon, 07 Aug 2006) | 3 lines

DERBY-1377: (Partial) Updated the tools/sysinfo directory to use the
new license header

------------------------------------------------------------------------
r429500 | davidvc | 2006-08-07 15:42:12 -0700 (Mon, 07 Aug 2006) | 4 lines

DERBY-1377: (Partial).  Inserted license headers to .jj files
and updated java files for the tools/ij subdirectory.


------------------------------------------------------------------------
r429496 | davidvc | 2006-08-07 15:28:17 -0700 (Mon, 07 Aug 2006) | 3 lines

DERBY-1377: (Partial) - inserted license headers to files that
didn't have them in the java/build subtree

------------------------------------------------------------------------
r429495 | davidvc | 2006-08-07 15:26:59 -0700 (Mon, 07 Aug 2006) | 4 lines

DERBY-1377: (Partial) - Updated license headers for the build
subtree.


------------------------------------------------------------------------
r429425 | rhillegas | 2006-08-07 11:33:13 -0700 (Mon, 07 Aug 2006) | 1 line

DERBY-1554: Revert IDENTITY_VAL_LOCAL() behavior on multi-row inserts to that seen in 10.1.3. Applying patch derby1554trunkdiff02.txt.
------------------------------------------------------------------------
r429417 | suresht | 2006-08-07 11:04:32 -0700 (Mon, 07 Aug 2006) | 8 lines

DERBY -1156 (partial) re-encryption of the database.

This patch adds priveleged blocks required to run (re) encryption of the 
database under security manager. Enabled the related tests to run under 
security manager,



------------------------------------------------------------------------
r429412 | djd | 2006-08-07 10:56:58 -0700 (Mon, 07 Aug 2006) | 3 lines

Change UpdateXXTest to be a JUnit test that runs under J2ME and its suite method to setup
the test cases correctly based upon the JDBC environment. No longer requires a _app.properties
file from the old test harness.
------------------------------------------------------------------------
r429401 | djd | 2006-08-07 10:17:43 -0700 (Mon, 07 Aug 2006) | 1 line

java.sql.Savepoint is the correct class to check to see if JDBC 3 and JSR 619 is supported, not ParameterMetaData
------------------------------------------------------------------------
r429365 | rhillegas | 2006-08-07 08:19:28 -0700 (Mon, 07 Aug 2006) | 1 line

DERBY-1640: Update master for XATest to account for changes introduced by DERBY-1579.
------------------------------------------------------------------------
r429350 | rhillegas | 2006-08-07 07:13:00 -0700 (Mon, 07 Aug 2006) | 1 line

DERBY-1029: Delete directory of empty files.
------------------------------------------------------------------------
r429155 | djd | 2006-08-06 10:07:03 -0700 (Sun, 06 Aug 2006) | 5 lines

Update the SQL script JUnit test running (ScriptTestCase) to use the new ij.runScript. This allows
the scripts to easily use the default connection from the super class BaseJDBCTest without having
to resort to setting system properties.
Cleanup the LangScripts test case to allow it to be called as a main method to run arbitrary
scripts from the command line.
------------------------------------------------------------------------
r429154 | djd | 2006-08-06 09:54:04 -0700 (Sun, 06 Aug 2006) | 3 lines

DERBY-1638 Add methods to JDBC for JUnit that indicates if the virtual machine environment
supports JDBC 2,3 or 4 and JSR169. Naming of methods indicates that the define the vm
level of support rather than the clients level.
------------------------------------------------------------------------
r429036 | djd | 2006-08-05 12:33:52 -0700 (Sat, 05 Aug 2006) | 7 lines

DERBY-1544 Adds a method 'grantPublicAccessToSystemRoutines' to DataDictionaryImpl which is called when doing a
full upgrade. This method goes through list of routines that needs to be granted public access and calls
'createRoutinePermPublicDescriptor' for each routine. This is the same as the method that is called during
database creation. It is slightly modified to allow specifying of an authorization id for the grantor.
When upgrading, authorization id of user performing upgrade is used.
Adds a test to upgrade test to verify that the 5 system routines are added to the routine permissions table.
Patch contributed by Deepa Remesh
------------------------------------------------------------------------
r429014 | suresht | 2006-08-05 10:11:47 -0700 (Sat, 05 Aug 2006) | 42 lines

DERBY -1156 (partial) (re) encryption of an existing database.

This patch adds code required to correctly handle crash/recovery during 
encryption of an un-encrypted database and encryption of an encrypted 
database with a new key.

Crashes before updating the database with the new encryption key 
are handled by recovery, those log records are encrypted old key. 

Crashes after updates to the service.properties with a new encryption key 
is handled by using the new status flag (derby.storage.databaseEncryptionStatus)  
to track the changes and by writing the transaction log encrypted with 
new key to a new log file. 

Logging system can handle only one encryption key, which means the 
recovery can read the log with a new key or the old key. Checkpoint 
log record is also encrypted. So it is necessary for the system
to find a checkpoint in the log that it can decrypt using the encryption 
key stored in the service.properties or the one provided by the user. 
This is ensured by  by writing  COMMIT and CHECKPOINT log records
into a new log file and delete that file on-reboot if there is a crash 
before checkpoint records are updated. 

CHECKPOINT and COMMIT is done after setting the databaseEncryptionStatus to 
IN-PROGRESS in the service.properties.On a reboot if databaseEncryptionStatus 
is  IN-PROGRESS,  then engine first checks if checkpoint is in the last 
log file , it it is then (re) encryption is complete otherwise it deletes the 
last log file before doing recovery. Because the last log file also 
had the commit record , it is also gone; Now recovery sees log only encrypted 
with the old key and no end for re-encryption transaction, so it the (re) 
encryption work rolled back and database is brought to the state it was 
before (re) encryption started. 

If engine find a checkpoint in the last log file when databaseEncryptionStatus
is IN-PROGRESS , the it is clear that checkpoint is encrypted with the new 
key; so it does any cleanup required. 


Added new test cases using debug flags to crash at critical 
point during (re) encryption and recovery of failed (re)encryption. 


------------------------------------------------------------------------
r428952 | fuzzylogic | 2006-08-04 20:44:23 -0700 (Fri, 04 Aug 2006) | 3 lines

Put reference to iapi.reference.Attribute back until I can figure out why it is
actually needed.

------------------------------------------------------------------------
r428937 | kmarsden | 2006-08-04 18:50:47 -0700 (Fri, 04 Aug 2006) | 5 lines

DERBY-1108
The test jdbcapi/setTransactionIsolation.java fails with ibm jvm1.5
Contributed by Manjula Kutty


------------------------------------------------------------------------
r428930 | djd | 2006-08-04 17:22:39 -0700 (Fri, 04 Aug 2006) | 7 lines

DERBY-1643 In Derby, the execute permission on a routine can't be revoked as long as there are dependent objects
relying on that permissions. This patch implements that behavior by adding a new revoke invalidation action
REVOKE_EXECUTE_PRIVILEGE, just for routine revoke. This invalidation gets sent when a revoke execute is issued.
When dependents, a ViewDescriptor and/or a TriggerDescriptor, get this invalidation action, they will
raise error that revoke execute can't be performed because there is a dependent object on that permission. 

Patch submitted by Mamta Satoor
------------------------------------------------------------------------
r428924 | djd | 2006-08-04 16:33:25 -0700 (Fri, 04 Aug 2006) | 4 lines

DERBY-1377 (partial) Move copyright notices from COPYRIGHT file to NOTICE file to
match ASF policy defined at:
http://www.apache.org/legal/src-headers.html

------------------------------------------------------------------------
r428923 | davidvc | 2006-08-04 16:30:27 -0700 (Fri, 04 Aug 2006) | 4 lines

DERBY-1377: (Partial) - added license headers to the files and
scripts in the frameworks directory.  


------------------------------------------------------------------------
r428917 | davidvc | 2006-08-04 16:07:59 -0700 (Fri, 04 Aug 2006) | 5 lines

DERBY-1377: (Partial) - Inserted license text into files in tools
directory that had no license text and seemed to need it.  This is
not in conflict with the issue Dan had raised, as these files previously
had no copyright message.

------------------------------------------------------------------------
r428910 | djd | 2006-08-04 15:28:55 -0700 (Fri, 04 Aug 2006) | 3 lines

DERBY-766 (partial) Add initial code/method and many comments as to how to split expressions out of large
generated methods. New code is not called yet and doesn't do much, first step in incremental development
of this method.
------------------------------------------------------------------------
r428899 | fuzzylogic | 2006-08-04 15:03:56 -0700 (Fri, 04 Aug 2006) | 4 lines

DERBY-1319: Document the toursdb schema.

Committed for Myrna Van Lunteren <m.v.lunteren@gmail.com>

------------------------------------------------------------------------
r428892 | fuzzylogic | 2006-08-04 14:32:05 -0700 (Fri, 04 Aug 2006) | 2 lines

DERBY-1424: Fix badness caused by a double patch command from last checkin.

------------------------------------------------------------------------
r428891 | fuzzylogic | 2006-08-04 14:27:01 -0700 (Fri, 04 Aug 2006) | 3 lines

DERBY-1424: Build derbyclient.jar using classlister. Also removes an unnecessary
class from derbytools.jar.

------------------------------------------------------------------------
r428887 | davidvc | 2006-08-04 14:18:26 -0700 (Fri, 04 Aug 2006) | 2 lines

DERBY-1629 - Fixed canon for j9 VM (contributed by Myrna)

------------------------------------------------------------------------
r428872 | djd | 2006-08-04 13:29:29 -0700 (Fri, 04 Aug 2006) | 6 lines

DERBY-1544 (partial) Upgrading a database from 10.1 to 10.2 should automatically change database owner,
recorded as owner of system schemas in sysschemas, from pseudo user 'DBA' to authorizationID of the user
attempting upgrade. This was being done in DataDictionaryImpl.updateSchemaAuth method.
I think a wrong index was being used in the call to updateRow. Also the SCHEMAAID column which we are changing
is not part of any index in SYSSCHEMAS. So there is no need to update any index. 
Patch contributed by Deepa Remesh
------------------------------------------------------------------------
r428866 | davidvc | 2006-08-04 13:09:46 -0700 (Fri, 04 Aug 2006) | 3 lines

DERBY-1647: JDK 1.6 derbynet is failing due to SQLException.toString() 
changes

------------------------------------------------------------------------
r428801 | djd | 2006-08-04 10:57:54 -0700 (Fri, 04 Aug 2006) | 5 lines

DERBY-1612 (partial) If revoke statement finds a constraint dependent on the table/column on which privilege
is being revoked, the constraint will be dropped automatically. This functionality is similar to what is
supported for triggers and views. And just like triggers and views, more work is required so that constraint will get
dropped only if it depends on the particular privilege TYPE or particular column that is being revoked.
Patch contributed by Mamta Satoor.
------------------------------------------------------------------------
r428536 | djd | 2006-08-03 14:41:29 -0700 (Thu, 03 Aug 2006) | 5 lines

DERBY-1611 (partial) This patch concentrates on basic revoke functionality for views. If revoke statement finds a
view dependent on the table/column/routine on which privilege is being revoked, the view will be dropped automatically.
This functionality is similar to what is supported for triggers. And just like triggers, more work is required so
that view will get dropped only if it depends on the particular privilege TYPE or particular column that is being revoked.
Patch contributed by Mamta Satoor.
------------------------------------------------------------------------
r428510 | rhillegas | 2006-08-03 13:13:30 -0700 (Thu, 03 Aug 2006) | 1 line

DERBY-1252: Commit derby1252.diff, causing various SUR-related metadata calls to report the correct answers based on the client and server rev levels.
------------------------------------------------------------------------
r428252 | djd | 2006-08-02 22:58:44 -0700 (Wed, 02 Aug 2006) | 3 lines

DERBY-1609 (partial) Change the lang/wisconsin.java test to use the new ij.runScript method
rather than its previous use of the utilMain.go method. Change the sed commands because the
cursor names are different in the output due to the use of a connection in a different state.
------------------------------------------------------------------------
r428160 | djd | 2006-08-02 14:37:13 -0700 (Wed, 02 Aug 2006) | 2 lines

DERBY-1521 Patch which sets "derby.database.sqlAuthorization" for an upgraded database and tests that grant/revoke is available.
Patch submitted by Deepa Remesh
------------------------------------------------------------------------
r428128 | davidvc | 2006-08-02 13:16:35 -0700 (Wed, 02 Aug 2006) | 5 lines

DERBY-1629 - Added comment to lang/procedureInTrigger.sql to indicate a 
known bug is being encountered, and added a jdk16-specific output file.  
Note that the j9 run of procedureInTrigger.sql will probably fail, but I 
can't fix this as I don't have a j9 VM.

------------------------------------------------------------------------
r428115 | djd | 2006-08-02 12:48:59 -0700 (Wed, 02 Aug 2006) | 3 lines

DERBY-1579 Remove SYS.SYSREQUIREDPERM system table and update all the associated master output files.

Patch contributed by Yip Ng yipng168@gmail.com
------------------------------------------------------------------------
r428065 | fuzzylogic | 2006-08-02 10:42:08 -0700 (Wed, 02 Aug 2006) | 3 lines

DERBY-1630: Remove reference to engine class in NetConnection40. Generate
client exception using client.am.SqlException.

------------------------------------------------------------------------
r428044 | davidvc | 2006-08-02 09:32:02 -0700 (Wed, 02 Aug 2006) | 3 lines

DERBY-1616: Lots of jdk1.6 regression test failures with diffs because 
of SQL Exception instead of java.sql.SQLException

------------------------------------------------------------------------
r428012 | bpendleton | 2006-08-02 07:51:31 -0700 (Wed, 02 Aug 2006) | 12 lines

DERBY-1456: Network Server agentError logs only to console

Patch contributed by Sunitha Kambhampati (ksunithaghm@gmail.com)

This patch does the following:
1. Use the correct errorCodePoint for agent errors. CodePoint.AGNPRMRM.
Agent errors will be logged ok.
2. In agent errors, retrieve the descriptive string passed in as argument.
3. override Exception.getMessage() , so call to
DRDAProtocolException.getMessage() will return the diagnostic message.


------------------------------------------------------------------------
r427969 | rhillegas | 2006-08-02 05:50:33 -0700 (Wed, 02 Aug 2006) | 1 line

DERBY-1417: Commit derby-1417-7a-clientborderfix.diff, fixing a hang on a border condition.
------------------------------------------------------------------------
r427911 | fuzzylogic | 2006-08-01 23:28:46 -0700 (Tue, 01 Aug 2006) | 2 lines

DERBY-939: Add missed files from checkin of derby939trunkdiffpatch2.txt

------------------------------------------------------------------------
r427901 | davidvc | 2006-08-01 22:37:10 -0700 (Tue, 01 Aug 2006) | 3 lines

This was a rogue file that slipped into the DERBY-939 commit, backing
out the change

------------------------------------------------------------------------
r427899 | davidvc | 2006-08-01 22:30:11 -0700 (Tue, 01 Aug 2006) | 3 lines

DERBY-939: NullPointerException at ResultSet.close() time for simple 
query using UNION and INTERSECT.  Contributed by Yip Ng.

------------------------------------------------------------------------
r427866 | fuzzylogic | 2006-08-01 20:06:16 -0700 (Tue, 01 Aug 2006) | 4 lines

DERBY-1619: Decode encoded characters in path URLs in sysinfo. Prevents
duplicate entries for jar files from appearing in the output when the path
contains a character which gets encoded when passed as a URL.

------------------------------------------------------------------------
r427816 | fuzzylogic | 2006-08-01 17:20:38 -0700 (Tue, 01 Aug 2006) | 4 lines

DERBY-1537: Don't put metadata.properties into derbytools.jar. Avoids boot-time
exception when running tests with derbytools.jar in front of derby.jar in the 
classpath. 

------------------------------------------------------------------------
r427801 | djd | 2006-08-01 16:51:45 -0700 (Tue, 01 Aug 2006) | 3 lines

DERBY-1609 (partial) Fix wisconsin.java test by initializing the connections for the utilMain object.
Once wisconsin.java moves to using the new runScript the initConnections method will not be required
by this test and can return to being packahe protected.
------------------------------------------------------------------------
r427796 | fuzzylogic | 2006-08-01 16:44:49 -0700 (Tue, 01 Aug 2006) | 8 lines

DERBY-1241: When booting a database under security manager, boot may fail with
message java.sql.SQLException: Java exception: 'access denied 
(java.io.FilePermission for logmirror.ctrl if database was not shutdown cleanly
after previous access. Fix uses existing privExists method to access the file,
avoiding the SecurityException.

Committed for Myrna Van Lunteren <m.v.lunteren@gmail.com>

------------------------------------------------------------------------
r427795 | davidvc | 2006-08-01 16:40:24 -0700 (Tue, 01 Aug 2006) | 2 lines

Fixed eol-style on these master files

------------------------------------------------------------------------
r427458 | bandaram | 2006-07-31 23:16:47 -0700 (Mon, 31 Jul 2006) | 4 lines

DERBY-1608: Recognize newly added SYSFUC routines as system builtin functions. Builtin functions don't need authorization checks and have execute permission to PUBLIC by default.

Submitted by Satheesh Bandaram (satheesh@gmail.com)

------------------------------------------------------------------------
r427434 | djd | 2006-07-31 20:56:52 -0700 (Mon, 31 Jul 2006) | 2 lines

DERBY-1609 (partial) Put in temp fix for ij to allow tests to continue to run against jdk 1.3

------------------------------------------------------------------------
r427358 | bandaram | 2006-07-31 16:23:27 -0700 (Mon, 31 Jul 2006) | 4 lines

DERBY-1367: Enable grantRevoke.java test in DerbyNetClient framework.

Submitted by Satheesh Bandaram (satheesh@gmail.com)

------------------------------------------------------------------------
r427354 | djd | 2006-07-31 16:12:25 -0700 (Mon, 31 Jul 2006) | 2 lines

DERBY-1609 (partial) fix build issue.

------------------------------------------------------------------------
r427298 | djd | 2006-07-31 14:42:26 -0700 (Mon, 31 Jul 2006) | 7 lines

Change the JUnit JDBC client code to use DB2Client as the clearer name
when using DB2's JDBC driver, rather than the somewhat confusing DerbyNet.
DerbyNet is used in the old test harness, but going foward it would
be much clearer to call it what it is.
Use equality methods for checking which client is running, rather
than reference checks.
Add isEmbedded(, isDerbyNetClient and is isDB2Client methods to the JDBCClient class.
------------------------------------------------------------------------
r427293 | djd | 2006-07-31 14:35:23 -0700 (Mon, 31 Jul 2006) | 4 lines

DERBY-1609 (partial) Move initializing connections from system properties
in ij's utilMain into a separate method from the constructor. Allows ij's
runScript method to create a constructor without creating unrequired
connections based upon System properties.
------------------------------------------------------------------------
r427272 | fuzzylogic | 2006-07-31 14:07:28 -0700 (Mon, 31 Jul 2006) | 4 lines

DERBY-1606: Add comment regarding skip.

Committed for Myrna Van Lunteren <m.v.lunteren@gmail.com>

------------------------------------------------------------------------
r427266 | fuzzylogic | 2006-07-31 14:02:51 -0700 (Mon, 31 Jul 2006) | 4 lines

DERBY-1607: Canon updates for j9 / j9_foundation.

Committed for Myrna Van Lunteren <m.v.lunteren@gmail.com>

------------------------------------------------------------------------
r427237 | fuzzylogic | 2006-07-31 12:58:36 -0700 (Mon, 31 Jul 2006) | 5 lines

DERBY-1462: Sed out db.lck warnings from some store tests. These warnings are
printed when running the store tests with pre-1.4 JVMs on non-windows platforms.

Committed for Myrna Van Lunteren <m.v.lunteren@gmail.com>

------------------------------------------------------------------------
r427232 | fuzzylogic | 2006-07-31 12:45:32 -0700 (Mon, 31 Jul 2006) | 4 lines

DERBY-1606: skip derbyrunjartest.java on j9/j9_foundation due to hang

Committed for Myrna Van Lunteren <m.v.lunteren@gmail.com>

------------------------------------------------------------------------
r427193 | fuzzylogic | 2006-07-31 11:33:53 -0700 (Mon, 31 Jul 2006) | 5 lines

DERBY-1605: To determine whether or not JVM has JDBC4, compare with 
java.specification.version, not java.vm.version.

Committed for Myrna Van Lunteren <m.v.lunteren@gmail.com>

------------------------------------------------------------------------
r427190 | fuzzylogic | 2006-07-31 11:06:48 -0700 (Mon, 31 Jul 2006) | 6 lines

DERBY-1091: Don't prepend a caret to jvmflags in RunSuite if the system
properties are empty, but the suite property is not. Fixes several tests
for J2ME (j9_foundation).

Committed for Myrna Van Lunteren <m.v.lunteren@gmail.com>

------------------------------------------------------------------------
r427131 | bandaram | 2006-07-31 07:48:21 -0700 (Mon, 31 Jul 2006) | 4 lines

Disable attempting to drop permission descriptors in non SQL authorization mode. In soft upgrade mode to 10.2, it is possible not to have permission catalogs at all.

Submitted by Satheesh Bandaram (satheesh@sourcery.org)

------------------------------------------------------------------------
r427118 | bandaram | 2006-07-31 07:01:57 -0700 (Mon, 31 Jul 2006) | 4 lines

Update couple of missed master files.

Submitted by Satheesh Bandaram (satheesh@sourcery.org)

------------------------------------------------------------------------
r427112 | rhillegas | 2006-07-31 06:19:08 -0700 (Mon, 31 Jul 2006) | 1 line

DERBY-1417: Commit derby-1417-6d-clientimpl.diff, the network client implementation of lengthless overloads for the streaming api, introduced by JDBC4.
------------------------------------------------------------------------
r426893 | djd | 2006-07-30 08:16:07 -0700 (Sun, 30 Jul 2006) | 2 lines

DERBY-1609 (partial) Have ij.runScript use utilMain directly, rather than Main,
to avoid one additional object.
------------------------------------------------------------------------
r426890 | djd | 2006-07-30 08:00:34 -0700 (Sun, 30 Jul 2006) | 1 line

Fix mistakes in last checkin.
------------------------------------------------------------------------
r426887 | djd | 2006-07-30 07:40:08 -0700 (Sun, 30 Jul 2006) | 1 line

Minor cleanup in ij code, make methods non-public and remove an un-required method.
------------------------------------------------------------------------
r426849 | djd | 2006-07-29 16:20:40 -0700 (Sat, 29 Jul 2006) | 3 lines

DERBY-1609 (partial) Add a runScript method to ij. Initial version runs a script
successfully using the passed in connection. More work is needed to avoid the
standard ij startup which opens connections and to return the number of errors.
------------------------------------------------------------------------
r426847 | bandaram | 2006-07-29 16:12:58 -0700 (Sat, 29 Jul 2006) | 10 lines

DERBY-1543:This patch should address these two left over items in GRANT/REVOKE implementation. Some implementation notes:

1) Now Derby raises an SQLWarning when SQL authorization is ON without authentication at connect time. This is done by checking if AuthenticationService being used is an instance of NoneAuthenticationServiceImpl. Since this is the default authentication service with Derby, it should always be present.

2) Added code to drop permission descriptors from SYSTABLEPERMS, SYSCOLPERMS and SYSROUTINEPERMS when the object they provide permission for is dropped. This includes tables, views and routines and these descriptors needs to be removed from permissionCache as well.

I have tested the cases when PermissionsDescriptors are in cache also.

Submitted by Satheesh Bandaram (bandaram@gmail.com)

------------------------------------------------------------------------
r426825 | djd | 2006-07-29 09:44:47 -0700 (Sat, 29 Jul 2006) | 2 lines

DERBY-766 (partial) Add check to ensure a generated method is no split if it contains a return
instruction in the middle.
------------------------------------------------------------------------
r426671 | djd | 2006-07-28 14:30:36 -0700 (Fri, 28 Jul 2006) | 2 lines

DEBRY-1609 (partial) Minor cleanup in ij.Main.java, remove unused field & method
and make two public fields private.
------------------------------------------------------------------------
r426570 | rhillegas | 2006-07-28 08:40:42 -0700 (Fri, 28 Jul 2006) | 1 line

DERBY-1510: Commit derby-1510-1a.diff, fixing an infinite loop.
------------------------------------------------------------------------
r426398 | kahatlen | 2006-07-27 23:15:26 -0700 (Thu, 27 Jul 2006) | 6 lines

DERBY-1586: The attributesAsPassword property doesn't work correctly
with EmbeddedConnectionPoolDataSource

Forward the requestPassword parameter from createPooledConnection() to
EmbedPooledConnection's constructor.

------------------------------------------------------------------------
r426315 | djd | 2006-07-27 16:08:02 -0700 (Thu, 27 Jul 2006) | 8 lines

Add a utility JUnit TestCase that runs .sql scripts using ij
similar to the test harness, but much simpler.
Compares the master files using simple line by line assertEquals.
No sedding of output is performed (or should be :-).
Added one JUnit suite lang/LangScripts that runs a handful of .sql tests.
Currently a work-in progress, it has not been added to derbyall.


------------------------------------------------------------------------
r426310 | djd | 2006-07-27 15:58:12 -0700 (Thu, 27 Jul 2006) | 1 line


------------------------------------------------------------------------
r426308 | djd | 2006-07-27 15:56:43 -0700 (Thu, 27 Jul 2006) | 7 lines

Add framework code to BaseTestCase to automatically install the security manager
with the default test policy file for every JUnit test. Security manager
code separated into SecurityManagerSetup for clarity. Allows Derby JUnit
tests to be run via JUnit test runners without specifiying any system
properties.
Not enabled at the moment, needs testing, can be enabled by commenting
out line in runBase in BaseTestCase.
------------------------------------------------------------------------
r426048 | andreask | 2006-07-27 05:43:51 -0700 (Thu, 27 Jul 2006) | 1 line

updated policy to be in line with permissions granted for derbyclient.jar in derby_tests.policy. Follow-up to DERBY-1545. This should enable running the server host on a remote machine when running the testProtocol test.
------------------------------------------------------------------------
r425987 | kahatlen | 2006-07-27 00:26:57 -0700 (Thu, 27 Jul 2006) | 23 lines

DERBY-1546: Derby JDBC 4.0 driver returns 3 for JDBC driver major version

Description of the changes:

  * EmbedDatabaseMetaData40 and NetDatabaseMetaData40 override
    getJDBCMajorVersion() and getJDBCMinorVersion().

  * jdbcapi/dbMetaDataJdbc30.java was modified to print "AS EXPECTED"
    instead of the returned value from the JDBC version methods (of
    course, it prints something else if the version is not as
    expected). This was done in order to avoid the need for separate
    jdk16 canons.

  * TestUtil.getJDBCMajorVersion() was updated to recognize JDBC major
    version > 3.

  * Fixed a bug in build.xml in functionTests/util. TestUtil.java is
    incorrectly compiled with source and target level 1.4. It works
    correctly after an 'ant clobber' because some other 1.3 class
    depends on it and causes it to be compiled as part of another ant
    target, but if TestUtil.java is the only file that needs
    recompilation, jdk 1.4 is used.

------------------------------------------------------------------------
r425941 | djd | 2006-07-26 20:37:51 -0700 (Wed, 26 Jul 2006) | 5 lines

Add a PrepareExecuteDDL JUnit test with initial cases that tests preparing statements
and then executing DDL before executing the prepared statement.
Add support to compile Junit tests in the functionTests/lang package.


------------------------------------------------------------------------
r425923 | djd | 2006-07-26 17:46:43 -0700 (Wed, 26 Jul 2006) | 2 lines

Add some JUnit JDBC utility methods, compare the meta data for a select list
with DatabaseMetaData and a method to drain a ResultSet. 
------------------------------------------------------------------------
r425846 | djd | 2006-07-26 14:26:49 -0700 (Wed, 26 Jul 2006) | 5 lines

DERBY-1521 Attaching a patch 'd1521-patch1-v1.diff' which modifies UpgradeTester to test the grant/revoke feature. This is a preliminary patch which tests the default upgrade behaviour: In upgrades from versions earlier than 10.2,
* grant/revoke feature is not available in soft upgrade
* grant/revoke feature is not available in full upgrade (by default). This feature will be available after full upgrade only if "derby.database.sqlAuthorization" is true. 

Patch contributed by Deepa Remesh
------------------------------------------------------------------------
r425836 | djd | 2006-07-26 13:36:41 -0700 (Wed, 26 Jul 2006) | 5 lines

DERBY-1539 Supports basic revoke functionality for triggers.
If revoke statement finds a trigger dependent on the table/column/routine
on which privilege is being revoked, the trigger will be dropped automatically.

Patch contributed by Mamta Satoor
------------------------------------------------------------------------
r425820 | djd | 2006-07-26 12:53:16 -0700 (Wed, 26 Jul 2006) | 2 lines

Cleanup of SPSDescriptor to remove setting of unused field paramDefaults.
Field still exists more work to do remove it entirely
------------------------------------------------------------------------
r425814 | djd | 2006-07-26 12:41:58 -0700 (Wed, 26 Jul 2006) | 1 line

Minor cleanup in some data dictionary descriptors moving towards the identity being immmutable
------------------------------------------------------------------------
r425781 | suresht | 2006-07-26 10:11:33 -0700 (Wed, 26 Jul 2006) | 7 lines

DERBY -1156 (partial) re-encryption of the database.

This patch adds a new test that tests recovery of the database 
if the engine crashes just before committing the re-encryption
with a new password phrase. Crash is simulated using the debug flags. 


------------------------------------------------------------------------
r425772 | rhillegas | 2006-07-26 09:24:47 -0700 (Wed, 26 Jul 2006) | 1 line

DERBY-1540: Committed derby-1540_v01.diff, which causes this test to run under the SecurityManager.
------------------------------------------------------------------------
r425765 | rhillegas | 2006-07-26 08:45:40 -0700 (Wed, 26 Jul 2006) | 1 line

DERBY-1541: Committed derby-1541_v01.diff, which deletes a cruft file.
------------------------------------------------------------------------
r425732 | andreask | 2006-07-26 06:42:14 -0700 (Wed, 26 Jul 2006) | 1 line

DERBY-1545 derbynet/testProtocol.java fails with security manager enabled. Fixed by granting SocketPermission in policy file for the test
------------------------------------------------------------------------
r425726 | andreask | 2006-07-26 06:05:02 -0700 (Wed, 26 Jul 2006) | 1 line

DERBY-1587 INTEGER function cannot be abbreviated by INT. Fix consists of one LOC change in sqlgrammar.jj and updates of master files. Contributed by Yip Nig
------------------------------------------------------------------------
r425719 | kahatlen | 2006-07-26 05:19:42 -0700 (Wed, 26 Jul 2006) | 8 lines

DERBY-1563: derbynet/ShutDownDBWhenNSShutsDownTest.junit fails on
Solaris sparc

The attached patch (derby-1563.diff) fixes the problem by waiting
before checking if the file exists.

Patch contributed by Fernanda Pizzorno.

------------------------------------------------------------------------
r425703 | kahatlen | 2006-07-26 04:12:32 -0700 (Wed, 26 Jul 2006) | 7 lines

DERBY-1571: NetworkServerControlImpl.consoleExceptionPrintTrace()
prints stack trace even when logWriter is null

Made NetworkServerControlImpl.shutdown() set logWriter to a silent
stream instead of null to avoid printing stack traces of expected
exceptions during shutdown.

------------------------------------------------------------------------
r425479 | djd | 2006-07-25 11:26:33 -0700 (Tue, 25 Jul 2006) | 5 lines

DERBY-1581 Avoid reloading the Provider from the data dictionary when
executing an invalidateFor on the Provider. Previosuly the code
when loading the stored dependencies and converting them to an in-memory from
reloaded the provider once per dependent. This patch re-uses the Provider
passed into the invalidateFor method.
------------------------------------------------------------------------
r425472 | djd | 2006-07-25 11:08:16 -0700 (Tue, 25 Jul 2006) | 2 lines

Convert JUnit ProcedureTest to use the BaseJDBCTestSetup as the parent class
for its decarator.
------------------------------------------------------------------------
r425457 | davidvc | 2006-07-25 09:53:51 -0700 (Tue, 25 Jul 2006) | 2 lines

Fixed copyright date per Dan's comment

------------------------------------------------------------------------
r425446 | davidvc | 2006-07-25 09:22:05 -0700 (Tue, 25 Jul 2006) | 6 lines

DERBY-1578 - A number of tests fail due to rework on toString() method 
of SQLException.

derbyall passes clean now, except I am getting some diffs in some
i18n tests due to locale differences.  Not sure how to fix those.

------------------------------------------------------------------------
r425391 | andreask | 2006-07-25 06:18:45 -0700 (Tue, 25 Jul 2006) | 1 line

updated source file header for recently added file to comply with new policy. Initial source file also had incorrect copyright dates. It was added as part of DERBY-1296.
------------------------------------------------------------------------
r425388 | andreask | 2006-07-25 05:58:18 -0700 (Tue, 25 Jul 2006) | 1 line

DERBY-1296 Setting property derby.system.bootAll causes NullPointerException in BaseMonitor.bootProviderServices. Fix and test contributed by Fernanda Pizzorno
------------------------------------------------------------------------
r425385 | kahatlen | 2006-07-25 05:21:38 -0700 (Tue, 25 Jul 2006) | 6 lines

DERBY-1586 (partial) The attributesAsPassword property doesn't work
correctly with EmbeddedConnectionPoolDataSource

This patch adds a JUnit test which reproduces the bug. The test is not
run in any suite since the bug is not fixed.

------------------------------------------------------------------------
r425326 | kahatlen | 2006-07-25 01:12:41 -0700 (Tue, 25 Jul 2006) | 2 lines

DERBY-1536: Adding assert in unwrap test jdbc4/ConnectionTest.junit

------------------------------------------------------------------------
r425184 | bandaram | 2006-07-24 13:59:04 -0700 (Mon, 24 Jul 2006) | 4 lines

Fix a typo in sqlgrammar. REVOKE statement needs DD_VERSION_DERBY_10_2 or higher not 10_1 as in the code. Other GRANT/REVOKE statements correctly require DD_VERSION_DERBY_10_2 in the code.

Submitted by Satheesh Bandaram(bandaram@gmail.com)

------------------------------------------------------------------------
r425130 | djd | 2006-07-24 10:35:18 -0700 (Mon, 24 Jul 2006) | 1 line

DERBY-1581 (partial) Fix build error in PermissionsDescriptor.
------------------------------------------------------------------------
r425126 | djd | 2006-07-24 10:27:36 -0700 (Mon, 24 Jul 2006) | 3 lines

Minor cleanup on the StatementPermission objects, clarify that these classes represent the
permissions required by a statement (not used) and change come fields to private to avoid
other code being able to change them to subvert the system.
------------------------------------------------------------------------
r425116 | djd | 2006-07-24 09:50:09 -0700 (Mon, 24 Jul 2006) | 2 lines

DERBY-1581 (partial) Clean-up some descriptor objects as a step to ensuring their identity is immutable
once created and/or fully populated. Remove some unused methods.
------------------------------------------------------------------------
r424686 | kahatlen | 2006-07-23 01:04:08 -0700 (Sun, 23 Jul 2006) | 5 lines

DERBY-1572: Output from tools/derbyrunjartest.java can be mixed

Wait until all output from one command has been saved before executing
the next command.

------------------------------------------------------------------------
r424616 | djd | 2006-07-22 11:33:30 -0700 (Sat, 22 Jul 2006) | 1 line

Remove unused old modifiesTableUUID method from the ConstantAction hierarchy.
------------------------------------------------------------------------
r424539 | tmnk | 2006-07-22 02:00:08 -0700 (Sat, 22 Jul 2006) | 1 line

- DERBY-1513_1535 Trial 1 for DERBY-550 & Trial 2 for DERBY-550 - Patch by Tomohito Nakayama (tomonaka@basil.ocn.ne.jp)
------------------------------------------------------------------------
r424389 | davidvc | 2006-07-21 10:02:25 -0700 (Fri, 21 Jul 2006) | 4 lines

DERBY-1438: Text written by SQLException.toString differs between client and
embedded driver.  This includes a one-line change to source and 1 MB of
changes to master files.  Sigh...

------------------------------------------------------------------------
r424388 | djd | 2006-07-21 09:54:14 -0700 (Fri, 21 Jul 2006) | 4 lines

DERBY-1555 DERBY-1562 (partial) Add new classes BaseJDBCTestSetup and JDBC to support
JDBC Unit test development.
BaseJDBCTestSetup is a TestSetup decorator for setup that uses JDBC.
JDBC class is a holder for JDBC test utility methods.
------------------------------------------------------------------------
r424368 | djd | 2006-07-21 09:02:27 -0700 (Fri, 21 Jul 2006) | 2 lines

DERBY-1555 (partial) Move the code to obtain a default connection into TestConfiuration
for the JUnit test setup to allow it to be shared across multiple classes.
------------------------------------------------------------------------
r424135 | djd | 2006-07-20 16:49:23 -0700 (Thu, 20 Jul 2006) | 1 line

DERBY-1555 (partial) Minor cleanup on some JUnit tests, make the base test classes abstract.
------------------------------------------------------------------------
r424072 | kahatlen | 2006-07-20 14:32:15 -0700 (Thu, 20 Jul 2006) | 15 lines

DERBY-323: Locale problem in test of derby

Description of the patch:

  1) Rewrite tools/derbyrunjartest.java to use jvm.getCommandLine() to
     get the command line to start the test with.

  2) Move the setting of user.language and user.country from RunTest
     and NetServer to jvm.getCommandLine(). This way, all of the java
     processes that are forked from the test harness or from a test
     get the same locale.

  3) Add Locale.setDefault(Locale.US) to RunTest.main(). This fixes
     the issue with the nist tests.

------------------------------------------------------------------------
r423989 | bandaram | 2006-07-20 10:09:03 -0700 (Thu, 20 Jul 2006) | 16 lines

DERBY-781: Materialize select subqueries where possible to avoid recreating their resultsets multiple times. Here is more info from the contributor.

Attaching a patch (d781_v1.patch) to address this issue by allowing the optimizer to consider and choose hash joins with subqueries, which is a more general case of the specific union example mentioned in the description for this issue.  In brief, the patch does this by following up on the suggestions given by Jeff Lichtman in comments above and also in the following thread:

http://article.gmane.org/gmane.comp.apache.db.derby.devel/12208

Since result set materialization comes for "free" with hash joins, that fact we now allow hash joins with subqueries (as of this patch) means that we implicitly have a way to materialize the subquery result sets.

The details of the patch are included as DERBY-781_v1.html.  I added a simple test to lang/subquery.sql to demonstrate that the optimizer can and will choose to do hash joins for subqueries, and I updated one other master file--predicatesIntoViews--for which the optimizer is now choosing a hash join instead of a nested loop.  Testing of "unsafe" hash joins (see section VII of the document) and generation of correct plans is done through existing24072 | esting o
Add DatabasePrt | 2lines

DERBY-32orld, dba is tract.
---700 (Tue, 080(67 Aug 2007 | davidvc |ERBY-32orVII gfluhe dodg48 

To sets.

ahe details of the patch are in l(2ed as DERBY-781_ztps to .oo-------- the p  Testing of "------68"the server m included as DEABYTD802d methods.)34g/LangScripx co: Provide ALTER2orldE DROP COLUMN functionality
oo-------- the ----------ed for Ramand 2006-08-31 15:57:32 -0557 ( more acp 2edsl
     attribute nodes.

  2. In ordec to ensure than iye l-0700  2------ is tract.
--by SQLException.toStrinm differs between client and
edbog file up toNote tltSet. 
---------pati

----------------------------------
r425388 | andreask | 2006-07-25 05:58:18 -0700 (Tuec annclientBY-1609 (partce 2 Move initializing connectiomosePrt | 2e acp 2edlt set mat the global tem006-07-2--------RBY-2006: Add a RBY-15409 (partc080(67 AНʂing.
Remaining JUnit tests  corf the ocn.ne.jp)
----erby.jar------- zing connectiomosePrt | 2e acp 2edlt set mat the global tem006-07-2--------RBY-2DERBY-15entBY-16ANY KIND, e49:23 -0700 (UHTUR20 Jul 2006) | 1 line

DERBYNL555 (partial) Minor cleanup an 9 SQLSVOJse any of
the XML operators.

I inquiges),
all the tests in Embedmethod.
--------- (DERBY-1794).
------nsider and cheome ttesIntoViews--for which the006: Add a slnheome9 (partc080(67 AНʂing.
Remaining JUnit t.

I inquigesamall the tests in.Ec2edme                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            