[Tarantool-patches] [PATCH v3 0/3] sql: fix order of inserted rows

imeevma at tarantool.org imeevma at tarantool.org
Wed Apr 15 10:09:38 MSK 2020


This patch-set fixes order of inserted rows in case ephemeral
space is used during INSERT into space with sequence. The order
now is the same in which these values were inserted originally.
Wrong order could lead to an error in case NULL was inserted into
field with sequence.

https://github.com/tarantool/tarantool/issues/4256
https://github.com/tarantool/tarantool/tree/imeevma/gh-4256-fix-order-during-insertion

#ChangeLog
 - The inserted values will now be inserted in the order in
   which they were given in case of INSERT into space with
   sesquence (gh-4256).

Changes:
v1:
 - Patch fixed the problem but the logic was too complex.
v2:
 - After exanding of ephemeral space formats, solution become
   simpler.
v3:
 - Expansion of ephemeral space format was divided into two
   patches.

Mergen Imeev (3):
  box: extend ephemeral space format
  sql: specify field types in ephemeral space format
  sql: do not change order of inserted values

 src/box/space_def.c                                | 12 ++--
 src/box/space_def.h                                |  5 +-
 src/box/sql.c                                      | 73 +++++++++++++++++-----
 src/box/sql/insert.c                               | 27 +++++++-
 src/box/sql/select.c                               |  2 +
 src/box/sql/sqlInt.h                               |  2 +
 src/box/sql/vdbe.c                                 | 19 +-----
 src/box/tuple_format.c                             | 22 +++----
 ...256-do-not-change-order-during-insertion.result | 44 +++++++++++++
 ...6-do-not-change-order-during-insertion.test.sql | 13 ++++
 10 files changed, 167 insertions(+), 52 deletions(-)
 create mode 100644 test/sql/gh-4256-do-not-change-order-during-insertion.result
 create mode 100644 test/sql/gh-4256-do-not-change-order-during-insertion.test.sql

-- 
2.7.4



More information about the Tarantool-patches mailing list