Changeset 141004 for trunk/base


Ignore:
Timestamp:
Oct 7, 2015, 7:48:25 PM (4 years ago)
Author:
raimue@…
Message:

cregistry: abort if registry version is newer than expected

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/cregistry/sql.c

    r128499 r141004  
    585585         *  - end your query list with "COMMIT", NULL
    586586         *  - set did_update = 1 and continue;
     587         *  - update the current version number below
    587588         */
     589
     590        if (sql_version(NULL, -1, version, -1, "1.202") > 0) {
     591            /* the registry was already upgraded to a newer version and cannot be used anymore */
     592            reg_throw(errPtr, REG_INVALID, "Version number in metadata table is newer than expected.");
     593            sqlite3_finalize(stmt);
     594            rollback_db(db);
     595            return 0;
     596        }
    588597
    589598        /* if we arrive here, no update was done and we should end the
Note: See TracChangeset for help on using the changeset viewer.