[patches] [PATCH v2 0/1] Fix autoincrement for constraints
Bulat Niatshin
niatshin at tarantool.org
Thu Feb 22 02:49:05 MSK 2018
Branch:
https://github.com/tarantool/tarantool/tree/bn/gh-2981-constraints-autoinc
Brief overview:
Autoincrement now is fully supported by Tarantool facilities. However,
during VDBE program execution there were no information about new value
from sequence, instead of new value there was a NULL. This made CHECK
constraints on autoincrement fields working inappropriately.
In this patch I've implemented new opcode which extracts new value from
space sequence and loads it into necessary register, which in the future
will be used by constraints bytecode.
Bulat Niatshin (1):
sql: fix autoincrement for constraints
src/box/sql/insert.c | 5 +-
src/box/sql/opcodes.c | 139 ++++++++++++++--------------
src/box/sql/opcodes.h | 159 ++++++++++++++++----------------
src/box/sql/vdbe.c | 40 +++++++-
test/sql/gh-2981-check-autoinc.result | 49 ++++++++++
test/sql/gh-2981-check-autoinc.test.lua | 20 ++++
6 files changed, 262 insertions(+), 150 deletions(-)
create mode 100644 test/sql/gh-2981-check-autoinc.result
create mode 100644 test/sql/gh-2981-check-autoinc.test.lua
--
2.14.1
More information about the Tarantool-patches
mailing list