rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
ClassName.NoPutResultSet, 17);
ClassName.NoPutResultSet, 16);
private void generateDistinctScan ( ExpressionClassBuilder acb, MethodBuilder mb ) throws StandardException { ConglomerateDescriptor cd = getTrulyTheBestAccessPath().getConglomerateDescriptor(); CostEstimate costEstimate = getFinalCostEstimate(); int colRefItem = (referencedCols == null) ? -1 : acb.addI...
closeMethodArgument(acb, mb);
private void generateMaxSpecialResultSet ( ExpressionClassBuilder acb, MethodBuilder mb ) throws StandardException { ConglomerateDescriptor cd = getTrulyTheBestAccessPath().getConglomerateDescriptor(); CostEstimate costEstimate = getFinalCostEstimate(); int colRefItem = (referencedCols == null) ? -1 :...
ClassName.NoPutResultSet, 14);
ClassName.NoPutResultSet, 13);
private void generateMaxSpecialResultSet ( ExpressionClassBuilder acb, MethodBuilder mb ) throws StandardException { ConglomerateDescriptor cd = getTrulyTheBestAccessPath().getConglomerateDescriptor(); CostEstimate costEstimate = getFinalCostEstimate(); int colRefItem = (referencedCols == null) ? -1 :...
closeMethodArgument(acb, mb);
private int getScanArguments(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException { // get a function to allocate scan rows of the right shape and size MethodBuilder resultRowAllocator = resultColumns.generateHolderMethod(acb, referencedCols, (Fo...
public FormatableIntHolder(int theInt)
public FormatableIntHolder()
public FormatableIntHolder(int theInt) { this.theInt = theInt; }
this.theInt = theInt;
public FormatableIntHolder(int theInt) { this.theInt = theInt; }
public FormatableLongHolder(long theLong)
public FormatableLongHolder()
public FormatableLongHolder(long theLong) { this.theLong = theLong; }
this.theLong = theLong;
public FormatableLongHolder(long theLong) { this.theLong = theLong; }
protected void normalize(DataTypeDescriptor desiredType, String sourceValue) throws StandardException
public void normalize( DataTypeDescriptor desiredType, DataValueDescriptor source) throws StandardException
protected void normalize(DataTypeDescriptor desiredType, String sourceValue) throws StandardException { int desiredWidth = desiredType.getMaximumWidth(); int sourceWidth = sourceValue.length(); /* ** If the input is already the right length, no normalization is ** necessary. ** ** It's OK for a Varchar value...
int desiredWidth = desiredType.getMaximumWidth(); int sourceWidth = sourceValue.length(); if (sourceWidth > desiredWidth) { hasNonBlankChars(sourceValue, desiredWidth, sourceWidth); sourceValue = sourceValue.substring(0, desiredWidth); } setValue(sourceValue);
normalize(desiredType, source.getString());
protected void normalize(DataTypeDescriptor desiredType, String sourceValue) throws StandardException { int desiredWidth = desiredType.getMaximumWidth(); int sourceWidth = sourceValue.length(); /* ** If the input is already the right length, no normalization is ** necessary. ** ** It's OK for a Varchar value...
throw StandardException.newException(SQLState.SERVICE_DIRECTORY_CREATE_ERROR, serviceDirectory, null);
throw StandardException.newException(SQLState.SERVICE_DIRECTORY_CREATE_ERROR, serviceDirectory);
public String createServiceRoot(final String name, final boolean deleteExisting) throws StandardException { if( !( rootStorageFactory instanceof WritableStorageFactory)) throw StandardException.newException(SQLState.READ_ONLY_SERVICE); // we need to create the directory before we can call // ge...
throw StandardException.newException(SQLState.SERVICE_DIRECTORY_CREATE_ERROR, name, t);
throw StandardException.newException(SQLState.SERVICE_DIRECTORY_CREATE_ERROR, t, name);
public String createServiceRoot(final String name, final boolean deleteExisting) throws StandardException { if( !( rootStorageFactory instanceof WritableStorageFactory)) throw StandardException.newException(SQLState.READ_ONLY_SERVICE); // we need to create the directory before we can call // ge...
throw StandardException.newException(SQLState.SERVICE_DIRECTORY_CREATE_ERROR, serviceDirectory, null);
throw StandardException.newException(SQLState.SERVICE_DIRECTORY_CREATE_ERROR, serviceDirectory);
public Object run() throws StandardException, IOException, InstantiationException, IllegalAccessException { StorageFactory storageFactory = privGetStorageFactoryInstance( true, name, null, null); try ...
System.out.println("derbyURL" + derbyURL.toExternalForm());
public static void main(String[] args) throws Exception { System.out.println("Test AggregateClassLoading starting"); // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); Connection conn = ij.startJBMS(); // Find the location of the code for the Derby c...
s.execute("drop table t");
public static void main(String[] args) throws Exception { System.out.println("Test AggregateClassLoading starting"); // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); Connection conn = ij.startJBMS(); // Find the location of the code for the Derby c...
if (costEstimate == null) { costEstimate = getNewCostEstimate(); costEstimate.setCost( leftResultSet.getFinalCostEstimate().getEstimatedCost() + rightResultSet.getFinalCostEstimate().getEstimatedCost(), rightResultSet.getFinalCostEstimate().rowCount(), rightResultSet.getFinalCostEstimate().rowCount()); }
costEstimate = getFinalCostEstimate();
private int getJoinArguments(ActivationClassBuilder acb, MethodBuilder mb, ValueNode joinClause) throws StandardException { int numArgs = getNumJoinArguments(); leftResultSet.generate(acb, mb); // arg 1 mb.push(leftResultSet.resultColumns.size()); // arg 2 rightResultSet.generate(acb, mb)...
public IndexRow(int ncols) { super(ncols); orderedNulls = new boolean[ncols]; }
public IndexRow() {}
public IndexRow(int ncols) { super(ncols); orderedNulls = new boolean[ncols]; /* Initializes elements to false */ }
NumberDataValue getDecimalDataValue(String value) throws StandardException;
NumberDataValue getDecimalDataValue(Number value) throws StandardException;
NumberDataValue getDecimalDataValue(String value) throws StandardException;
return (scale == 0) ? (precision + 1) : (precision + 3);
return (scale ==0) ? (precision +1) : ((scale == precision) ? (precision + 3) : (precision + 2));
public static int computeMaxWidth( int precision, int scale) { return (scale == 0) ? (precision + 1) : (precision + 3); }
public void backup(String backupDir) throws StandardException
public void backup( String backupDir, boolean wait) throws StandardException
public void backup(String backupDir) throws StandardException { rawstore.backup(backupDir); }
rawstore.backup(backupDir);
rawstore.backup(backupDir, wait);
public void backup(String backupDir) throws StandardException { rawstore.backup(backupDir); }
public void backupAndEnableLogArchiveMode(String backupDir, boolean deleteOnlineArchivedLogFiles)
public void backupAndEnableLogArchiveMode( String backupDir, boolean deleteOnlineArchivedLogFiles, boolean wait)
public void backupAndEnableLogArchiveMode(String backupDir, boolean deleteOnlineArchivedLogFiles) throws StandardException { rawstore.backupAndEnableLogArchiveMode(backupDir, deleteOnlineArchivedLogFiles); }
rawstore.backupAndEnableLogArchiveMode(backupDir, deleteOnlineArchivedLogFiles);
rawstore.backupAndEnableLogArchiveMode(backupDir, deleteOnlineArchivedLogFiles, wait);
public void backupAndEnableLogArchiveMode(String backupDir, boolean deleteOnlineArchivedLogFiles) throws StandardException { rawstore.backupAndEnableLogArchiveMode(backupDir, deleteOnlineArchivedLogFiles); }
int codePoint, EXTDTAInputStream in, boolean writeNullByte) throws DRDAProtocolException {
int codePoint, EXTDTAInputStream in, boolean writeNullByte) throws DRDAProtocolException { int spareDssLength = prepScalarStream( chainedWithSameCorrelator, codePoint, writeNullByte); int bytesRead = 0; int totalBytesRead = 0;
protected void writeScalarStream (boolean chainedWithSameCorrelator, int codePoint, EXTDTAInputStream in, boolean writeNullByte) throws DRDAProtocolException { // Stream equivalent of "beginDss"... int spareDssLength = prepScalarStream( chainedWithSameCorrelator, codeP...
try { OutputStream out = placeLayerBStreamingBuffer( agent.getOutputStream() ); boolean isLastSegment = false; while( !isLastSegment ){ int spareBufferLength = bytes.length - offset; if( SanityManager.DEBUG ){ if( PropertyUtil.getSystemProperty("derby.debug.suicideOfLayerBStreaming") != null ) throw new IOExcepti...
protected void writeScalarStream (boolean chainedWithSameCorrelator, int codePoint, EXTDTAInputStream in, boolean writeNullByte) throws DRDAProtocolException { // Stream equivalent of "beginDss"... int spareDssLength = prepScalarStream( chainedWithSameCorrelator, codeP...
int spareDssLength = prepScalarStream( chainedWithSameCorrelator, codePoint, writeNullByte); int bytesRead = 0; int totalBytesRead = 0;
isLastSegment = peekStream(in) < 0; if(isLastSegment || spareDssLength == 0){ flushScalarStreamSegment (isLastSegment, out); if( ! isLastSegment ) spareDssLength = DssConstants.MAX_DSS_LENGTH - 2;
protected void writeScalarStream (boolean chainedWithSameCorrelator, int codePoint, EXTDTAInputStream in, boolean writeNullByte) throws DRDAProtocolException { // Stream equivalent of "beginDss"... int spareDssLength = prepScalarStream( chainedWithSameCorrelator, codeP...
try { OutputStream out = placeLayerBStreamingBuffer( agent.getOutputStream() ); boolean isLastSegment = false; while( !isLastSegment ){ int spareBufferLength = bytes.length - offset; if( SanityManager.DEBUG ){ if( PropertyUtil.getSystemProperty("derby.debug.suicideOfLayerBStreaming") != null ) throw new IOExcepti...
} } out.flush(); }catch(IOException e){ agent.markCommunicationsFailure ("DDMWriter.writeScalarStream()", "", e.getMessage(), "*"); }
protected void writeScalarStream (boolean chainedWithSameCorrelator, int codePoint, EXTDTAInputStream in, boolean writeNullByte) throws DRDAProtocolException { // Stream equivalent of "beginDss"... int spareDssLength = prepScalarStream( chainedWithSameCorrelator, codeP...
String severeExceptionInfo = null;
private void writeSQLCAGRP(SQLException e, int sqlcode, int updateCount, long rowCount) throws DRDAProtocolException { String sqlerrmc; String sqlState; String severeExceptionInfo = null; SQLException nextException = null; if (rowCount < 0 && updateCount < 0) { writer.writeByte(CodePoint.NULLDATA); return;...
if (e instanceof EmbedSQLException) { EmbedSQLException ce = (EmbedSQLException) e; boolean severeException = (ce.getErrorCode() >= ExceptionSeverity.SESSION_SEVERITY); sqlerrmc = ""; byte[] sep = {20}; byte[] errSep = {20, 20, 20}; String separator = new String(sep); String errSeparator = new String(errSep); String ...
sqlerrmc = buildSqlerrmc(e);
private void writeSQLCAGRP(SQLException e, int sqlcode, int updateCount, long rowCount) throws DRDAProtocolException { String sqlerrmc; String sqlState; String severeExceptionInfo = null; SQLException nextException = null; if (rowCount < 0 && updateCount < 0) { writer.writeByte(CodePoint.NULLDATA); return;...
int maxlen = (sqlerrmc == null) ? -1 : Math.min(sqlerrmc.length(), appRequester.supportedMessageParamLength()); if ((maxlen >= 0) && (sqlerrmc.length() > maxlen)) sqlerrmc = sqlerrmc.substring(0, maxlen);
private void writeSQLCAGRP(SQLException e, int sqlcode, int updateCount, long rowCount) throws DRDAProtocolException { String sqlerrmc; String sqlState; String severeExceptionInfo = null; SQLException nextException = null; if (rowCount < 0 && updateCount < 0) { writer.writeByte(CodePoint.NULLDATA); return;...
scoped = oldCR.isScoped();
public void copyFields(ColumnReference oldCR) throws StandardException { super.copyFields(oldCR); tableName = oldCR.getTableNameNode(); tableNumber = oldCR.getTableNumber(); columnNumber = oldCR.getColumnNumber(); source = oldCR.getSource(); nestingLevel = oldCR.getNestingLevel(); sourceLevel = oldCR.getSource...
remaps = null;
public void init(Object columnName, Object tableName, Object tokBeginOffset, Object tokEndOffset ) { this.columnName = (String) columnName; this.tableName = (TableName) tableName; this.setBeginOffset(((Integer) tokBeginOffset).intValue()); this.setEndOffset(((Integer) tokEndOffset).intValue()...
origSource = source;
public void remapColumnReferences() { ValueNode expression = source.getExpression(); if (SanityManager.DEBUG) { // SanityManager.ASSERT(origSource == null, // "Trying to remap ColumnReference twice without unremapping it."); } if ( ! ( (expression instanceof VirtualColumnNode) || (expression instanceof ...
origName = columnName;
public void remapColumnReferences() { ValueNode expression = source.getExpression(); if (SanityManager.DEBUG) { // SanityManager.ASSERT(origSource == null, // "Trying to remap ColumnReference twice without unremapping it."); } if ( ! ( (expression instanceof VirtualColumnNode) || (expression instanceof ...
origColumnNumber = columnNumber;
public void remapColumnReferences() { ValueNode expression = source.getExpression(); if (SanityManager.DEBUG) { // SanityManager.ASSERT(origSource == null, // "Trying to remap ColumnReference twice without unremapping it."); } if ( ! ( (expression instanceof VirtualColumnNode) || (expression instanceof ...
origTableNumber = tableNumber;
public void remapColumnReferences() { ValueNode expression = source.getExpression(); if (SanityManager.DEBUG) { // SanityManager.ASSERT(origSource == null, // "Trying to remap ColumnReference twice without unremapping it."); } if ( ! ( (expression instanceof VirtualColumnNode) || (expression instanceof ...
source = origSource; origSource = null; columnName = origName; origName = null; tableNumber = origTableNumber; columnNumber = origColumnNumber;
if ((remaps == null) || (remaps.size() == 0)) { source = origSource; origSource = null; columnName = origName; origName = null; tableNumber = origTableNumber; columnNumber = origColumnNumber; } else { RemapInfo rI = (RemapInfo)remaps.remove(remaps.size() - 1); source = rI.getSource(); columnName = rI.getColumnName();...
public void unRemapColumnReferences() { if (origSource == null) return; if (SanityManager.DEBUG) { // SanityManager.ASSERT(origSource != null, // "Trying to unremap a ColumnReference that was not remapped."); } source = origSource; origSource = null; columnName = origName; origName = null; tableNumber ...
System.out.println("TEST COUNT" + suite.countTestCases());
public static Test suite() { TestSuite suite = new TestSuite(); // need DriverManager at least and Derby drivers // no interest in testing DB2's client. if (JDBC.vmSupportsJDBC2() && (usingEmbedded() || usingDerbyNetClient())) { boolean autoloa...
Connection getConnection()
final EngineConnection getConnection()
Connection getConnection() { return conn; }
Connection conn = NetworkServerControlImpl.getDriver().connect(Attribute.PROTOCOL
EngineConnection conn = (EngineConnection) NetworkServerControlImpl.getDriver().connect(Attribute.PROTOCOL
void makeConnection(Properties p) throws SQLException { p.put(Attribute.USERNAME_ATTR, userId); // take care of case of SECMEC_USRIDONL if(password != null) p.put(Attribute.PASSWORD_ATTR, password); Connection conn = NetworkServerControlImpl.getDriver().conne...
void setConnection(Connection conn)
final void setConnection(EngineConnection conn)
void setConnection(Connection conn) throws SQLException { this.conn = conn; if(conn != null) defaultStatement.setStatement(conn); }
testPoolReset("EmbeddedConnectionPoolDataSource", dsp.getPooledConnection());
protected void runTest(String[] args) throws Exception { // Check the returned type of the JDBC Connections. ij.getPropertyArg(args); Connection dmc = ij.startJBMS(); dmc.createStatement().executeUpdate("create table y(i int)"); dmc.createStatement().executeUpdate("create procedure checkConn2(in dsname varchar(20...
testPoolReset("EmbeddedXADataSource", dsx.getXAConnection());
protected void runTest(String[] args) throws Exception { // Check the returned type of the JDBC Connections. ij.getPropertyArg(args); Connection dmc = ij.startJBMS(); dmc.createStatement().executeUpdate("create table y(i int)"); dmc.createStatement().executeUpdate("create procedure checkConn2(in dsname varchar(20...
public Row getStepFields(StepMeta stepMeta) throws KettleStepException
public Row getStepFields(String stepname) throws KettleStepException
public Row getStepFields(StepMeta stepMeta) throws KettleStepException { return getStepFields(stepMeta, null); }
return getStepFields(stepMeta, null);
StepMeta stepMeta = findStep(stepname); if (stepMeta != null) return getStepFields(stepMeta); else return null;
public Row getStepFields(StepMeta stepMeta) throws KettleStepException { return getStepFields(stepMeta, null); }
if (length < 0) throw newSQLException(SQLState.NEGATIVE_STREAM_LENGTH);
public final void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException { int jdbcTypeId = getParameterJDBCType(parameterIndex); switch (jdbcTypeId) { case Types.BINARY: case Types.VARBINARY: case Types.LONGVARBINARY: case Types.BLOB: break; default: throw dataTypeConver...
int length)
long length)
protected void setBinaryStreamInternal(int parameterIndex, InputStream x, int length) throws SQLException { checkStatus(); int jdbcTypeId = getParameterJDBCType(parameterIndex); if (x == null) { setNull(parameterIndex, jdbcTypeId); return; } try { getParms().getParameterForSet(parameterIn...
getParms().getParameterForSet(parameterIndex - 1).setValue(new RawToBinaryFormatStream(x, length), length);
getParms().getParameterForSet(parameterIndex - 1).setValue(new RawToBinaryFormatStream(x, (int)length), (int)length);
protected void setBinaryStreamInternal(int parameterIndex, InputStream x, int length) throws SQLException { checkStatus(); int jdbcTypeId = getParameterJDBCType(parameterIndex); if (x == null) { setNull(parameterIndex, jdbcTypeId); return; } try { getParms().getParameterForSet(parameterIn...
setBinaryStreamInternal(i, x.getBinaryStream(), -1);
{ long streamLength = x.length(); setBinaryStreamInternal(i, x.getBinaryStream(), streamLength); }
public void setBlob (int i, Blob x) throws SQLException { int colType; synchronized (getConnectionSynchronization()) { colType = getParameterJDBCType(i); } // DB2: only allow setBlob on a BLOB column. if (colType != Types.BLOB) throw dataTypeConversion(i...
listProperties("1527"); execCmdDumpResults(cmdTraceOff);
public static void main (String args[]) throws Exception { if ((System.getProperty("java.vm.name") != null) && System.getProperty("java.vm.name").equals("J9")) jvm = jvm.getJvm("j9_13"); else jvm = jvm.getJvm("currentjvm"); // ensure compatibility vCmd = jvm.getCommandLine(); try { bos = new Buffered...
System.out.print("INOUT " + sqlType + " registerOutParameter(" + TestUtil.jdbcNameFromJdbc(jopt) + ") ");
System.out.print("INOUT " + sqlType + " registerOutParameter(" + TestUtil.getNameFromJdbcType(jopt) + ") ");
public static void main(String[] args) throws Exception { isDB2jNet = TestUtil.isNetFramework(); System.out.println("Test parameterMapping starting"); System.out.println("STILL TO RESOLVE -- Cloudscape getBoolean() allow conversion on strings to match JCC"); System.out.println("STILL TO RESOLVE -- Cloudscape getXX...
System.out.print("OUT " + sqlType + " registerOutParameter(" + TestUtil.jdbcNameFromJdbc(jopt) + ") ");
System.out.print("OUT " + sqlType + " registerOutParameter(" + TestUtil.getNameFromJdbcType(jopt) + ") ");
public static void main(String[] args) throws Exception { isDB2jNet = TestUtil.isNetFramework(); System.out.println("Test parameterMapping starting"); System.out.println("STILL TO RESOLVE -- Cloudscape getBoolean() allow conversion on strings to match JCC"); System.out.println("STILL TO RESOLVE -- Cloudscape getXX...
s.execute("DELETE FROM PM.TYPE_AS"); testSetStringInvalidValue(type,psi); } {
private static void setXXX(Statement s, PreparedStatement psi, PreparedStatement psq, int type) throws SQLException, java.io.IOException { boolean executeBatchTests = true; // DERBY-349 - Disable executeBatch on these target types as invald conversions // using setByte() and executeBatch lead to the test hanging....
execCmdDumpResults(SysInfoCmd);
ExecProcUtil.execCmdDumpResults(SysInfoCmd,vCmd,bos);
public static void test (String args[]) throws Exception { if ((System.getProperty("java.vm.name") != null) && System.getProperty("java.vm.name").equals("J9")) jvm = jvm.getJvm("j9_13"); else jvm = jvm.getJvm("currentjvm"); // ensure compatibility vCmd = jvm.getCommandLine(); try { Connection conn1 ...
execCmdDumpResults(SysInfoLocaleCmd);
ExecProcUtil.execCmdDumpResults(SysInfoLocaleCmd,vCmd,bos);
public static void test (String args[]) throws Exception { if ((System.getProperty("java.vm.name") != null) && System.getProperty("java.vm.name").equals("J9")) jvm = jvm.getJvm("j9_13"); else jvm = jvm.getJvm("currentjvm"); // ensure compatibility vCmd = jvm.getCommandLine(); try { Connection conn1 ...
TestOfRepeatedStream.executeTestOfRepeatedStream(con);
public static void main(String[] args) { Connection con; ResultSetMetaData met; ResultSet rs; Statement stmt; System.out.println("Test resultsetStream starting"); try { // use the ij utility to read the property file and // make the initial connection. ij.getPropertyArg(args); con = ij.startJBMS(); st...
return (int) Double.doubleToLongBits(getDouble());
return (int) getLong();
public int hashCode() { if (isNull()) return 0; try { return (int) Double.doubleToLongBits(getDouble()); } catch (StandardException se) { return 0; } }
boolean reuseCorrID, int updateCount, boolean alwaysSend, boolean sendWarn)
int updateCount, boolean alwaysSend, boolean sendWarn)
private void checkWarning(Connection conn, Statement stmt, ResultSet rs, boolean reuseCorrID, int updateCount, boolean alwaysSend, boolean sendWarn) throws DRDAProtocolException, SQLException { // instead of writing a chain of sql warning, we send the first one, this is // jcc/db2 limitation, see beetle 4629...
writeSQLCARDs(reportWarning, reuseCorrID, updateCount);
writeSQLCARDs(reportWarning, updateCount);
private void checkWarning(Connection conn, Statement stmt, ResultSet rs, boolean reuseCorrID, int updateCount, boolean alwaysSend, boolean sendWarn) throws DRDAProtocolException, SQLException { // instead of writing a chain of sql warning, we send the first one, this is // jcc/db2 limitation, see beetle 4629...
while(reader.isChainedWithSameID() || reader.isChainedWithDiffID()) { correlationID = reader.readDssHeader(); reader.skipDss(); }
skipRemainder(false);
private void errorInChain(SQLException e) throws DRDAProtocolException { if (reader.terminateChainOnErr() && (getExceptionSeverity(e) > CodePoint.SVRCOD_ERROR)) { if (SanityManager.DEBUG) trace("terminating the chain on error..."); while(reader.isChainedWithSameID() || reader.isChainedWithDiffID()) { corre...
send();
finalizeChain();
private boolean exchangeServerAttributes() throws DRDAProtocolException, SQLException { int codePoint; boolean sessionOK = true; correlationID = reader.readDssHeader(); if (SanityManager.DEBUG) { if (correlationID == 0) { SanityManager.THROWASSERT( "Unexpected value for correlationId = " + c...
send();
private boolean exchangeServerAttributes() throws DRDAProtocolException, SQLException { int codePoint; boolean sessionOK = true; correlationID = reader.readDssHeader(); if (SanityManager.DEBUG) { if (correlationID == 0) { SanityManager.THROWASSERT( "Unexpected value for correlationId = " + c...
writeSQLCARD(true,databaseAccessException,
writeSQLCARD(databaseAccessException,
private boolean exchangeServerAttributes() throws DRDAProtocolException, SQLException { int codePoint; boolean sessionOK = true; correlationID = reader.readDssHeader(); if (SanityManager.DEBUG) { if (correlationID == 0) { SanityManager.THROWASSERT( "Unexpected value for correlationId = " + c...
writeSQLCARD(true,databaseAccessException,
writer.endDss(); writeSQLCARD(databaseAccessException,
private boolean exchangeServerAttributes() throws DRDAProtocolException, SQLException { int codePoint; boolean sessionOK = true; correlationID = reader.readDssHeader(); if (SanityManager.DEBUG) { if (correlationID == 0) { SanityManager.THROWASSERT( "Unexpected value for correlationId = " + c...
send();
skipRemainder(false); finalizeChain();
private boolean exchangeServerAttributes() throws DRDAProtocolException, SQLException { int codePoint; boolean sessionOK = true; correlationID = reader.readDssHeader(); if (SanityManager.DEBUG) { if (correlationID == 0) { SanityManager.THROWASSERT( "Unexpected value for correlationId = " + c...
send();
finalizeChain();
private void handleException(Exception e) { String dbname = null; if (database != null) dbname = database.dbName; // protocol error - write error message and close session if (e instanceof DRDAProtocolException) { try { DRDAProtocolException de = (DRDAProtocolException) e; println2Log(dbname,session...
skipRemainder();
skipRemainder(true);
private DRDAStatement parseCNTQRY() throws DRDAProtocolException, SQLException { byte val; String pkgnamcsn = null; boolean gotQryblksz = false; boolean qryrelscr = true; long qryrownbr = 1; boolean qryrfrtbl = false; int nbrrow = 1; int blksize = 0; int maxblkext = -1; long qryinsid; boolean gotQryinsid = ...
checkWarning(null, ps, null, true, -1, true, true);
checkWarning(null, ps, null, -1, true, true);
private void parseEXCSQLSTT() throws DRDAProtocolException,SQLException { int codePoint; String strVal; reader.markCollection(); codePoint = reader.getCodePoint(); boolean outputExpected = false; String pkgnamcsn = null; int numRows = 1; // default value int blkSize = 0; int maxrslcnt = 0; // default value...
boolean reuseCorrID = false;
private void parseEXCSQLSTT() throws DRDAProtocolException,SQLException { int codePoint; String strVal; reader.markCollection(); codePoint = reader.getCodePoint(); boolean outputExpected = false; String pkgnamcsn = null; int numRows = 1; // default value int blkSize = 0; int maxrslcnt = 0; // default value...
reuseCorrID = true; } checkWarning(database.getConnection(), stmt.ps, null, false, updateCount, true, true); } else writer.endDss();
} checkWarning(database.getConnection(), stmt.ps, null, updateCount, true, true); }
private void parseEXCSQLSTT() throws DRDAProtocolException,SQLException { int codePoint; String strVal; reader.markCollection(); codePoint = reader.getCodePoint(); boolean outputExpected = false; String pkgnamcsn = null; int numRows = 1; // default value int blkSize = 0; int maxrslcnt = 0; // default value...
reader.skipDss(); while (reader.isChainedWithSameID() || reader.isChainedWithDiffID()) { correlationID = reader.readDssHeader(); reader.skipDss(); }
skipRemainder(false);
private void parseSQLDTA(DRDAStatement stmt) throws DRDAProtocolException,SQLException { try { parseSQLDTA_work(stmt); } catch (SQLException se) { reader.skipDss(); while (reader.isChainedWithSameID() || reader.isChainedWithDiffID()) { correlationID = reader.readDssHeader(); reader.skipDss();...
checkWarning(null, null, stmt.getResultSet(), true, 0, false, sendWarningsOnCNTQRY); } send();
checkWarning(null, null, stmt.getResultSet(), 0, false, sendWarningsOnCNTQRY); }
private void processCommands() throws DRDAProtocolException { DRDAStatement stmt = null; int updateCount = 0; boolean PRPSQLSTTfailed = false; do { correlationID = reader.readDssHeader(); int codePoint = reader.readLengthAndCodePoint(); switch(codePoint) { case CodePoint.CNTQRY: try{ stmt = pa...
writeSQLCARD(true,e,CodePoint.SVRCOD_ERROR,0,0);
writeSQLCARD(e,CodePoint.SVRCOD_ERROR,0,0);
private void processCommands() throws DRDAProtocolException { DRDAStatement stmt = null; int updateCount = 0; boolean PRPSQLSTTfailed = false; do { correlationID = reader.readDssHeader(); int codePoint = reader.readLengthAndCodePoint(); switch(codePoint) { case CodePoint.CNTQRY: try{ stmt = pa...
writeSQLCARDs(e, false, 0);
writeSQLCARDs(e, 0);
private void processCommands() throws DRDAProtocolException { DRDAStatement stmt = null; int updateCount = 0; boolean PRPSQLSTTfailed = false; do { correlationID = reader.readDssHeader(); int codePoint = reader.readLengthAndCodePoint(); switch(codePoint) { case CodePoint.CNTQRY: try{ stmt = pa...
boolean reuseCorrID = false;
private void processCommands() throws DRDAProtocolException { DRDAStatement stmt = null; int updateCount = 0; boolean PRPSQLSTTfailed = false; do { correlationID = reader.readDssHeader(); int codePoint = reader.readLengthAndCodePoint(); switch(codePoint) { case CodePoint.CNTQRY: try{ stmt = pa...
reuseCorrID = true;
private void processCommands() throws DRDAProtocolException { DRDAStatement stmt = null; int updateCount = 0; boolean PRPSQLSTTfailed = false; do { correlationID = reader.readDssHeader(); int codePoint = reader.readLengthAndCodePoint(); switch(codePoint) { case CodePoint.CNTQRY: try{ stmt = pa...
checkWarning(null, database.getDefaultStatement().getStatement(), null, reuseCorrID, updateCount, true, true);
checkWarning(null, database.getDefaultStatement().getStatement(), null, updateCount, true, true);
private void processCommands() throws DRDAProtocolException { DRDAStatement stmt = null; int updateCount = 0; boolean PRPSQLSTTfailed = false; do { correlationID = reader.readDssHeader(); int codePoint = reader.readLengthAndCodePoint(); switch(codePoint) { case CodePoint.CNTQRY: try{ stmt = pa...
writeSQLCARDs(null,true,0); writer.endDss(); send();
writeSQLCARDs(null,0);
private void processCommands() throws DRDAProtocolException { DRDAStatement stmt = null; int updateCount = 0; boolean PRPSQLSTTfailed = false; do { correlationID = reader.readDssHeader(); int codePoint = reader.readLengthAndCodePoint(); switch(codePoint) { case CodePoint.CNTQRY: try{ stmt = pa...
writeSQLCARD(true, w, CodePoint.SVRCOD_WARNING, 0, 0); writer.endDss(); send(); } catch (SQLException e) { writeSQLCARDs(e,false,0); writer.endDss(); send();
writeSQLCARD(w, CodePoint.SVRCOD_WARNING, 0, 0); } catch (SQLException e) { writeSQLCARDs(e, 0);
private void processCommands() throws DRDAProtocolException { DRDAStatement stmt = null; int updateCount = 0; boolean PRPSQLSTTfailed = false; do { correlationID = reader.readDssHeader(); int codePoint = reader.readLengthAndCodePoint(); switch(codePoint) { case CodePoint.CNTQRY: try{ stmt = pa...
checkWarning(database.getConnection(), null, null, false, 0, true, true);
checkWarning(database.getConnection(), null, null, 0, true, true);
private void processCommands() throws DRDAProtocolException { DRDAStatement stmt = null; int updateCount = 0; boolean PRPSQLSTTfailed = false; do { correlationID = reader.readDssHeader(); int codePoint = reader.readLengthAndCodePoint(); switch(codePoint) { case CodePoint.CNTQRY: try{ stmt = pa...
writeSQLCARDs(e, false, 0, true);
writeSQLCARDs(e, 0, true);
private void processCommands() throws DRDAProtocolException { DRDAStatement stmt = null; int updateCount = 0; boolean PRPSQLSTTfailed = false; do { correlationID = reader.readDssHeader(); int codePoint = reader.readLengthAndCodePoint(); switch(codePoint) { case CodePoint.CNTQRY: try{ stmt = pa...
reader.skipBytes();
private void processCommands() throws DRDAProtocolException { DRDAStatement stmt = null; int updateCount = 0; boolean PRPSQLSTTfailed = false; do { correlationID = reader.readDssHeader(); int codePoint = reader.readLengthAndCodePoint(); switch(codePoint) { case CodePoint.CNTQRY: try{ stmt = pa...
if (reader.isChainedWithSameID()) { correlationID = reader.readDssHeader(); reader.skipDss(); }
skipRemainder(true);
private void processCommands() throws DRDAProtocolException { DRDAStatement stmt = null; int updateCount = 0; boolean PRPSQLSTTfailed = false; do { correlationID = reader.readDssHeader(); int codePoint = reader.readLengthAndCodePoint(); switch(codePoint) { case CodePoint.CNTQRY: try{ stmt = pa...
checkWarning(null, ps, null, true, 0, false, true);
checkWarning(null, ps, null, 0, false, true);
private void processCommands() throws DRDAProtocolException { DRDAStatement stmt = null; int updateCount = 0; boolean PRPSQLSTTfailed = false; do { correlationID = reader.readDssHeader(); int codePoint = reader.readLengthAndCodePoint(); switch(codePoint) { case CodePoint.CNTQRY: try{ stmt = pa...
send();
private void processCommands() throws DRDAProtocolException { DRDAStatement stmt = null; int updateCount = 0; boolean PRPSQLSTTfailed = false; do { correlationID = reader.readDssHeader(); int codePoint = reader.readLengthAndCodePoint(); switch(codePoint) { case CodePoint.CNTQRY: try{ stmt = pa...
checkWarning(database.getConnection(), null, null, true, 0, true, true);
checkWarning(database.getConnection(), null, null, 0, true, true);
private void processCommands() throws DRDAProtocolException { DRDAStatement stmt = null; int updateCount = 0; boolean PRPSQLSTTfailed = false; do { correlationID = reader.readDssHeader(); int codePoint = reader.readLengthAndCodePoint(); switch(codePoint) { case CodePoint.CNTQRY: try{ stmt = pa...
writeSQLCARDs(e, true, 0);
writeSQLCARDs(e, 0);
private void processCommands() throws DRDAProtocolException { DRDAStatement stmt = null; int updateCount = 0; boolean PRPSQLSTTfailed = false; do { correlationID = reader.readDssHeader(); int codePoint = reader.readLengthAndCodePoint(); switch(codePoint) { case CodePoint.CNTQRY: try{ stmt = pa...
writeSQLCARDs(null, false, 0); } catch (SQLException e) { writeSQLCARDs(e, false, 0);
writeSQLCARDs(null, 0); } catch (SQLException e) { writeSQLCARDs(e, 0);
private void processCommands() throws DRDAProtocolException { DRDAStatement stmt = null; int updateCount = 0; boolean PRPSQLSTTfailed = false; do { correlationID = reader.readDssHeader(); int codePoint = reader.readLengthAndCodePoint(); switch(codePoint) { case CodePoint.CNTQRY: try{ stmt = pa...
writeSQLCARDs(null, false, 0);
writeSQLCARDs(null, 0);
private void processCommands() throws DRDAProtocolException { DRDAStatement stmt = null; int updateCount = 0; boolean PRPSQLSTTfailed = false; do { correlationID = reader.readDssHeader(); int codePoint = reader.readLengthAndCodePoint(); switch(codePoint) { case CodePoint.CNTQRY: try{ stmt = pa...
while(reader.isChainedWithSameID()) { correlationID = reader.readDssHeader(); reader.skipDss(); } writeSQLCARDs(null, false, 0);
skipRemainder(true); writeSQLCARDs(null, 0);
private void processCommands() throws DRDAProtocolException { DRDAStatement stmt = null; int updateCount = 0; boolean PRPSQLSTTfailed = false; do { correlationID = reader.readDssHeader(); int codePoint = reader.readLengthAndCodePoint(); switch(codePoint) { case CodePoint.CNTQRY: try{ stmt = pa...
send();
finalizeChain();
private void sendUnexpectedException(Exception e) { DRDAProtocolException unExpDe; String dbname = null; try { if (database != null) dbname = database.dbName; println2Log(dbname,session.drdaID, e.getMessage()); server.consoleExceptionPrintTrace(e); unExpDe = DRDAProtocolException.newAgentError(this, ...
private void skipRemainder() throws DRDAProtocolException
private void skipRemainder(boolean onlySkipSameIds) throws DRDAProtocolException
private void skipRemainder() throws DRDAProtocolException { reader.skipDss(); while (reader.isChainedWithSameID()) { reader.readDssHeader(); reader.skipDss(); } }
while (reader.isChainedWithSameID())
while (reader.isChainedWithSameID() || (!onlySkipSameIds && reader.isChainedWithDiffID()))
private void skipRemainder() throws DRDAProtocolException { reader.skipDss(); while (reader.isChainedWithSameID()) { reader.readDssHeader(); reader.skipDss(); } }
send();
finalizeChain();
private void splitQRYDTA(DRDAStatement stmt, int blksize) throws SQLException, DRDAProtocolException { // make copy of extra data byte [] temp = writer.copyDataToEnd(blksize); // truncate to end of blocksize writer.setOffset(blksize); int remain = temp.length; int start = 0; int dataLen = blksize - 10; //DSS...
send();
finalizeChain();
private void writeACCRDBRM(int svrcod) throws DRDAProtocolException { writer.createDssReply(); writer.startDdm(CodePoint.ACCRDBRM); writer.writeScalar2Bytes(CodePoint.SVRCOD, svrcod); writer.writeScalarString(CodePoint.PRDID, server.prdId); //TYPDEFNAM -required - JCC doesn't support QTDSQLJVM so for now we // j...
if (! (reader.isChainedWithSameID() || reader.isChainedWithDiffID())) send();
if (securityCheckCode != 0) { skipRemainder(false); } finalizeChain();
private void writeACCSECRD(int securityCheckCode) throws DRDAProtocolException { writer.createDssReply(); writer.startDdm(CodePoint.ACCSECRD); if (securityCheckCode != CodePoint.SECCHKCD_NOTSUPPORTED) writer.writeScalar2Bytes(CodePoint.SECMEC, database.securityMechanism); else { // these are the ones we kn...
writer.writeScalarStream (chainFlag, chainedWithSameCorrelator,
writer.writeScalarStream (chainedWithSameCorrelator,
void writeEXTDTA (DRDAStatement stmt) throws SQLException, DRDAProtocolException { ArrayList extdtaValues = stmt.getExtDtaObjects(); // build the EXTDTA data, if necessary if (extdtaValues == null) return; boolean chainFlag, chainedWithSameCorrelator; boolean writeNullByte = false; for (int i = 0; i < extd...
writer.endDdm();
writer.endDdmAndDss();
private void writeQRYDTA (DRDAStatement stmt) throws DRDAProtocolException, SQLException { boolean getMoreData = true; boolean sentExtData = false; int startOffset = writer.getOffset(); writer.createDssObject(); if (SanityManager.DEBUG) trace("Write QRYDTA"); writer.startDdm(CodePoint.QRYDTA); while(getM...
writer.endDdmAndDss ();
if (securityCheckCode != 0) { skipRemainder(false); } finalizeChain();
private void writeSECCHKRM(int securityCheckCode) throws DRDAProtocolException { writer.createDssReply(); writer.startDdm(CodePoint.SECCHKRM); writer.writeScalar2Bytes(CodePoint.SVRCOD, svrcodFromSecchkcd(securityCheckCode)); writer.writeScalar1Byte(CodePoint.SECCHKCD, securityCheckCode); writer.endDdmAndDss (...
private void writeSQLCARD(boolean reuseCorrID, SQLException e,int severity,
private void writeSQLCARD(SQLException e,int severity,
private void writeSQLCARD(boolean reuseCorrID, SQLException e,int severity, int updateCount, long rowCount ) throws DRDAProtocolException { writer.createDssObject(reuseCorrID); writer.startDdm(CodePoint.SQLCARD); writeSQLCAGRP(e, getSqlCode(severity), updateCount, rowCount); writer.endDdmAndDss(); // If we have...