From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp34.i.mail.ru (smtp34.i.mail.ru [94.100.177.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id D0F8C469710 for ; Tue, 2 Jun 2020 12:35:24 +0300 (MSK) Date: Tue, 2 Jun 2020 12:34:24 +0300 From: Sergey Bronnikov Message-ID: <20200602093424.GD10824@pony.bronevichok.ru> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Subject: Re: [Tarantool-patches] [PATCH] lua: show error on attempt to access to tuple of unsupported type List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org, Vladislav Shpilevoy Cc: alexander.turenko@tarantool.org Vladislav, please join to review. On 17:27 Mon 18 May , sergeyb@tarantool.org wrote: > From: Sergey Bronnikov > > There are cases when tarantool may get access to tuples of unsupported type > added in next versions: > - new client inserts decimal value in a space and server unable to decode it. > - old client select decimal value > - old client recieve decimal value from a function > > Patch adds error message shown when cases above are happen. > > Fixes #4632 > --- > GH issue: https://github.com/tarantool/tarantool/issues/4632 > GH branch: https://github.com/tarantool/tarantool/tree/ligurio/gh-4632-warn-unsupported-types > > Note: patch is applicable to 1.10 branch only. > > src/lua/msgpackffi.lua | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/lua/msgpackffi.lua b/src/lua/msgpackffi.lua > index abcbd54fa..4c60523e6 100644 > --- a/src/lua/msgpackffi.lua > +++ b/src/lua/msgpackffi.lua > @@ -541,6 +541,8 @@ decode_r = function(data) > return false > elseif c == 0xc3 then > return true > + elseif c >= 0xd4 and c <= 0xd8 or c >= 0xc7 and c <= 0xc9 then > + error(string.format("unsupported tuple type")) > else > local fun = decoder_hint[c]; > assert (type(fun) == "function") > -- > 2.23.0 > -- sergeyb@