Tarantool development patches archive
 help / color / mirror / Atom feed
From: imeevma@tarantool.org
To: korablev@tarantool.org, tsafin@tarantool.org,
	tarantool-patches@dev.tarantool.org
Subject: [Tarantool-patches] [PATCH v3 0/2] sql: fix CAST() from BLOB to INTEGER
Date: Wed, 25 Mar 2020 14:38:03 +0300	[thread overview]
Message-ID: <cover.1585135623.git.imeevma@gmail.com> (raw)

This patch-set fixes CAST() from BLOB to INTEGER in case a BLOB
does not have '\0'.

https://github.com/tarantool/tarantool/issues/4766
https://github.com/tarantool/tarantool/tree/imeevma/gh-4766-fix-blob-size-for-cast


Changelog:
 - CAST() from string contains DOUBLE value to INTEGER or UNSIGNED
   was disallowed.
 - Maximum length of a BLOB that is allowed to be cast to INTEGER
   or UNSIGNED was limited to 12287 bytes.
 - Fixed wrong behaviour of CAST() in case a BLOB does not have
   '\0'.


Mergen Imeev (2):
  sql: fix CAST() from STRING to INTEGER
  sql: add '\0' to the BLOB when it is cast to INTEGER

 src/box/sql/util.c                   | 17 +++++++++----
 src/box/sql/vdbe.c                   | 11 +++++++--
 src/box/sql/vdbeInt.h                |  1 -
 src/box/sql/vdbemem.c                | 45 +++++++++++----------------------
 test/sql-tap/cast.test.lua           | 48 +++++++++++++++++++++++++++++++++++-
 test/sql-tap/e_select1.test.lua      |  2 +-
 test/sql-tap/intpkey.test.lua        |  2 +-
 test/sql-tap/join.test.lua           |  4 +--
 test/sql-tap/subquery.test.lua       |  6 ++---
 test/sql-tap/tkt-9a8b09f8e6.test.lua |  4 +--
 test/sql/types.result                | 23 +++++++----------
 11 files changed, 100 insertions(+), 63 deletions(-)

-- 
2.7.4

             reply	other threads:[~2020-03-25 11:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-25 11:38 imeevma [this message]
2020-03-25 11:38 ` [Tarantool-patches] [PATCH v3 1/2] sql: fix CAST() from STRING " imeevma
2020-03-25 18:10   ` Nikita Pettik
2020-03-25 11:38 ` [Tarantool-patches] [PATCH v3 2/2] sql: add '\0' to the BLOB when it is cast " imeevma
2020-03-25 18:17   ` Nikita Pettik
2020-03-25 17:46 ` [Tarantool-patches] [PATCH v3 0/2] sql: fix CAST() from BLOB " Nikita Pettik
2020-03-27 11:30   ` Mergen Imeev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1585135623.git.imeevma@gmail.com \
    --to=imeevma@tarantool.org \
    --cc=korablev@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=tsafin@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v3 0/2] sql: fix CAST() from BLOB to INTEGER' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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