diff --git a/dbms/src/Server/Server.cpp b/dbms/src/Server/Server.cpp index 4008099b092..fa1f2dc0782 100644 --- a/dbms/src/Server/Server.cpp +++ b/dbms/src/Server/Server.cpp @@ -124,10 +124,10 @@ int Server::main(const std::vector & args) /// Создаём системные таблицы. global_context.addDatabase("system"); - global_context.addTable("system", "one", (new StorageSystemOne("one"))->thisPtr()); - global_context.addTable("system", "numbers", (new StorageSystemNumbers("numbers"))->thisPtr()); - global_context.addTable("system", "tables", (new StorageSystemTables("tables", global_context))->thisPtr()); - global_context.addTable("system", "databases", (new StorageSystemDatabases("databases", global_context))->thisPtr()); + global_context.addTable("system", "one", StorageSystemOne::create("one")); + global_context.addTable("system", "numbers", StorageSystemNumbers::create("numbers")); + global_context.addTable("system", "tables", StorageSystemTables::create("tables", global_context)); + global_context.addTable("system", "databases", StorageSystemDatabases::create("databases", global_context)); global_context.setCurrentDatabase(config.getString("default_database", "default"));