# # # patch "database.cc" # from [84f663862dc6a081e02c39a7b6186ccd9d9fa520] # to [d08ea25a03b5bffcd1fccfd2e938fe67ae80b8f4] # ============================================================ --- database.cc 84f663862dc6a081e02c39a7b6186ccd9d9fa520 +++ database.cc d08ea25a03b5bffcd1fccfd2e938fe67ae80b8f4 @@ -510,6 +510,10 @@ database::init() system_path dbpath; helper.get_database_path(opts, dbpath); + // FIXME: for all :memory: databases an empty path is returned above, thus + // all requests for a :memory: database point to the same database + // implementation. This means we cannot use two different memory databases + // within the same monotone process if (dbcache.find(dbpath) == dbcache.end()) { L(FL("creating new database_impl instance for %s") % dbpath); @@ -4716,9 +4720,13 @@ database_path_helper::get_database_path( return; } - E(opts.dbname_type == managed_db, origin::internal, - F("cannot determine full path for this database type")); + if (opts.dbname_type == memory_db) + { + return; + } + I(opts.dbname_type == managed_db); + path_component basename; validate_and_clean_alias(opts.dbname_alias, basename);