From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Vladimir Davydov Subject: [PATCH 22/25] vinyl: remove pointless assertion from vy_stmt_new_surrogate_delete Date: Fri, 27 Jul 2018 14:30:02 +0300 Message-Id: <9d768a60cb9b4ac7dd5a3c77f0f04584da8b6eff.1532689066.git.vdavydov.dev@gmail.com> In-Reply-To: References: In-Reply-To: References: To: kostja@tarantool.org Cc: tarantool-patches@freelists.org List-ID: For some reason, vy_stmt_new_surrogate_delete() checks that the source tuple has all fields mandated by the space format (min_field_count). This is pointless, because to generate a surrogate DELETE statement, we don't need all tuple fields - if a field is absent it will be replaced with NULL. We haven't stepped on this assertion, because we always create surrogate DELETEs from full tuples. However, to implement #2129 we need to be able to create surrogate DELETEs from tuples that only have indexed fields. So let's remove this assertion. Needed for #2129 --- src/box/vy_stmt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/box/vy_stmt.c b/src/box/vy_stmt.c index f4c3dd18..0bf53cbf 100644 --- a/src/box/vy_stmt.c +++ b/src/box/vy_stmt.c @@ -404,7 +404,6 @@ vy_stmt_new_surrogate_delete_raw(struct tuple_format *format, const char *src_pos = src_data; uint32_t src_count = mp_decode_array(&src_pos); - assert(src_count >= format->min_field_count); uint32_t field_count; if (src_count < format->index_field_count) { field_count = src_count; -- 2.11.0