Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja.osipov@gmail.com>
To: tarantool-patches@freelists.org
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [tarantool-patches] [PATCH v1 1/1] sql: fix fk violation for autoincremented field
Date: Thu, 17 Oct 2019 22:20:09 +0300	[thread overview]
Message-ID: <20191017192009.GA19182@atlas> (raw)
In-Reply-To: <f951426b0cf0773f7d78c96c0e7645f415f0bb4f.1571322722.git.kshcherbatov@tarantool.org>

* Kirill Shcherbatov <kshcherbatov@tarantool.org> [19/10/17 17:36]:
> 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.

If you added a method to query the next sequence value, why don't
you set it in SQL? This way you don't have to query it, you
increment
and use it in SQL right away.


-- 
Konstantin Osipov, Moscow, Russia

  parent reply	other threads:[~2019-10-17 19:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-17 14:32 [Tarantool-patches] " Kirill Shcherbatov
2019-10-17 15:03 ` Nikita Pettik
2019-10-17 19:20 ` Konstantin Osipov [this message]
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=20191017192009.GA19182@atlas \
    --to=kostja.osipov@gmail.com \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [Tarantool-patches] [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