DERBY-6151: Preserve the SQLWarnings raised by table functions.

git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1464934 13f79535-47bb-0310-9956-ffa450edef68
DERBY-6150 Add automatic cleanup of connections opened with openDefaultConnection() 


git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1465187 13f79535-47bb-0310-9956-ffa450edef68
DERBY-6125 Code clean up in client driver.
Patch derby-6125-05-d; details:

** ClientXid

- reworked ClientXid#equals to find favor with FindBugs: now tests for null and wrong type.
  The old version would get classcastexception if a wrong type object was compared.

- made ClientXid#getData clone the result - it is a byte array

** Section

- clone bytes in Section#setPKGNAMCBytes to avoid having a package private variable
  wriable from outside the package (it's an array).

- make Section#getPKGNAMCBytes return a clone

** Sqlca

- removed unnecessary a priori allocation to Sqlca#sqlErrd_.

- made Sqlca#sqlWarn_ private

- changed #getSqlWarn to return String since all its uses need a String anyway.

- made Sqlca#getSqlErrd private

- simplified implementation of Sqlca#getSqlWarn

- made Sqlca#rowsetRowCount_ private

- made Sqlca#containsSqlcax_ private

- made Sqlca#sqlErrmcMessages_ private

- removed argument sqlErrpBytes from Sqlca#setContainsSqlcax (only called once; with null).

- removed argument sqlErrpBytes from Sqlca#resetRowsetSqlca  (only called with null).

- introduced Sqlca#getReturnValue in Statement#completeExecute instead
  of allowing access to sqlca.getSqlErrd()[0]

- removed unused Sqlca#sqlErrmcCcsid_

- introduced public String Sqlca#formatSqlErrd as replacement for
  direct access to Sqlca#sqlErrd_.

** NetSqlca

- made NetSqlca#setSqlwarnBytes package private

- made NetSqlca#setSqlerrmcBytes package private and removed its
  argument sqlErrmcCcsid

- made NetSqlca#setSqlerrd package private

- removed unnecessary test for BIG_ENDIAN in NetSqlca#getRowCount: the
  protocol always uses big endian (SignedBinary.BIG_ENDIAN = 1 is final).

- removed unnecessary type argument to NetSqlca#getRowCount now that endian test is no longer done

** Statement

- made Statement#materialStatement_ private; new accessors

** NetConnection

- removed unnecessary default NetConnection finalizer

** NetXAConnection

- removed potentially harmful finalizer in NetXAConnection: it calls a
  finalizer for another class (NetConnection). FindBugs advice on this
  (quote):

  "If a connected set of objects beings finalizable, then the VM will
  invoke the finalize method on all the finalizable object, possibly
  at the same time in different threads. Thus, it is a particularly
  bad idea, in the finalize method for a class X, invoke finalize on
  objects referenced by X, because they may already be getting
  finalized in a separate thread. "

  It also neglected to call super.finalize()...

** Typdef

- made Typdef#FdocaSimpleDataArray private

- removed unused TypDef#getByteOrder

- made Typdef#environmentTables_ private

** SqlException

- made SqlException#SQLExceptionFactory package private (was protected)

** EncryptionManager

- removed unused methods EncryptionManager#setInitVector and #setSecKey

** NetXACallInfo

- removed unused NetXACallInfo#getCorrelatorToken

git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1465193 13f79535-47bb-0310-9956-ffa450edef68
DERBY-6075: Use modern collections in impl/sql/compile

Rename variables that have "vector" in their names and update
comments.

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

git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1465369 13f79535-47bb-0310-9956-ffa450edef68
DERBY-6000: Suppress diagnostic in UnsupportedVetter unless debug printing is on.

git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1465600 13f79535-47bb-0310-9956-ffa450edef68
DERBY-6045 (in list multi-probe by primary key not chosen on tables with >256 rows)

Adding tow more test fixtures(testDerby6045WithUpdateStatistics and testDerby6045WithoutUpdateStatistics). 
Difference between the two fixtures is testDerby6045WithUpdateStatistics issues an update statistics after inserting the required number of rows in the table, where as testDerby6045WithoutUpdateStatistics does not issue an update statisitcs.
The code for them looks as follows
1)Create a brand new table with a primary key
2)Add 10 rows/24 rows/10,000 rows.
3)One of the test fixture(testDerby6045WithUpdateStatistics) will issue an update statistics at this time
4)Run following 3 queries and make sure they all use index scan
	SELECT * FROM newTable WHERE TERM_ID = 11
	SELECT * FROM newTable WHERE (TERM_ID = 11) OR (TERM_ID =21) OR (TERM_ID = 31)
	SELECT * FROM newTable WHERE (TERM_ID IN (11, 21, 31))
5)Drop the table



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