@Override public int readLob(long lobId, byte[] hmac, long offset, byte[] buff, int off, int length) { throw DbException.throwInternalError(); }
public Rownum(Prepared prepared) { if (prepared == null) { throw DbException.throwInternalError(); } this.prepared = prepared; }
@Override public boolean containsDistinct(Value[] values) { // We have to make sure that we do not allow lazy // evaluation when this call is needed: // WHERE x IN (SELECT ...). throw DbException.throwInternalError(); } }
private void removeFromLinkedList(CacheObject rec) { if (SysProperties.CHECK && rec == head) { DbException.throwInternalError("try to remove head"); } rec.cachePrevious.cacheNext = rec.cacheNext; rec.cacheNext.cachePrevious = rec.cachePrevious; // TODO cache: mystery: why is this required? needs more memory if we // don't do this rec.cacheNext = null; rec.cachePrevious = null; }
public ConditionAndOr(int andOrType, Expression left, Expression right) { this.andOrType = andOrType; this.left = left; this.right = right; if (SysProperties.CHECK && (left == null || right == null)) { DbException.throwInternalError(left + " " + right); } }
@Override public boolean containsDistinct(Value[] values) { // We should never do this on remote result. throw DbException.throwInternalError(); } }
/** * INTERNAL */ @Override public int getMaxLengthInplaceLob() { throw DbException.throwInternalError(); }
private void check() { if (SysProperties.CHECK) { for (int i = 0; i < entryCount + 1; i++) { int child = childPageIds[i]; if (child == 0) { DbException.throwInternalError(); } } } }
@Override public int readLob(long lobId, byte[] hmac, long offset, byte[] buff, int off, int length) { throw DbException.throwInternalError(); }
private void check() { if (SysProperties.CHECK) { for (int i = 0; i < entryCount + 1; i++) { int child = childPageIds[i]; if (child == 0) { DbException.throwInternalError(); } } } }
private static void assertNotHolds(Object lock) { if (Thread.holdsLock(lock)) { throw DbException.throwInternalError(lock.toString()); } }
@Override public Cursor findFirstOrLast(Session session, boolean first) { if (!first) { throw DbException.throwInternalError( "Spatial Index can only be fetch in ascending order"); } return find(session); }
@Override public void decrypt(byte[] bytes, int off, int len) { if (SysProperties.CHECK) { if (len % ALIGN != 0) { DbException.throwInternalError("unaligned len " + len); } } for (int i = off; i < off + len; i += 8) { decryptBlock(bytes, bytes, i); } }
/** * Verify the meta table is locked. * * @param session the session */ public void verifyMetaLocked(Session session) { if (meta != null && !meta.isLockedExclusivelyBy(session) && lockMode != Constants.LOCK_MODE_OFF) { throw DbException.throwInternalError(); } }
@Override public Cursor findFirstOrLast(Session session, boolean first) { if (closed) { throw DbException.throwInternalError(toString()); } if (!first) { throw DbException.throwInternalError( "Spatial Index can only be fetch by ascending order"); } return find(session); }
@Override public void setIndexOwner(Index index) { if (this.index == index) { indexOwner = true; } else if (this.refIndex == index) { refIndexOwner = true; } else { DbException.throwInternalError(index + " " + toString()); } }
@Override public void remove(Session session, Row row) { if (closed) { throw DbException.throwInternalError(); } if (!treeMap.remove(getKey(row), row.getKey())) { throw DbException.throwInternalError("row not found"); } }
private static String getFileName(DataHandler handler, int tableId, int objectId) { if (SysProperties.CHECK && tableId == 0 && objectId == 0) { DbException.throwInternalError("0 LOB"); } String table = tableId < 0 ? ".temp" : ".t" + tableId; return getFileNamePrefix(handler.getDatabasePath(), objectId) + table + Constants.SUFFIX_LOB_FILE; }
@Override public boolean isEverything(ExpressionVisitor visitor) { if (visitor.getType() == ExpressionVisitor.QUERY_COMPARABLE) { return true; } throw DbException.throwInternalError("" + visitor.getType()); }
@Override public void add(Session session, Row row) { if (closed) { throw DbException.throwInternalError(); } treeMap.add(getKey(row), row.getKey()); }