예제 #1
0
        public static void init(string dirname)
        {
            initFileLogAndBufferMgr(dirname);
            Transaction tx    = new Transaction();
            bool        isnew = fm.isNew();

            if (isnew)
            {
                System.Console.WriteLine("creating new database...");
            }
            else
            {
                System.Console.WriteLine("recovering existing database...");
                tx.recover();
            }
            initMetadataMgr(isnew, tx);
            tx.commit();
        }