Пример #1
0
  /**
   * Ensures that under the correct conditions the system table producer's table cache, if any, is
   * set dirty.
   *
   * <p>This call is require to ensure that up-to-date versions are generated if necessary in
   * response to following system table requests.
   *
   * <p>The result argument, if non-null, is checked for update status. If it is an update result
   * with an update count, then the call must have come from a successful SELECT INTO statement, in
   * which a case a new table was created and all system tables reporting in the tables, columns,
   * indexes, etc. are dirty.
   *
   * <p>If the Result argument is null, then the call must have come from a DDL statement other than
   * a set statement, in which case a database object was created, dropped, altered or a permission
   * was granted or revoked, meaning that potentially all cached ssytem table are dirty.
   *
   * @param r A Result to test for update status, indicating the a table was created as the result
   *     of executing a SELECT INTO statement.
   */
  void setMetaDirty(Result r) {

    if (r == null || (r.iMode == Result.UPDATECOUNT && r.iUpdateCount > 0)) {
      nextDDLSCN();
      dInfo.setDirty();
    }
  }
Пример #2
0
  /**
   * Ensures system table producer's table cache, if it exists, is set dirty. After this call
   * up-to-date versions are generated in response to system table requests.
   *
   * <p>Also resets all prepared statements if a change to database structure can possibly affect
   * any existing prepared statement's validity.
   *
   * <p>The argument is false if the change to the database structure does not affect the prepared
   * statement, such as when a new table is added.
   *
   * <p>The argument is typically true when a database object is dropped, altered or a permission
   * was revoked.
   *
   * @param resetPrepared If true, reset all prepared statements.
   */
  public void setMetaDirty(boolean resetPrepared) {

    if (dbInfo != null) {
      dbInfo.setDirty();
    }

    if (resetPrepared) {
      compiledStatementManager.resetStatements();
    }
  }