DERBY-6267: Count row sources in optimizer overrides at optimize() time rather than bind() time; add more tests for optimizer overrides; tests passed cleanly on derby-6267-02-aa-moreTests.diff.

git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1501411 13f79535-47bb-0310-9956-ffa450edef68
DERBY-6267: Add optimizer override tests for more kinds of subqueries; tests for derby-6267-03-aa-moreSubqueryTests.diff passed cleanly.

git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1501891 13f79535-47bb-0310-9956-ffa450edef68
DERBY-6284: Improve test coverage of org.apache.derby.iapi.db.ConnectionInfo

This patch was contributed by Ahsan Shamsudeen (ahsan dot competition at gmail dot com)

This patch removes the method lastAutoincrementValue from the ConnectionInfo
class. This method is no longer part of the public Derby API; Derby
applications should be using java.sql.Statement.getGeneratedKeys() instead.



git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1502089 13f79535-47bb-0310-9956-ffa450edef68
DERBY-6267: Fix javadoc warning

git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1502155 13f79535-47bb-0310-9956-ffa450edef68
DERBY-6283 indexStat daemon processing tables over and over even when there are no changes in the tables in soft upgraded database.

Changed system to always drop orphaned stats during update statistics call.  

Without this change soft upgraded systems running on 10.8 or higher derby 
software, that had an orphaned statistic would spin forever in the index 
stat daemon due to the same problem fixed by DERBY-5680 for hard 
upgraded databases.



git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1502319 13f79535-47bb-0310-9956-ffa450edef68
DERBY-6216: XPLAIN feature does not work, gives XCL16: ResultSet not open

This change adjusts the implementation of the explain-only mode feature,
which is enabled via syscs_util.syscs_set_xplain_mode(1).

Prior to this change, the implementation short-circuited the open() method
of the ResultSet classes, causing the execution engine to terminate
immediately because the result sets were not open.

This change takes an alternate approach, suggested by Knut Anders: the open()
is allowed to proceed normally, but we short-circuit the getNextRow()
method of the ResultSet classes. This way, the result sets all appear to be
normal result sets, open and ready for business, but they do no work and
always produce an empty result.

Then, at the end of the execution, the statistics are gathered. They show
that no work was done, but they contain information about the overall "shape"
of the query plan (which result sets were constructed, and what the overall
result set tree looks like).

We also discovered that we were completely missing regression tests for the
explain-only feature, so this change adds a handful of regression tests,
including an IJ-based test, a simple embedded query, and a test that verifies
that explain-only mode can be turned on and off between executions of a
prepared query.

More testing would clearly be beneficial, but this should at least give us
a feature that basically works.



git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1502795 13f79535-47bb-0310-9956-ffa450edef68
DERBY-673: Get rid of the NodeFactory

Patch, derby-673-more-typesafe-6. This cleans up most compiler
warnings in the classes touched, including unnecessary casts due to
changes introduced by this use, but also others.  Some warnings were
silenced using the @SuppressWarning tag (mostly use of old classes
like Vector, Hashtable), in other cases the underlying problem was
fixed by changing the code as required.

It also introduces an explicit TriggerDescriptorList class extending a
generified GenericDescriptorList<TriggerDescriptor>.

Some local variables shadowing others are renamed and in in case
the two variables were merged into one.

I left in place warnings about missing serialVersionUID in
serializable classes since I am not sure whether they can be safely
suppressed; it would need further analysis.

git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1502965 13f79535-47bb-0310-9956-ffa450edef68
DERBY-4478: Use AtomicLong for XactFactory.tranId

git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1503157 13f79535-47bb-0310-9956-ffa450edef68
DERBY-6292: Use Arrays.copyOf() in FormatableArrayHolder.getArray()

git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1504808 13f79535-47bb-0310-9956-ffa450edef68
DERBY-6296: Simplify PropertyUtil using Properties.stringPropertyNames()

git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1504809 13f79535-47bb-0310-9956-ffa450edef68
DERBY-2091: Increase coverage for StatementEventsTest

git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1504820 13f79535-47bb-0310-9956-ffa450edef68