[Tarantool-patches] [tarantool-patches] [PATCH v1 1/1] sql: fix fk violation for autoincremented field
Konstantin Osipov
kostja.osipov at gmail.com
Thu Oct 17 22:20:09 MSK 2019
* Kirill Shcherbatov <kshcherbatov at 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
More information about the Tarantool-patches
mailing list