Tarantool development patches archive
 help / color / mirror / Atom feed
From: Nikita Pettik <korablev@tarantool.org>
To: Kirill Shcherbatov <kshcherbatov@tarantool.org>
Cc: tarantool-patches@freelists.org, tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v1 1/1] sql: fix fk violation for autoincremented field
Date: Thu, 17 Oct 2019 18:03:02 +0300	[thread overview]
Message-ID: <20191017150302.GH23167@tarantool.org> (raw)
In-Reply-To: <f951426b0cf0773f7d78c96c0e7645f415f0bb4f.1571322722.git.kshcherbatov@tarantool.org>

On 17 Oct 17:32, Kirill Shcherbatov wrote:
> Fk constraints used to ignore incremented fields that are
> represented with NULL placeholders in a tuple during FK tests in
> the SQL frontend. A factual value is inserted in a tuple a bit
> later, during DML 'insert' operation on the server side.
> 
> To work around this issue a new OP_NextSequenceValue opcode is
> introduced. This new operation retrieves a next sequence value
> (that will be factually inserted in a tuple later) to test it
> for fk constraint compatibility.
> Closes #4565
> ---
> Branch: http://github.com/tarantool/tarantool/tree/kshch/gh-4546-fk-autoincrement
> Issue: https://github.com/tarantool/tarantool/issues/4546
> 

Please split patch into two: first one which affects box and sequence_next()
refactoring and second one which fixes SQL bahaviour. Thanks.
 
>  src/box/sequence.c                         | 54 ++++++++-----
>  src/box/sequence.h                         | 11 +++
>  src/box/sql/fk_constraint.c                | 30 +++++++-
>  src/box/sql/vdbe.c                         | 21 +++++
>  test/sql/gh-4565-fk-autoincrement.result   | 90 ++++++++++++++++++++++
>  test/sql/gh-4565-fk-autoincrement.test.lua | 26 +++++++
>  6 files changed, 211 insertions(+), 21 deletions(-)
>  create mode 100644 test/sql/gh-4565-fk-autoincrement.result
>  create mode 100644 test/sql/gh-4565-fk-autoincrement.test.lua
> 

  reply	other threads:[~2019-10-17 15:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-17 14:32 Kirill Shcherbatov
2019-10-17 15:03 ` Nikita Pettik [this message]
2019-10-17 19:20 ` [Tarantool-patches] [tarantool-patches] " Konstantin Osipov
2019-10-21  8:38   ` [Tarantool-patches] [tarantool-patches] " Kirill Shcherbatov
2019-10-21  9:05     ` Konstantin Osipov

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=20191017150302.GH23167@tarantool.org \
    --to=korablev@tarantool.org \
    --cc=kshcherbatov@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [Tarantool-patches] [PATCH v1 1/1] sql: fix fk violation for autoincremented field' \
    /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