Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] [PATCH v3 0/3] sql: clean-up in case constraint creation failed
@ 2019-07-15 15:16 imeevma
  2019-07-15 15:16 ` [tarantool-patches] [PATCH v3 1/3] sql: add OP_SetDiag opcode in VDBE imeevma
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: imeevma @ 2019-07-15 15:16 UTC (permalink / raw)
  To: v.shpilevoy; +Cc: korablev, tarantool-patches

This patch makes VDBE run destructors before halting in case
constraint creation failed. This is done using new opcode
OP_SetDiag, which allows to set an error and do a jump without
halting VDBE.

https://github.com/tarantool/tarantool/issues/4183
https://github.com/tarantool/tarantool/tree/imeevma/gh-4183-clean-up-when-constraint-creation-failed

Changes in v2:
1) Opcode OP_Error was renamed to OP_SetDiag
2) Now OP_SetDiag is used for diag_set() for all VDBE errors. This
functionality has been removed from OP_Halt.
3) Fixed error with broken destructors for constraints.

Changes in v3:
1) Removed unnecessary changes.
2) Fixed commit-messages.
3) Now OP_Halt won't be added after OP_SetDiag in case clean-up
needed.

Mergen Imeev (3):
  sql: add OP_SetDiag opcode in VDBE
  sql: clean-up in case constraint creation failed
  sql: use common registers instead of temp. for constraints data

 src/box/sql/build.c         | 117 ++++++++++++++++++++++++++++----------------
 src/box/sql/expr.c          |   6 ++-
 src/box/sql/fk_constraint.c |   3 +-
 src/box/sql/insert.c        |  11 +++--
 src/box/sql/select.c        |  14 ++++--
 src/box/sql/sqlInt.h        |   2 +-
 src/box/sql/trigger.c       |   6 ++-
 src/box/sql/vdbe.c          |  31 +++++++-----
 test/sql/checks.result      |   3 +-
 test/sql/checks.test.lua    |   2 +-
 test/sql/clear.result       |  50 +++++++++++++++++++
 test/sql/clear.test.lua     |  23 +++++++++
 12 files changed, 196 insertions(+), 72 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 5+ messages in thread
* [tarantool-patches] [PATCH v3 0/3] sql: clean-up in case constraint creation failed
@ 2019-07-04 10:49 imeevma
  0 siblings, 0 replies; 5+ messages in thread
From: imeevma @ 2019-07-04 10:49 UTC (permalink / raw)
  To: korablev; +Cc: tarantool-patches

This patch makes VDBE run destructors before halting in case
constraint creation failed. This is done using new opcode
OP_SetDiag, which allows to set an error and do a jump without
halting VDBE.

https://github.com/tarantool/tarantool/issues/4183
https://github.com/tarantool/tarantool/tree/imeevma/gh-4183-clean-up-when-constraint-creation-failed

Changes in v3:
1) Removed unnecessary changes.
2) Fixed commit-messages.
3) Now OP_Halt won't be added after OP_SetDiag in case clean-up
needed.

Mergen Imeev (3):
  sql: add OP_SetDiag opcode in VDBE
  sql: clean-up in case constraint creation failed
  sql: use common registers instead of temp. for constraints data

 src/box/sql/build.c         | 117 ++++++++++++++++++++++++++++----------------
 src/box/sql/expr.c          |   6 ++-
 src/box/sql/fk_constraint.c |   3 +-
 src/box/sql/insert.c        |  11 +++--
 src/box/sql/select.c        |  14 ++++--
 src/box/sql/sqlInt.h        |   2 +-
 src/box/sql/trigger.c       |   6 ++-
 src/box/sql/vdbe.c          |  31 +++++++-----
 test/sql/checks.result      |   3 +-
 test/sql/checks.test.lua    |   2 +-
 test/sql/clear.result       |  50 +++++++++++++++++++
 test/sql/clear.test.lua     |  23 +++++++++
 12 files changed, 196 insertions(+), 72 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-07-15 15:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-15 15:16 [tarantool-patches] [PATCH v3 0/3] sql: clean-up in case constraint creation failed imeevma
2019-07-15 15:16 ` [tarantool-patches] [PATCH v3 1/3] sql: add OP_SetDiag opcode in VDBE imeevma
2019-07-15 15:16 ` [tarantool-patches] [PATCH v3 2/3] sql: clean-up in case constraint creation failed imeevma
2019-07-15 15:16 ` [tarantool-patches] [PATCH v3 3/3] sql: use common registers instead of temp. for constraints data imeevma
  -- strict thread matches above, loose matches on Subject: below --
2019-07-04 10:49 [tarantool-patches] [PATCH v3 0/3] sql: clean-up in case constraint creation failed imeevma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox