From fc5314ec6de8b0f18152e7b7b954ad77437c7ea2 Mon Sep 17 00:00:00 2001 From: "Bradley C. Kuszmaul" Date: Thu, 24 Jan 2008 15:02:46 +0000 Subject: [PATCH] Make the LSN be properly defined in the in-memory logentry so rollback will work right. Fixes #304. git-svn-id: file:///svn/tokudb@1843 c7de825b-a66e-492c-adef-691d508d4ae1 --- newbrt/logformat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/newbrt/logformat.c b/newbrt/logformat.c index 92f1b99399a..ce4253df39c 100644 --- a/newbrt/logformat.c +++ b/newbrt/logformat.c @@ -264,6 +264,7 @@ void generate_log_writer (void) { fprintf(cf, " if (lentry==0) return errno;\n"); fprintf(cf, " if (0) { died0: toku_free(lentry); return r; }\n"); fprintf(cf, " lentry->cmd = %d;\n", lt->command); + fprintf(cf, " lentry->u.%s.lsn = toku_txn_get_last_lsn(txn);\n", lt->name); DO_FIELDS(ft, lt, ({ fprintf(cf, " r=toku_copy_%s(&lentry->u.%s.%s, %s);\n", ft->type, lt->name, ft->name, ft->name);