/** * Does exception indicate query recursion? */ private boolean isRecursiveQueryExceptionDetected(DbException exception) { if (exception == null) { return false; } if (exception.getErrorCode() != ErrorCode.TABLE_OR_VIEW_NOT_FOUND_1) { return false; } return exception.getMessage().contains("\"" + this.getName() + "\""); }
private void throwLastBackgroundException() { if (backgroundException != null) { // we don't care too much about concurrency here, // we just want to make sure the exception is _normally_ // not just logged to the .trace.db file DbException b = backgroundException; backgroundException = null; if (b != null) { // wrap the exception, so we see it was thrown here throw DbException.get(b.getErrorCode(), b, b.getMessage()); } } }
@Override public Index getScanIndex(Session session, int[] masks, TableFilter[] filters, int filter, SortOrder sortOrder, HashSet<Column> allColumnsSet) { if (createException != null) { String msg = createException.getMessage(); throw DbException.get(ErrorCode.VIEW_IS_INVALID_2, createException, getSQL(), msg); } PlanItem item = getBestPlanItem(session, masks, filters, filter, sortOrder, allColumnsSet); return item.getIndex(); }
} catch (DbException e) { execute("DROP TABLE " + newTable.getName(), true); throw DbException.get(ErrorCode.VIEW_IS_INVALID_2, e, getSQL(), e.getMessage());
} catch (DbException e) { if (e.getErrorCode() == ErrorCode.IO_EXCEPTION_2) { if (e.getMessage().contains("locked")) {
private void throwLastBackgroundException() { if (backgroundException != null) { // we don't care too much about concurrency here, // we just want to make sure the exception is _normally_ // not just logged to the .trace.db file DbException b = backgroundException; backgroundException = null; if (b != null) { // wrap the exception, so we see it was thrown here throw DbException.get(b.getErrorCode(), b, b.getMessage()); } } }
private void throwLastBackgroundException() { if (backgroundException != null) { // we don't care too much about concurrency here, // we just want to make sure the exception is _normally_ // not just logged to the .trace.db file DbException b = backgroundException; backgroundException = null; if (b != null) { // wrap the exception, so we see it was thrown here throw DbException.get(b.getErrorCode(), b, b.getMessage()); } } }
@Override public Index getScanIndex(Session session, int[] masks, TableFilter[] filters, int filter, SortOrder sortOrder, HashSet<Column> allColumnsSet) { if (createException != null) { String msg = createException.getMessage(); throw DbException.get(ErrorCode.VIEW_IS_INVALID_2, createException, getSQL(), msg); } PlanItem item = getBestPlanItem(session, masks, filters, filter, sortOrder, allColumnsSet); return item.getIndex(); }
@Override public Index getScanIndex(Session session, int[] masks, TableFilter[] filters, int filter, SortOrder sortOrder, HashSet<Column> allColumnsSet) { if (createException != null) { String msg = createException.getMessage(); throw DbException.get(ErrorCode.VIEW_IS_INVALID_2, createException, getSQL(), msg); } PlanItem item = getBestPlanItem(session, masks, filters, filter, sortOrder, allColumnsSet); return item.getIndex(); }
} catch (DbException e) { execute("DROP TABLE " + newTable.getName(), true); throw DbException.get(ErrorCode.VIEW_IS_INVALID_2, e, getSQL(), e.getMessage());
} catch (DbException e) { execute("DROP TABLE " + newTable.getName(), true); throw DbException.get(ErrorCode.VIEW_IS_INVALID_2, e, getSQL(), e.getMessage());
} catch (DbException e) { if (e.getErrorCode() == ErrorCode.IO_EXCEPTION_2) { if (e.getMessage().contains("locked")) {
} catch (DbException e) { if (e.getErrorCode() == ErrorCode.IO_EXCEPTION_2) { if (e.getMessage().contains("locked")) {