DERBY-6211: Make it possible to plug alternative trace logic into the Optimizer.

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

Patch derby-6125-visibility-02-e.

Further limits scopes of program entities and also removes dead code,
including maintenance of fields that are never read, i.e. they are not
used for anything except setting them.

When I use the term "unused" below it may mean that something is
ultimately/transitively unused, e.g a method used to set an unused
field, or due to other code removal transitively. All references are
to client classes.

* Agent

  Removed unused method batchUpdateExceptionGenerated

* ClientCallableStatement

  Removed two unused overloads: resetCallableStatement

* ClientClob

  Removed unused field encoding_

  Removed unused methods createClobWrapper, convertFromAsciiToCharacterStream

* ClientPreparedStatement

  Removed unused methods resetPreparedStatement,
  initPreparedStatement, writeDescribeOutput, readDescribeOutput,
  writePrepareDescribeInputOutput, checkScaleForINOUTDecimal

  Inlined creation of method not implemented exception, removed
  jdbc3FeatureNotSupported.

* ClientResultSet

  Commented out unused fields updatability_unknown__, updatability_readOnly__

  Removed unused fields NEXT_ROWSET, PREVIOUS_ROWSET, ABSOLUTE_ROWSET,
  FIRST_ROWSET, LAST_ROWSET, RELATIVE_ROWSET, REFRESH_ROWSET, nestingLevel_

  Removed unused method rowCountIsKnown. flowFetch moved to NetResultSet.

* ClientStatement

  Removed unused field returnValueFromProcedure_

  Commented out unused fields isCommitSql__, isRollbackSql__, isPositionedUpdateDeleteSql__

  Removed unused method clientmarkResultSetsClosed, getProcedureName,
  upperCaseProcedureName, jdbc3FeatureNotSupported

* ClobLocatorOutputStream

  Removed unused field connection

* ColumnMetaData

  Removed unused fields singleMixedByteOrDouble_,
  protocolTypeToOverrideLidMapping_, mddOverrideArray_

  Removed unused method isParameterModeGuessedAsOutput, columnIsNotInUnicode

* Configuration

  Removed unused fields jreLevelMajor, jreLevelMinor, jreLevel,
  dncPackageVersion, enableNetConnectionPooling,
  cursorAttribute_InsensitiveRowset,
  cursorAttribute_SensitiveDynamicRowset,
  cursorAttribute_InsensitiveRowset

* CrossConverters

  Removed unused method getBooleanFromByte, getBigDecimalFromBoolean,
  getStringFromBoolean, getDateFromTime(Time),
  getDateFromTimestamp(Timestamp), getTimeFromTimestamp(Timestamp),
  getTimestampFromTime(Time), getTimestampFromDate(Date)

* DisconnectException

  Removed unused constructor DisconnectException(Agent, ClientMessageId, SqlCode)

* LogWriter

  Removed unused traceExit overloads.

* SectionManager

  Removed unused fields collection_, HOLD, NO_HOLD,

* SqlCode

  Removed unused fields invalidCommitOrRollbackUnderXA,
  invalidSetAutoCommitUnderXA, undefinedError

* SqlException

  Removed unused constructor SqlException(LogWriter, ClientMessageId, SqlCode)

* SqlWarning

  Removed unused constructors
  Removed unused method getNextWarning

* Sqlca

  Removed unused methods getReturnValue, includesSqlCode

* Utils

  Removed unused methods getStringFromStrings, padOrTruncate,
  checkForNegativePositiveSqlcard (2X), getUpdateCountFromSqlcard,
  accumulateSQLWarning, getSQLTypeName (we might want to keep this for
  debugging possibly?)

* Version

  Removed unused methods getDriverName, getBuildNumber, isAlpha, isBeta

* XaException

  Removed unused constructors
  Removed unused method copyAsUnchainedXAException

* CodePoint

  Removed many unused code points (fields). One could argue that it's
  nice to keep these if we need them later, opinions welcomed. For me
  it seems clearer to only keep those we need, we know what the source
  for the constants is anyway, i.e. the DRDA specification.

* DssConstants

  Removed many unused constants, cf previous item considerations.

* FdocaConstants

  Removed many unused constants, cf previous item considerations.

* FdocaSimpleDataArray

  Removed unused fields fdocaFieldType_, representation_, mode_, fieldLength_

* NetAgent

  Removed unused fields packageRequest_,
  Removed unused method convertToStringTcpIpAddress

* NetConfiguration

  Removed unused fields INITIAL_CAPACITY, NON_CHAR_DDM_DATA_PAD_BYTE,
  CURSOR_NOT_OPEN, CURSOR_OPEN, CURSOR_CLOSE_ONLY, DDMHDR_LENGTH,
  PRDDTA_MAX_ACCT_SUFFIX_LEN, MGRLVL_3, MGRLVL_4, MGRLVL_6,
  SECMEC_DCESEC, SECMEC_EUSRIDNWPWD, SYSTEM_ASC

* NetConnection

  Removed unused field pendingEndXACallinfoOffset_, targetSrvclsnm_, seqNo_

  Removed unused methods getSpecialRegisters, addSpecialRegisters,
  getSequenceNumber, getIndoubtTransaction, doResetNow,
  serverSupportsBooleanValues

* NetConnectionRequest

  Removed unused method writeDummyExchangeServerAttributes

* NetCursor

  Removed unused fields targetSqlamForTypdef_, numMddOverrides_

* NetResultSet

  Removed unused method queryDataWasReturnedOnOpen

* NetResultSet

  Method flowFetch moved from ClientResultSet to be able to make it
  package private.

* NetStatement

  Removed unused constructor
  Removed unused method netReset

* NetXACallInfo

  Removed unused fields xaInProgress_, xaWasSuspended,
  currConnection_, freeEntry_, convReleased_, xaResource_, uowid_,
  readOnlyTransaction_

  Removed unused methods setUOWID, getUOWID,
  setReadOnlyTransactionFlag, getReadOnlyTransactionFlag

* NetXAConnection

  Removed unused methods writeLocalXAStart_, readLocalXAStart, getUOWID, getPort

* NetXAResource

  Removed unused fields TMTIMEOUT, ACTIVE_ONLY, XA_NULL_XID,
  RECOVER_XID_ARRAY_LENGTH, XAFUNC_NONE, rmId_, numXACallInfo_,
  connectionCount_, activeXATransCount_, rmIdx_, rmIdy_, port_,
  ipaddr_, specialRegisters_

  Removed unused methods throwXAException, getSpecialRegisters,
  addSpecialRegisters

* Reply

  Removed unused fields dssIsChainedWithDiffID_

  Removed unused methods readIntArray, readLong, readBoolean,
  readString(int), readLDBytes, peekLength

* Request

  Removed unused method createXACommand, writeScalarBytes,
  writeScalarHeader, writeScalarPaddedBytes, writeDDMString

* Typdef

  Removed unused constructor(NetAgent, int, String)
  Removed unused field environment_
  Removed unused methods clearCcsidSbc, clearCcsidDbc, clearCcsidMbc

* NetIndoubtTransaction removed altogether

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

    Patch "derby-6125-visibility-03-a" to limit sharing of state
    between classes not in the same package by cloning arrays not
    considered performance sensitive.

    * ClientStatement
      made indexOfCurrentResultSet private by adding accessors

      removed unused field numInvisibleRS

      cloned execute, executeLargeUpdate and executeUpdate's overloads
      input arrays columnIndexes and columnNames

      cloned completeExecuteCall's argument resultSets

    * ClientPreparedStatement

      use new accessor resetResultSetList instead of accessing
      ClientStatement#indexOfCurrentResultSet directly

git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1478641 13f79535-47bb-0310-9956-ffa450edef68
DERBY-6211: Cleanup optimizer trace support.

git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1478932 13f79535-47bb-0310-9956-ffa450edef68
DERBY-6211: Add ability to plug custom trace logic into the optimizer.

git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1479552 13f79535-47bb-0310-9956-ffa450edef68
DERBY-6169: Reduce visibility of classes and methods under impl/sql

Remove the CreateViewNode.getProviderInfo() method in which a bug (it
returns colInfos instead of providerInfos) was introduced in revision
1477476.

Also remove the single caller of that method, as it appears to be dead
code that was only needed for views that had been created with a
pre-Derby version of the engine. Since upgrade is only supported from
other Derby versions, that logic should not be needed anymore.

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

Commiting a test showing that we use index scan for DELETE statement on a table with appropriate indexes. This happens with or without update statistics and with or without parameterized statement.



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