laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/28344 )
Change subject: Don't let this osmo-msc operate on a libdbi database ......................................................................
Don't let this osmo-msc operate on a libdbi database
The Binary format changed when libdbi was removed. If we let osmo-msc run on an unconverted database, the results are unpredictable, certainly undesirable.
Change-Id: I887b6a4374b1c83684f4007e9791ae58bba4e8c1 --- M src/libmsc/db.c 1 file changed, 7 insertions(+), 7 deletions(-)
Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified
diff --git a/src/libmsc/db.c b/src/libmsc/db.c index 07081d5..0237716 100644 --- a/src/libmsc/db.c +++ b/src/libmsc/db.c @@ -72,7 +72,7 @@ * DATABASE SCHEMA AND MIGRATION ***********************************************************************/
-#define SCHEMA_REVISION "5" +#define SCHEMA_REVISION "6"
enum { SCHEMA_META, @@ -480,14 +480,14 @@ LOGP(DDB, LOGL_FATAL, "You must use osmo-msc 1.1.0 to 1.8.0 to upgrade database " "schema from '%u' to '5', sorry\n", db_rev); break; -#if 0 case 5: - if (update_db_revision_5()) - goto error; - - /* The end of waterfall */ + LOGP(DDB, LOGL_FATAL, "The storage format of BINARY data in the database " + "has changed. In order to deliver any pending SMS in your database, " + "you must manually convert your database from " + "'%u' to '6'. Alternatively you can use a fresh, blank database " + "with this version of osmo-msc, sorry.\n", db_rev); + return -1; break; -#endif default: LOGP(DDB, LOGL_FATAL, "Invalid database schema revision '%d'.\n", db_rev); return -EINVAL;