rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
return addTagValue(tag, val, true);
StringBuffer value; if (val!=null && val.length()>0) { value = new StringBuffer("<"); value.append(tag); value.append(">"); for (int i=0;i<val.length();i++) { char c = val.charAt(i); switch(c) { case '&' : value.append("&amp;"); break; case '\'' : value.append("&apos;"); break; case '<' : value.append("&lt;"); brea...
public static final String addTagValue(String tag, String val) { return addTagValue(tag, val, true); }
public RepositoryDirectory findDirectory(long id_directory) { if (getID()==id_directory) return this; for (int i=0;i<getNrSubdirectories();i++)
public RepositoryDirectory findDirectory(String path[]) { if (isRoot() && path.length==1 && path[0].equalsIgnoreCase(DIRECTORY_SEPARATOR)) { return this; } String[] directoryPath; if (path.length>0 && path[0].equalsIgnoreCase(DIRECTORY_SEPARATOR)) { directoryPath = new String[path.length-1]; for (int x=0;x<directo...
public RepositoryDirectory findDirectory(long id_directory) { if (getID()==id_directory) return this; for (int i=0;i<getNrSubdirectories();i++) { RepositoryDirectory rd = getSubdirectory(i).findDirectory(id_directory); if (rd!=null) return rd; } return null; }
RepositoryDirectory rd = getSubdirectory(i).findDirectory(id_directory); if (rd!=null) return rd;
return this;
public RepositoryDirectory findDirectory(long id_directory) { if (getID()==id_directory) return this; for (int i=0;i<getNrSubdirectories();i++) { RepositoryDirectory rd = getSubdirectory(i).findDirectory(id_directory); if (rd!=null) return rd; } return null; }
else if (directoryPath.length==1 && directoryPath[0].equalsIgnoreCase(getDirectoryName())) { return this; } else if (directoryPath.length>=1) { for (int i=0;i<getNrSubdirectories();i++) { RepositoryDirectory subdir = getSubdirectory(i); if (subdir.getDirectoryName().equalsIgnoreCase(directoryPath[0])) { if (directory...
public RepositoryDirectory findDirectory(long id_directory) { if (getID()==id_directory) return this; for (int i=0;i<getNrSubdirectories();i++) { RepositoryDirectory rd = getSubdirectory(i).findDirectory(id_directory); if (rd!=null) return rd; } return null; }
public PartitionSchema(String name, String[] partitionIDs)
public PartitionSchema()
public PartitionSchema(String name, String[] partitionIDs) { this.name = name; this.partitionIDs = partitionIDs; }
this.name = name; this.partitionIDs = partitionIDs;
partitionIDs=new String[] {};
public PartitionSchema(String name, String[] partitionIDs) { this.name = name; this.partitionIDs = partitionIDs; }
boolean skipChildren(Visitable node);
boolean skipChildren(Visitable node) throws StandardException;
boolean skipChildren(Visitable node);
if (offset != 0) {
if (doesRequestContainData()) {
protected void finalizeChain(byte currChainByte, OutputStream socketOutputStream) throws DRDAProtocolException { // Go back to previous DSS and override the default // chain state (WITH_SAME_ID) with whatever the last // request dictates. if (prevHdrLocation != -1) { // Note: == -1 => the previous DSS was alread...
abstract int convertFromUCS2 (String sourceString, byte[] buffer, int offset);
abstract byte[] convertFromUCS2 (String sourceString);
abstract int convertFromUCS2 (String sourceString, byte[] buffer, int offset);
Logs.reportMessage("CSLOOK_Header", "jars");
Logs.reportMessage("CSLOOK_JarsHeader");
public static void doJars(String dbName, Connection conn) throws SQLException { String separator = System.getProperty("file.separator"); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT FILENAME, SCHEMAID, " + "GENERATIONID FROM SYS.SYSFILES"); boolean firstTime = true; while (...
t_isValid();
t_isValid_Client();
public void startTestConnectionMethods_Client() { t_createClob_Client(); t_createBlob_Client(); t_createNClob(); t_createSQLXML(); t_isValid(); t_setClientInfo1(); t_setClientInfo2(); t_getClientInfo1(); t_getClientInfo2(); }
t_isValid();
t_isValid_Embed();
public void startTestConnectionMethods_Embedded() { t_createClob(); t_createBlob(); t_createNClob(); t_createSQLXML(); t_isValid(); t_setClientInfo1(); t_setClientInfo2(); t_getClientInfo1(); t_getClientInfo2(); }
this.ra = ra;
xaRes = new EmbedXAResource (this, ra);
EmbedXAConnection(EmbeddedDataSource ds, ResourceAdapter ra, String u, String p, boolean requestPassword) throws SQLException { super(ds, u, p, requestPassword); this.ra = ra; }
public final Connection getConnection(String username, String password) throws SQLException
public final Connection getConnection() throws SQLException
public final Connection getConnection(String username, String password) throws SQLException { return this.getConnection(username, password, true); }
return this.getConnection(username, password, true);
return this.getConnection(getUser(), getPassword(), false);
public final Connection getConnection(String username, String password) throws SQLException { return this.getConnection(username, password, true); }
getCompilerContext().pushCurrentPrivType( getPrivType()); getCompilerContext().addRequiredTablePriv( targetTableDescriptor); getCompilerContext().popCurrentPrivType();
if (isPrivilegeCollectionRequired()) { getCompilerContext().pushCurrentPrivType( getPrivType()); getCompilerContext().addRequiredTablePriv( targetTableDescriptor); getCompilerContext().popCurrentPrivType(); }
public QueryTreeNode bind() throws StandardException { // We just need select privilege on the where clause tables getCompilerContext().pushCurrentPrivType( Authorizer.SELECT_PRIV); try { FromList fromList = (FromList) getNodeFactory().getNode( C_NodeTypes.FROM_LIST, getNodeFactory().doJoinOrderO...
public void init(Object resultSet, Object statementType)
public void init(Object resultSet)
public void init(Object resultSet, Object statementType) { super.init(resultSet); this.statementType = ((Integer) statementType).intValue(); }
this.statementType = ((Integer) statementType).intValue();
statementType = getStatementType();
public void init(Object resultSet, Object statementType) { super.init(resultSet); this.statementType = ((Integer) statementType).intValue(); }
public SQLBoolean(boolean val)
public SQLBoolean()
public SQLBoolean(boolean val) { value = val; }
value = val;
isnull = true;
public SQLBoolean(boolean val) { value = val; }
return serializeToString(aList);
return serializeToString(aList, null);
protected String serializeToString(String xmlAsText) throws Exception { ArrayList aList = new ArrayList(); aList.add(dBuilder.parse( new InputSource(new StringReader(xmlAsText)))); return serializeToString(aList); }
if (len > 4096) {
if (len > RETURN_SPACE_THRESHOLD) {
public String getString() throws StandardException { if (value == null) { int len = rawLength; if (len != -1) { // data is stored in the char[] array value = new String(rawData, 0, len); if (len > 4096) { // free up this char[] array to reduce memory usage rawData = null; rawLength = -1; ...
if (requiredLength < 64) requiredLength = 64;
if (requiredLength < minGrowBy) requiredLength = minGrowBy;
public void readExternal(ObjectInput in) throws IOException { // if in.available() blocked at 0, use this default string size int utflen = in.readUnsignedShort(); int requiredLength; if (utflen != 0) { // the object was not stored as a streaming column // w...
if (growby < 64) growby = 64;
if (growby < minGrowBy) growby = minGrowBy;
public void readExternal(ObjectInput in) throws IOException { // if in.available() blocked at 0, use this default string size int utflen = in.readUnsignedShort(); int requiredLength; if (utflen != 0) { // the object was not stored as a streaming column // w...
public synchronized long getStepAttributeInteger(long id_step, String code) throws KettleDatabaseException
public synchronized long getStepAttributeInteger(long id_step, int nr, String code) throws KettleDatabaseException
public synchronized long getStepAttributeInteger(long id_step, String code) throws KettleDatabaseException { return getStepAttributeInteger(id_step, 0, code); }
return getStepAttributeInteger(id_step, 0, code);
Row r = null; if (stepAttributesBuffer!=null) r = searchStepAttributeInBuffer(id_step, code, (long)nr); else r = getStepAttributeRow(id_step, nr, code); if (r == null) return 0; return r.searchValue("VALUE_NUM").getInteger();
public synchronized long getStepAttributeInteger(long id_step, String code) throws KettleDatabaseException { return getStepAttributeInteger(id_step, 0, code); }
public synchronized String getStepAttributeString(long id_step, String code) throws KettleDatabaseException
public synchronized String getStepAttributeString(long id_step, int nr, String code) throws KettleDatabaseException
public synchronized String getStepAttributeString(long id_step, String code) throws KettleDatabaseException { return getStepAttributeString(id_step, 0, code); }
return getStepAttributeString(id_step, 0, code);
Row r = null; if (stepAttributesBuffer!=null) r = searchStepAttributeInBuffer(id_step, code, (long)nr); else r = getStepAttributeRow(id_step, nr, code); if (r == null) return null; return r.searchValue("VALUE_STR").getString();
public synchronized String getStepAttributeString(long id_step, String code) throws KettleDatabaseException { return getStepAttributeString(id_step, 0, code); }
return getStepAttributeBoolean(id_step, 0, code);
Row r = null; if (stepAttributesBuffer!=null) r = searchStepAttributeInBuffer(id_step, code, (long)nr); else r = getStepAttributeRow(id_step, nr, code); if (r == null) return def; Value v = r.searchValue("VALUE_STR"); if (v==null || Const.isEmpty(v.getString())) return def; return v.getBoole...
public boolean getStepAttributeBoolean(long id_step, String code) throws KettleDatabaseException { return getStepAttributeBoolean(id_step, 0, code); }
TruncationPoint[] tpoints = null; synchronized(this) { if (truncPoints != null) { int numTpoints = truncPoints.size(); tpoints = new TruncationPoint[numTpoints]; TruncationPoint t; for (int i = 0; i < numTpoints; i++) { t = (TruncationPoint)truncPoints.elementAt(i); tpoints[i] = new TruncationPoint(t.getName(), t.ge...
protected boolean checkpointWithTran(RawTransaction cptran, RawStoreFactory rsf, DataFactory df, TransactionFactory tf) throws StandardException { boolean proceed = true; LogInstant redoLWM; // we may be called to stop the database after a bad error, make sure // logout is set if (lo...
redoLWM_long, undoLWM_long, tpoints, transactionTable);
redoLWM_long, undoLWM_long, transactionTable);
protected boolean checkpointWithTran(RawTransaction cptran, RawStoreFactory rsf, DataFactory df, TransactionFactory tf) throws StandardException { boolean proceed = true; LogInstant redoLWM; // we may be called to stop the database after a bad error, make sure // logout is set if (lo...
if (movingTruncPt) return -1;
private long getFirstLogNeeded(CheckpointOperation checkpoint){ long firstLogNeeded; // one truncation at a time synchronized (this) { if (movingTruncPt) // don't truncate the log while someone is mucking return -1; // with truncation LWMs firstLogNeeded = LogCounter.getLogFileNumber(checkpoint.undoLWM())...
} if (truncPoints != null) { TruncationPoint p; LogCounter logLWM; for (int i = truncPoints.size()-1; i >=0; i--) { p = (TruncationPoint)truncPoints.elementAt(i); logLWM = (LogCounter)(p.getLogInstant()); if (firstLogNeeded > logLWM.getLogFileNumber()) firstLogNeeded = logLWM.getLogFileNumber(); } } if (SanityManager...
private long getFirstLogNeeded(CheckpointOperation checkpoint){ long firstLogNeeded; // one truncation at a time synchronized (this) { if (movingTruncPt) // don't truncate the log while someone is mucking return -1; // with truncation LWMs firstLogNeeded = LogCounter.getLogFileNumber(checkpoint.undoLWM())...
TruncationPoint[] tpoints = currentCheckpoint.truncationLWM(); if (tpoints != null) { LogInstant earliestLWM = restoreTruncationLWMs(tpoints); if (earliestLWM != null) { if (((LogCounter)earliestLWM).getLogFileNumber() < firstLogFileNumber) { firstLogFileNumber = ((LogCounter)earliestLWM).getLogFileNumber(); } } }
public void recover( RawStoreFactory rsf, DataFactory df, TransactionFactory tf) throws StandardException { if (SanityManager.DEBUG) { SanityManager.ASSERT(rsf != null, "raw store factory == null"); SanityManager.ASSERT(df != null, "data factory == null"); } checkCorrupt(); rawStore...
public static void logTextMessage(String messageID, Object a1) { getStream().println(MessageService.getTextMessage(messageID, a1));
public static void logTextMessage(String messageID) { getStream().println(MessageService.getTextMessage(messageID));
public static void logTextMessage(String messageID, Object a1) { getStream().println(MessageService.getTextMessage(messageID, a1)); }
public long getLogFilePosition()
static public final long getLogFilePosition(long valueAsLong)
public long getLogFilePosition() { return filePosition; }
return filePosition;
return valueAsLong & FILE_POSITION_MASK;
public long getLogFilePosition() { return filePosition; }
SQLState.LOG_FULL, sfe, null);
SQLState.LOG_FULL, sfe);
public void syncLogAccessFile() throws IOException, StandardException { for( int i=0; ; ) { // 3311: JVM sync call sometimes fails under high load against NFS // mounted disk. We re-try to do this 20 times. try { synchronized( thi...
public void writeInt(int i) { if (SanityManager.DEBUG) { SanityManager.ASSERT(currentBuffer.bytes_free >= 4); } currentBuffer.position = writeInt(i , currentBuffer.buffer, currentBuffer.position); currentBuffer.bytes_free -= 4;
private final int writeInt(int i , byte b[], int p) { b[p++] = (byte) ((i >>> 24) & 0xff); b[p++] = (byte) ((i >>> 16) & 0xff); b[p++] = (byte) ((i >>> 8) & 0xff); b[p++] = (byte) (i & 0xff); return p;
public void writeInt(int i) { if (SanityManager.DEBUG) { SanityManager.ASSERT(currentBuffer.bytes_free >= 4); } currentBuffer.position = writeInt(i , currentBuffer.buffer, currentBuffer.position); currentBuffer.bytes_free -= 4; }
public void writeLong(long l) { if (SanityManager.DEBUG) { SanityManager.ASSERT(currentBuffer.bytes_free >= 8); } currentBuffer.position = writeLong(l , currentBuffer.buffer, currentBuffer.position); currentBuffer.bytes_free -= 8; }
private final int writeLong(long l , byte b[], int p) { b[p++] = (byte) (((int)(l >>> 56)) & 0xff); b[p++] = (byte) (((int)(l >>> 48)) & 0xff); b[p++] = (byte) (((int)(l >>> 40)) & 0xff); b[p++] = (byte) (((int)(l >>> 32)) & 0xff); b[p++] = (byte) (((int)(l >>> 24)) & 0xff); b[p++] = (byte) (((int)(l >>> 16)) & 0xff); ...
public void writeLong(long l) { if (SanityManager.DEBUG) { SanityManager.ASSERT(currentBuffer.bytes_free >= 8); } currentBuffer.position = writeLong(l , currentBuffer.buffer, currentBuffer.position); currentBuffer.bytes_free -= 8; }
if (truncationLWM != null) { LogCounter logLWM; for (int i = truncationLWM.length-1; i >= 0; i--) { logLWM = (LogCounter)(truncationLWM[i].getLogInstant()); str.append(" truncation point ").append(i) .append(" ").append(logLWM.toString()); } }
public String toString() { if (SanityManager.DEBUG) { LogCounter undolwm = new LogCounter(undoLWM); LogCounter redolwm = new LogCounter(redoLWM); StringBuffer str = new StringBuffer(1000) .append("Checkpoint : \tredoLWM ") .append(redolwm.toString()) .append("\n\t\tundoLWM ").append(undolwm.toString()...
public RepositoriesDialog(Display disp, int style, int perm[], String toolName) { display = disp; toolsPermissions = perm; steploader = StepLoader.getInstance(); this.toolName = toolName; shell = new Shell(disp, SWT.DIALOG_TRIM | SWT.MAX | SWT.MIN | SWT.RESIZE ); shell.setText(Messages.getString("RepositoriesDialog.Di...
public RepositoriesDialog(Display disp, int style, LogWriter l, Props pr, int perm[], String toolName) { this(disp, style, perm, toolName); }
public RepositoriesDialog(Display disp, int style, int perm[], String toolName) { display = disp; toolsPermissions = perm; steploader = StepLoader.getInstance(); this.toolName = toolName; shell = new Shell(disp, SWT.DIALOG_TRIM | SWT.MAX | SWT.MIN | SWT.RESIZE ); shell.setText(Messages.getString("RepositoriesD...
public DatabaseExplorerDialog(Shell par, Props pr, int style, DatabaseMeta conn, ArrayList databases, boolean look)
public DatabaseExplorerDialog(Shell par, Props pr, int style, DatabaseMeta conn, ArrayList databases)
public DatabaseExplorerDialog(Shell par, Props pr, int style, DatabaseMeta conn, ArrayList databases, boolean look) { this(par, pr, style, conn, databases); justLook=look; }
this(par, pr, style, conn, databases); justLook=look;
super(par, style); props=pr; log=LogWriter.getInstance(); dbMeta=conn; dbcache = DBCache.getInstance(); this.databases = databases; justLook=false; selectTable=null;
public DatabaseExplorerDialog(Shell par, Props pr, int style, DatabaseMeta conn, ArrayList databases, boolean look) { this(par, pr, style, conn, databases); justLook=look; }
public Row getPrevStepFields(StepMeta stepMeta) throws KettleStepException
public Row getPrevStepFields(String stepname) throws KettleStepException
public Row getPrevStepFields(StepMeta stepMeta) throws KettleStepException { return getPrevStepFields(stepMeta, null); }
return getPrevStepFields(stepMeta, null);
return getPrevStepFields(findStep(stepname));
public Row getPrevStepFields(StepMeta stepMeta) throws KettleStepException { return getPrevStepFields(stepMeta, null); }
public static void setExpandedFromMemory(Tree tree)
public static void setExpandedFromMemory(Tree tree, String treeName)
public static void setExpandedFromMemory(Tree tree) { TreeItem[] items = tree.getItems(); for (int i=0;i<items.length;i++) { setExpandedFromMemory(tree, items[i]); } }
setExpandedFromMemory(tree, items[i]);
setExpandedFromMemory(tree, treeName, items[i]);
public static void setExpandedFromMemory(Tree tree) { TreeItem[] items = tree.getItems(); for (int i=0;i<items.length;i++) { setExpandedFromMemory(tree, items[i]); } }
public static BigDecimal getBigDecimal(DataValueDescriptor value) throws StandardException
private BigDecimal getBigDecimal()
public static BigDecimal getBigDecimal(DataValueDescriptor value) throws StandardException { if (SanityManager.DEBUG) { if (value.isNull()) SanityManager.THROWASSERT("NULL value passed to SQLDecimal.getBigDecimal"); } switch (value.typeToBigDecimal()) { case Types.DECIMAL: return (BigDecimal) value.getO...
if (SanityManager.DEBUG)
if ((value == null) && (rawData != null))
public static BigDecimal getBigDecimal(DataValueDescriptor value) throws StandardException { if (SanityManager.DEBUG) { if (value.isNull()) SanityManager.THROWASSERT("NULL value passed to SQLDecimal.getBigDecimal"); } switch (value.typeToBigDecimal()) { case Types.DECIMAL: return (BigDecimal) value.getO...
if (value.isNull()) SanityManager.THROWASSERT("NULL value passed to SQLDecimal.getBigDecimal");
value = new BigDecimal(new BigInteger(rawData), rawScale);
public static BigDecimal getBigDecimal(DataValueDescriptor value) throws StandardException { if (SanityManager.DEBUG) { if (value.isNull()) SanityManager.THROWASSERT("NULL value passed to SQLDecimal.getBigDecimal"); } switch (value.typeToBigDecimal()) { case Types.DECIMAL: return (BigDecimal) value.getO...
switch (value.typeToBigDecimal()) { case Types.DECIMAL: return (BigDecimal) value.getObject(); case Types.CHAR: try { return new BigDecimal(value.getString().trim()); } catch (NumberFormatException nfe) { throw StandardException.newException(SQLState.LANG_FORMAT_EXCEPTION, "java.math.BigDecimal"); } case Types.BIGINT: ...
return value;
public static BigDecimal getBigDecimal(DataValueDescriptor value) throws StandardException { if (SanityManager.DEBUG) { if (value.isNull()) SanityManager.THROWASSERT("NULL value passed to SQLDecimal.getBigDecimal"); } switch (value.typeToBigDecimal()) { case Types.DECIMAL: return (BigDecimal) value.getO...
protected ControlRow( OpenBTree btree, Page page, int level, ControlRow parent, boolean isRoot ) throws StandardException { if (SanityManager.DEBUG) { SanityManager.ASSERT(page.isLatched()); SanityManager.ASSERT(parent == null || parent.page.isLatched()); }
protected ControlRow() { this.scratch_row = new DataValueDescriptor[getNumberOfControlRowColumns()];
protected ControlRow( OpenBTree btree, Page page, int level, ControlRow parent, boolean isRoot ) throws StandardException { // The caller is expected to have latched the pages. if (SanityManager.DEBUG) { SanityManager.ASSERT(pa...
this.page = page; leftSiblingPageNumber = new SQLLongint(btree.container.INVALID_PAGE_NUMBER); rightSiblingPageNumber = new SQLLongint(btree.container.INVALID_PAGE_NUMBER); parentPageNumber = new SQLLongint( (parent == null ? btree.container.INVALID_PAGE_NUMBER : parent.page.getPageNumber())); this.isRoot = n...
this.fetchDesc = new FetchDescriptor( this.scratch_row.length, (FormatableBitSet) null, (Qualifier[][]) null); }
protected ControlRow( OpenBTree btree, Page page, int level, ControlRow parent, boolean isRoot ) throws StandardException { // The caller is expected to have latched the pages. if (SanityManager.DEBUG) { SanityManager.ASSERT(pa...
public void setValue(long theValue)
public void setValue(String theValue) throws StandardException
public void setValue(long theValue) { value = theValue; isnull = false; }
value = theValue; isnull = false;
if (theValue == null) { value = 0; isnull = true; } else { try { value = Long.valueOf(theValue.trim()).longValue(); } catch (NumberFormatException nfe) { throw invalidFormat(); } isnull = false; }
public void setValue(long theValue) { value = theValue; isnull = false; }
LeafControlRow( OpenBTree btree, Page page, ControlRow parent, boolean isRoot) throws StandardException
public LeafControlRow()
LeafControlRow( OpenBTree btree, Page page, ControlRow parent, boolean isRoot) throws StandardException { // All leaf pages are at level 0. super(btree, page, 0, parent, isRoot); }
super(btree, page, 0, parent, isRoot);
LeafControlRow( OpenBTree btree, Page page, ControlRow parent, boolean isRoot) throws StandardException { // All leaf pages are at level 0. super(btree, page, 0, parent, isRoot); }
boolean spaceForInsert( Object[] row, FormatableBitSet validColumns, int overflowThreshold)
boolean spaceForInsert()
boolean spaceForInsert( Object[] row, FormatableBitSet validColumns, int overflowThreshold) throws StandardException;
public static void assertSQLState(String expected, SQLException exception) { assertSQLState("Unexpected SQL state.", expected, exception);
public static void assertSQLState(String message, String expected, SQLException exception) { assertNotNull("Exception cannot be null when asserting on SQLState", exception); try { String state = exception.getSQLState(); if ( state != null ) assertTrue("The exception's SQL state must be five characters long", state....
public static void assertSQLState(String expected, SQLException exception) { assertSQLState("Unexpected SQL state.", expected, exception); }
protected abstract void compactRecord(RawTransaction t, int slot, int recordId) throws StandardException;
public void compactRecord(RecordHandle handle) throws StandardException { if (SanityManager.DEBUG) { SanityManager.ASSERT(isLatched()); } if (!owner.updateOK()) { throw StandardException.newException( SQLState.DATA_CONTAINER_READ_ONLY); } if (handle.getId() < RecordHandle.FIRST_RECORD_ID) { throw StandardException.ne...
protected abstract void compactRecord(RawTransaction t, int slot, int recordId) throws StandardException;
public DynamicByteArrayOutputStream(DynamicByteArrayOutputStream toBeCloned) { byte[] cbuf = toBeCloned.getByteArray(); buf = new byte[cbuf.length]; write(cbuf, 0, cbuf.length); position = toBeCloned.getPosition(); used = toBeCloned.getUsed(); beginPosition = toBeCloned.getBeginPosition();
public DynamicByteArrayOutputStream() { this(INITIAL_SIZE);
public DynamicByteArrayOutputStream(DynamicByteArrayOutputStream toBeCloned) { byte[] cbuf = toBeCloned.getByteArray(); buf = new byte[cbuf.length]; write(cbuf, 0, cbuf.length); position = toBeCloned.getPosition(); used = toBeCloned.getUsed(); beginPosition = toBeCloned.getBeginPosition(); }
public static Object getColumn( Object[] row,
public static DataValueDescriptor getColumn( DataValueDescriptor[] row,
public static Object getColumn( Object[] row, FormatableBitSet columnList, int columnId) { if (columnList == null) return columnId < row.length ? row[columnId] : null; if (!(columnList.getLength() > columnId && columnList.isSet(columnId))) return null; ...
public ReclaimSpace(int reclaim, RecordHandle headRowHandle, DataFactory processor, boolean serviceASAP)
public ReclaimSpace(int reclaim, ContainerKey containerId, DataFactory processor, boolean serviceASAP)
public ReclaimSpace(int reclaim, RecordHandle headRowHandle, DataFactory processor, boolean serviceASAP) { if (SanityManager.DEBUG) SanityManager.ASSERT(reclaim == ROW_RESERVE); initContainerInfo(headRowHandle.getContainerId(), reclaim, processor, serviceASAP); this.headRowHandle = headRowHandle; }
SanityManager.ASSERT(reclaim == ROW_RESERVE); initContainerInfo(headRowHandle.getContainerId(), reclaim, processor, serviceASAP); this.headRowHandle = headRowHandle;
SanityManager.ASSERT(reclaim == CONTAINER); initContainerInfo(containerId, reclaim, processor, serviceASAP);
public ReclaimSpace(int reclaim, RecordHandle headRowHandle, DataFactory processor, boolean serviceASAP) { if (SanityManager.DEBUG) SanityManager.ASSERT(reclaim == ROW_RESERVE); initContainerInfo(headRowHandle.getContainerId(), reclaim, processor, serviceASAP); this.headRowHandle = headRowHandle; }
public static final long readLong(InputStream in) throws IOException {
public static final long readLong(DataInput in) throws IOException {
public static final long readLong(InputStream in) throws IOException { int int_value = InputStreamUtil.readUnsignedByte(in); if ((int_value & ~0x3f) == 0) { // test for small case first - assuming this is usual case. // this is stored in 2 bytes. return((int_value << 8) ...
int int_value = InputStreamUtil.readUnsignedByte(in);
int int_value = in.readUnsignedByte();
public static final long readLong(InputStream in) throws IOException { int int_value = InputStreamUtil.readUnsignedByte(in); if ((int_value & ~0x3f) == 0) { // test for small case first - assuming this is usual case. // this is stored in 2 bytes. return((int_value << 8) ...
return((int_value << 8) | InputStreamUtil.readUnsignedByte(in));
return((int_value << 8) | in.readUnsignedByte());
public static final long readLong(InputStream in) throws IOException { int int_value = InputStreamUtil.readUnsignedByte(in); if ((int_value & ~0x3f) == 0) { // test for small case first - assuming this is usual case. // this is stored in 2 bytes. return((int_value << 8) ...
((int_value & 0x3f) << 24) | (InputStreamUtil.readUnsignedByte(in) << 16) | (InputStreamUtil.readUnsignedByte(in) << 8) | (InputStreamUtil.readUnsignedByte(in) ));
((int_value & 0x3f) << 24) | (in.readUnsignedByte() << 16) | (in.readUnsignedByte() << 8) | (in.readUnsignedByte()));
public static final long readLong(InputStream in) throws IOException { int int_value = InputStreamUtil.readUnsignedByte(in); if ((int_value & ~0x3f) == 0) { // test for small case first - assuming this is usual case. // this is stored in 2 bytes. return((int_value << 8) ...
long value = int_value;
public static final long readLong(InputStream in) throws IOException { int int_value = InputStreamUtil.readUnsignedByte(in); if ((int_value & ~0x3f) == 0) { // test for small case first - assuming this is usual case. // this is stored in 2 bytes. return((int_value << 8) ...
(((long) (value & 0x7f) ) << 56) | (((long) InputStreamUtil.readUnsignedByte(in)) << 48) | (((long) InputStreamUtil.readUnsignedByte(in)) << 40) | (((long) InputStreamUtil.readUnsignedByte(in)) << 32) | (((long) InputStreamUtil.readUnsignedByte(in)) << 24) | (((long) InputStreamUtil.readUnsignedByt...
(((long) (int_value & 0x7f) ) << 56) | (((long) in.readUnsignedByte()) << 48) | (((long) in.readUnsignedByte()) << 40) | (((long) in.readUnsignedByte()) << 32) | (((long) in.readUnsignedByte()) << 24) | (((long) in.readUnsignedByte()) << 16) | (((long) in.readUnsignedByte()) << 8) | (((long) in.readUnsignedByte()) ...
public static final long readLong(InputStream in) throws IOException { int int_value = InputStreamUtil.readUnsignedByte(in); if ((int_value & ~0x3f) == 0) { // test for small case first - assuming this is usual case. // this is stored in 2 bytes. return((int_value << 8) ...
public static final int readInt(InputStream in) throws IOException {
public static final int readInt(DataInput in) throws IOException {
public static final int readInt(InputStream in) throws IOException { int value = InputStreamUtil.readUnsignedByte(in); if ((value & ~0x3f) == 0) { return(value); } else if ((value & 0x80) == 0) { return( ((value & 0x3f) << 8) | InputStreamUtil.readUnsignedBy...
int value = InputStreamUtil.readUnsignedByte(in);
int value = in.readUnsignedByte();
public static final int readInt(InputStream in) throws IOException { int value = InputStreamUtil.readUnsignedByte(in); if ((value & ~0x3f) == 0) { return(value); } else if ((value & 0x80) == 0) { return( ((value & 0x3f) << 8) | InputStreamUtil.readUnsignedBy...
return( ((value & 0x3f) << 8) | InputStreamUtil.readUnsignedByte(in));
if (SanityManager.DEBUG) { SanityManager.ASSERT((value & 0x40) == 0x40); } return(((value & 0x3f) << 8) | in.readUnsignedByte());
public static final int readInt(InputStream in) throws IOException { int value = InputStreamUtil.readUnsignedByte(in); if ((value & ~0x3f) == 0) { return(value); } else if ((value & 0x80) == 0) { return( ((value & 0x3f) << 8) | InputStreamUtil.readUnsignedBy...
{
{ if (SanityManager.DEBUG) { SanityManager.ASSERT((value & 0x80) == 0x80); }
public static final int readInt(InputStream in) throws IOException { int value = InputStreamUtil.readUnsignedByte(in); if ((value & ~0x3f) == 0) { return(value); } else if ((value & 0x80) == 0) { return( ((value & 0x3f) << 8) | InputStreamUtil.readUnsignedBy...
((value & 0x7f) << 24) | (InputStreamUtil.readUnsignedByte(in) << 16) | (InputStreamUtil.readUnsignedByte(in) << 8) | (InputStreamUtil.readUnsignedByte(in) )); }
((value & 0x7f) << 24) | (in.readUnsignedByte() << 16) | (in.readUnsignedByte() << 8) | (in.readUnsignedByte() )); }
public static final int readInt(InputStream in) throws IOException { int value = InputStreamUtil.readUnsignedByte(in); if ((value & ~0x3f) == 0) { return(value); } else if ((value & 0x80) == 0) { return( ((value & 0x3f) << 8) | InputStreamUtil.readUnsignedBy...
public abstract void initPage(LogInstant instant, byte status, int recordId, boolean overflow, boolean reuse) throws StandardException;
public void initPage(int initFlag, long pageOffset) throws StandardException { if (SanityManager.DEBUG) { SanityManager.ASSERT(isLatched()); } if (!owner.updateOK()) { throw StandardException.newException( SQLState.DATA_CONTAINER_READ_ONLY); } RawTransaction t = owner.getTransaction(); owner.getActionSet().actionIni...
public abstract void initPage(LogInstant instant, byte status, int recordId, boolean overflow, boolean reuse) throws StandardException;
public final void setLimit(int length) throws IOException {
public int setLimit(int offset, int length) throws IOException {
public final void setLimit(int length) throws IOException { start = position; end = position + length; if (end <= pageData.length) { return; } else { start = end = position = 0; throw new EOFException(); } }
start = position; end = position + length; if (end <= pageData.length) { return; } else {
if ((offset < 0) || (length < 0)) {
public final void setLimit(int length) throws IOException { start = position; end = position + length; if (end <= pageData.length) { return; } else { start = end = position = 0; throw new EOFException(); } }
}
} start = offset; end = offset + length; if (end > pageData.length) { start = end = position = 0; throw new EOFException(); } position = start; return length;
public final void setLimit(int length) throws IOException { start = position; end = position + length; if (end <= pageData.length) { return; } else { start = end = position = 0; throw new EOFException(); } }
public long write(InputStream in, long count)
public void write(int b)
public long write(InputStream in, long count) throws IOException;
public abstract void setDeleteStatus(LogInstant instant, int slot, boolean delete) throws StandardException, IOException;
public int setDeleteStatus(int slot, boolean delete) throws StandardException, IOException { if (SanityManager.DEBUG) { checkSlotOnPage(slot);; } return (getHeaderAtSlot(slot).setDeleted(delete)); }
public abstract void setDeleteStatus(LogInstant instant, int slot, boolean delete) throws StandardException, IOException;
protected abstract void writePage(PageKey id) throws StandardException;
private void writePage(PageKey identity, boolean syncMe) throws StandardException { writeFormatId(identity); writePage(identity); LogInstant flushLogTo = getLastLogInstant(); dataFactory.flush(flushLogTo); if (flushLogTo != null) { clearLastLogInstant(); } FileContainer myContainer = (FileContainer) contain...
protected abstract void writePage(PageKey id) throws StandardException;
return suite;
return TestConfiguration.sqlAuthorizationDecorator(suite);
public static Test suite() { TestSuite suite = new TestSuite("PrepareExecuteDDL"); for (int i = 0; i < DDL.length; i++) suite.addTest(new PrepareExecuteDDL("testPrepareExcute", DDL[i])); return suite; }
public IndexColumnOrder(int colNum, boolean ascending) { this.colNum = colNum; this.ascending = ascending;
public IndexColumnOrder() {
public IndexColumnOrder(int colNum, boolean ascending) { this.colNum = colNum; this.ascending = ascending; }
if (!refTableName.equals(ddlNode.getObjectName())) {
if (refTableName.equals(ddlNode.getObjectName())) return;
protected void bind(DDLStatementNode ddlNode, DataDictionary dd) throws StandardException { super.bind(ddlNode, dd); refTableSd = getSchemaDescriptor(refTableName.getSchemaName()); if (refTableSd.isSystemSchema()) { throw StandardException.newException(SQLState.LANG_NO_FK_ON_SYSTEM_SCHEMA); } // check the refe...
if (getTableDescriptor(refTableName.getTableName(), refTableSd) == null) throw StandardException.newException(SQLState.LANG_INVALID_FK_NO_REF_TAB,
TableDescriptor td = getTableDescriptor(refTableName.getTableName(), refTableSd); if (td == null) throw StandardException.newException(SQLState.LANG_INVALID_FK_NO_REF_TAB,
protected void bind(DDLStatementNode ddlNode, DataDictionary dd) throws StandardException { super.bind(ddlNode, dd); refTableSd = getSchemaDescriptor(refTableName.getSchemaName()); if (refTableSd.isSystemSchema()) { throw StandardException.newException(SQLState.LANG_NO_FK_ON_SYSTEM_SCHEMA); } // check the refe...
ddlNode.getTableDescriptor(refTableName);
getCompilerContext().pushCurrentPrivType(getPrivType()); if (refRcl.size()==0 && (td.getPrimaryKey() != null)) { int[] refCols = td.getPrimaryKey().getReferencedColumns(); for (int i=0; i<refCols.length; i++) { ColumnDescriptor cd = td.getColumnDescriptor(refCols[i]); cd.setTableDescriptor(td); getCompilerContext(...
protected void bind(DDLStatementNode ddlNode, DataDictionary dd) throws StandardException { super.bind(ddlNode, dd); refTableSd = getSchemaDescriptor(refTableName.getSchemaName()); if (refTableSd.isSystemSchema()) { throw StandardException.newException(SQLState.LANG_NO_FK_ON_SYSTEM_SCHEMA); } // check the refe...
else { for (int i=0; i<refRcl.size(); i++) { ResultColumn rc = (ResultColumn) refRcl.elementAt(i); ColumnDescriptor cd = td.getColumnDescriptor(rc.getName()); if (cd != null) { cd.setTableDescriptor(td); getCompilerContext().addRequiredColumnPriv(cd); } } } getCompilerContext().popCurrentPrivType();
protected void bind(DDLStatementNode ddlNode, DataDictionary dd) throws StandardException { super.bind(ddlNode, dd); refTableSd = getSchemaDescriptor(refTableName.getSchemaName()); if (refTableSd.isSystemSchema()) { throw StandardException.newException(SQLState.LANG_NO_FK_ON_SYSTEM_SCHEMA); } // check the refe...
public ConstraintInfo( String tableName, SchemaDescriptor tableSd, String[] columnNames, int raDeleteRule, int raUpdateRule ) { this.tableName = tableName; this.tableSd = tableSd; this.columnNames = columnNames; this.raDeleteRule = raDeleteRule; this.raUpdateRule = raUpdateRule; }
public ConstraintInfo() {}
public ConstraintInfo( String tableName, SchemaDescriptor tableSd, String[] columnNames, int raDeleteRule, int raUpdateRule ) { this.tableName = tableName; this.tableSd = tableSd; this.columnNames = columnNames; this.raDeleteRule = raDeleteRu...
Object constraintText)
Object constraintText, Object behavior)
public void init( Object constraintName, Object constraintType, Object rcl, Object properties, Object checkCondition, Object constraintText) { init( constraintName, constraintType, rcl, properties, checkCondition, constraintText, ReuseFactory.getInteger(StatementTy...
init( constraintName, constraintType, rcl, properties, checkCondition, constraintText, ReuseFactory.getInteger(StatementType.DROP_DEFAULT) );
this.constraintName = (TableName) constraintName; super.init(null); if (this.constraintName != null) { this.name = this.constraintName.getTableName(); } this.constraintType = ((Integer) constraintType).intValue(); this.properties = (Properties) properties; this.columnList = (ResultColumnList) rcl; this.checkCondition...
public void init( Object constraintName, Object constraintType, Object rcl, Object properties, Object checkCondition, Object constraintText) { init( constraintName, constraintType, rcl, properties, checkCondition, constraintText, ReuseFactory.getInteger(StatementTy...
int remain = temp.length; int start = 0; int dataLen = blksize - 10; while (remain > 0) { writer.endDdmAndDss(); finalizeChain(); correlationID = reader.readDssHeader(); int codePoint = reader.readLengthAndCodePoint(); DRDAStatement contstmt = parseCNTQRY(); if (stmt != contstmt) agentError("continued query stmt not ...
if (temp.length == 0) agentError("LMTBLKPRC violation: splitQRYDTA was " + "called to split a QRYDTA block, but the " + "entire row fit successfully into the " + "current block. Server rowsize computation " + "was probably incorrect (perhaps an off-by-" + "one bug?). QRYDTA blocksize: " + blksize); stmt.setSplitQRYDTA(...
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...
moreData = false;
return false;
private boolean writeFDODTA (DRDAStatement stmt) throws DRDAProtocolException, SQLException { boolean hasdata = false; int blksize = stmt.getBlksize() > 0 ? stmt.getBlksize() : CodePoint.QRYBLKSZ_MAX; long rowCount = 0; ResultSet rs =null; boolean moreData = (stmt.getQryprctyp() == CodePoint.LMTBLKPRC); ...
if (stmt.getExtDtaObjects() != null)
if (stmt.getExtDtaObjects() != null && stmt.getSplitQRYDTA() == null)
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...
if (! readXAFlags)
if (syncType != CodePoint.SYNCTYPE_REQ_FORGET && ! readXAFlags)
protected void parseSYNCCTL() throws DRDAProtocolException { reader.markCollection(); int codePoint = reader.getCodePoint(CodePoint.SYNCTYPE); int syncType = parseSYNCTYPE(); int xaflags = 0; boolean readXAFlags = false; Xid xid = null; codePoint = reader.getCodePoint(); while (codePoint != -1) { swit...
recoverXA();
if (readXAFlags) recoverXA(xaflags); else recoverXA();
protected void parseSYNCCTL() throws DRDAProtocolException { reader.markCollection(); int codePoint = reader.getCodePoint(CodePoint.SYNCTYPE); int syncType = parseSYNCTYPE(); int xaflags = 0; boolean readXAFlags = false; Xid xid = null; codePoint = reader.getCodePoint(); while (codePoint != -1) { swit...
}
public static EXTDTAInputStream getEXTDTAStream(ResultSet rs, int column, int drdaType) throws SQLException { EXTDTAInputStream extdtaStream = null; int length = 0; byte[] bytes = null; int ndrdaType = drdaType | 1; //nullable drdaType // BLOBS if (ndrdaType == FdocaConstants.DRDA_TYPE_NLOBBYTES) { //...
if (securityMechanism != CodePoint.SECMEC_USRIDPWD && securityMechanism != CodePoint.SECMEC_USRIDONL) { if (securityMechanism != CodePoint.SECMEC_EUSRIDPWD) securityCheckCode = CodePoint.SECCHKCD_NOTSUPPORTED; else { try { if (decryptionManager == null) decryptionManager = new DecryptionManager(); myPublicKey = decryp...
if ( (server.getSecurityMechanism() != NetworkServerControlImpl.INVALID_OR_NOTSET_SECURITYMECHANISM) && securityMechanism != server.getSecurityMechanism()) securityCheckCode = CodePoint.SECCHKCD_NOTSUPPORTED; else { if (securityMechanism != CodePoint.SECMEC_USRIDPWD && securityMechanism != CodePoint.SECMEC_USRIDONL) ...
private int parseACCSEC() throws DRDAProtocolException { int securityCheckCode = 0; int securityMechanism = 0; byte [] publicKeyIn = null; reader.markCollection(); int codePoint = reader.getCodePoint(); while (codePoint != -1) { switch(codePoint) { //optional case CodePoint.SECMGRNM: // this is d...
writer.writeScalar2Bytes(CodePoint.SECMEC, CodePoint.SECMEC_USRIDPWD); writer.writeScalar2Bytes(CodePoint.SECMEC, CodePoint.SECMEC_EUSRIDPWD); writer.writeScalar2Bytes(CodePoint.SECMEC, CodePoint.SECMEC_USRIDONL);
if ( server.getSecurityMechanism() != NetworkServerControlImpl.INVALID_OR_NOTSET_SECURITYMECHANISM ) writer.writeScalar2Bytes(CodePoint.SECMEC,server.getSecurityMechanism()); else { writer.writeScalar2Bytes(CodePoint.SECMEC, CodePoint.SECMEC_USRIDPWD); writer.writeScalar2Bytes(CodePoint.SECMEC, CodePoint.SECMEC_EU...
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 kno...