dbms: addition to prev. revision [#METR-16946].

This commit is contained in:
Alexey Milovidov 2015-06-27 01:37:55 +03:00
parent d9fd662c12
commit 6b82289af4

View File

@ -533,9 +533,12 @@ int Server::main(const std::vector<std::string> & args)
LOG_DEBUG(log, "Loaded metadata.");
/// Создаём системные таблицы.
Poco::File(path + "data/system").createDirectories();
Poco::File(path + "metadata/system").createDirectories();
global_context->addDatabase("system");
if (!global_context->isDatabaseExist("system"))
{
Poco::File(path + "data/system").createDirectories();
Poco::File(path + "metadata/system").createDirectories();
global_context->addDatabase("system");
}
global_context->addTable("system", "one", StorageSystemOne::create("one"));
global_context->addTable("system", "numbers", StorageSystemNumbers::create("numbers"));