From 16c49ee57ed1b5093a5589958c23eaf4dfe430e4 Mon Sep 17 00:00:00 2001 From: Yuriy Vostrikov <vostrikov@corp.mail.ru> Date: Wed, 10 Nov 2010 17:34:18 +0300 Subject: [PATCH] [box] implicit row tags --- mod/silverbox/box.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mod/silverbox/box.c b/mod/silverbox/box.c index 78a82c3d65..d8b14104d0 100644 --- a/mod/silverbox/box.c +++ b/mod/silverbox/box.c @@ -1336,9 +1336,9 @@ snap_apply(struct recovery_state *r __unused__, struct tbuf *t) if (tbuf_peek(t, sizeof(struct row_v11)) == NULL) return -1; - /* ignore tag for now */ u16 tag = read_u16(t); - assert(tag == 0); + if (tag != 0) + return -1; row = box_snap_row(t); txn->in_recover = true; @@ -1379,8 +1379,10 @@ xlog_apply(struct recovery_state *r __unused__, struct tbuf *t) if (tbuf_peek(t, sizeof(struct row_v11)) == NULL) return -1; - u16 tag = read_u16(t); - assert(tag == 0); + u16 tag = read_u16(t); + if (tag != 0) + return -1; + u16 type = read_u16(t); if (box_dispach(txn, RW, type, t) != 0) return -1; -- GitLab