Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH] lua: show error on attempt to access to tuple of unsupported type
@ 2020-05-18 14:27 sergeyb
  2020-05-23  4:14 ` Alexander Turenko
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: sergeyb @ 2020-05-18 14:27 UTC (permalink / raw)
  To: tarantool-patches; +Cc: alexander.turenko

From: Sergey Bronnikov <sergeyb@tarantool.org>

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-06-03 21:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-18 14:27 [Tarantool-patches] [PATCH] lua: show error on attempt to access to tuple of unsupported type sergeyb
2020-05-23  4:14 ` Alexander Turenko
2020-06-02  9:34 ` Sergey Bronnikov
2020-06-03 21:47 ` Vladislav Shpilevoy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox