From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <tarantool-patches-bounce@freelists.org>
Received: from localhost (localhost [127.0.0.1])
	by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 730372F2C5
	for <tarantool-patches@freelists.org>; Tue, 21 May 2019 13:04:14 -0400 (EDT)
Received: from turing.freelists.org ([127.0.0.1])
	by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id qQhnPnbqUj8o for <tarantool-patches@freelists.org>;
	Tue, 21 May 2019 13:04:14 -0400 (EDT)
Received: from smtp51.i.mail.ru (smtp51.i.mail.ru [94.100.177.111])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 3069522CF9
	for <tarantool-patches@freelists.org>; Tue, 21 May 2019 13:04:14 -0400 (EDT)
Subject: [tarantool-patches] Re: [PATCH v1 1/1] box: fix assert with
 multikey hybrid index
References: <9d568e120e1daaf5e4df7859911088f446a8e403.1558453156.git.kshcherbatov@tarantool.org>
 <20190521164907.axeogtzol4wkbqpk@esperanza>
 <e5edb1d3-5c6e-9dbc-7599-2240247ebd91@tarantool.org>
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Message-ID: <d8fa59f9-7c67-adf9-a331-325585e903b0@tarantool.org>
Date: Tue, 21 May 2019 20:04:10 +0300
MIME-Version: 1.0
In-Reply-To: <e5edb1d3-5c6e-9dbc-7599-2240247ebd91@tarantool.org>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Sender: tarantool-patches-bounce@freelists.org
Errors-to: tarantool-patches-bounce@freelists.org
Reply-To: tarantool-patches@freelists.org
List-Help: <mailto:ecartis@freelists.org?Subject=help>
List-Unsubscribe: <mailto:tarantool-patches-request@freelists.org?Subject=unsubscribe>
List-software: Ecartis version 1.0.0
List-Id: tarantool-patches <tarantool-patches.freelists.org>
List-Subscribe: <mailto:tarantool-patches-request@freelists.org?Subject=subscribe>
List-Owner: <mailto:>
List-post: <mailto:tarantool-patches@freelists.org>
List-Archive: <http://www.freelists.org/archives/tarantool-patches>
To: tarantool-patches@freelists.org, Kirill Shcherbatov <kshcherbatov@tarantool.org>, Vladimir Davydov <vdavydov.dev@gmail.com>



On 21/05/2019 19:59, Kirill Shcherbatov wrote:
> Thank you for your feedback! Done.
> ====================================================
> 
> Tarantool used to assume that offset_slot has an extension
> iff field_map_get_offset is called with multikey_idx >= 0.
> In fact, when some part of the index contains a multikey index
> placeholder, tuple_compare_* routines pass a tuple_hint in
> meaning of multikey index for each tuple_field_raw_by_part call,
> even for regular key_part that doesn't have array index
> placeholder (and, correspondingly, field_map extension).
> Thus this assumption is invalid.
> 
> This patch uses the fact that field_map slots that have extensoin

Typo "extensoin". 

> store negative offset to distinguish multikey and normal usage
> of the field_map_get_offset routine.
> 
> Closes #4234
> ---