[tarantool-patches] [PATCH v4 0/4] sql: fixes for ck constraints involving a function

Kirill Shcherbatov kshcherbatov at tarantool.org
Tue Oct 8 16:02:13 MSK 2019


This patchset fixes some problems with CK constraints using user-defined
function in some corner case.

Changes in v4:
  - persistent is_enabled option
  - minor review fixes

Changes in v3:
  - ability to enable/disable ck constraints in SQL
  - patch is split better on commits
  - introduced is_recovery_competed global schema's state
  - minor style fixes

Branch: http://github.com/tarantool/tarantool/tree/kshch/gh-4387-func-returns-type-check
Issue: https://github.com/tarantool/tarantool/issues/4387

Kirill Shcherbatov (4):
  box: add an ability to disable CK constraints
  sql: add an ability to disable CK constraints
  box: do not evaluate ck constraints on recovery
  sql: use name instead of function pointer for UDF

 extra/mkkeywordhash.c          |   2 +
 src/box/alter.cc               |  43 ++++--
 src/box/bootstrap.snap         | Bin 5934 -> 5944 bytes
 src/box/box.cc                 |   1 +
 src/box/ck_constraint.c        |  10 +-
 src/box/ck_constraint.h        |  17 ++-
 src/box/engine.c               |  21 +++
 src/box/lua/schema.lua         |  16 ++-
 src/box/lua/space.cc           |   3 +
 src/box/lua/upgrade.lua        |  13 ++
 src/box/schema.cc              |   2 +
 src/box/schema.h               |   3 +
 src/box/schema_def.h           |   1 +
 src/box/sql/alter.c            |  65 +++++++++
 src/box/sql/build.c            |  11 +-
 src/box/sql/expr.c             |  17 ++-
 src/box/sql/parse.y            |  12 +-
 src/box/sql/parse_def.h        |  22 ++-
 src/box/sql/sqlInt.h           |  10 ++
 src/box/sql/vdbe.c             |  11 +-
 test/box-py/bootstrap.result   |   3 +-
 test/box/access_misc.result    | 137 +++++++++----------
 test/sql-tap/keyword1.test.lua |   4 +-
 test/sql/checks.result         | 236 ++++++++++++++++++++++++++++++---
 test/sql/checks.test.lua       | 102 +++++++++++---
 test/sql/errinj.result         |  12 +-
 test/sql/errinj.test.lua       |  12 +-
 27 files changed, 638 insertions(+), 148 deletions(-)

-- 
2.23.0





More information about the Tarantool-patches mailing list