From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 783E331367 for ; Tue, 25 Jun 2019 11:31:53 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CTYWq5wf7akx for ; Tue, 25 Jun 2019 11:31:53 -0400 (EDT) Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 3AC2731243 for ; Tue, 25 Jun 2019 11:31:53 -0400 (EDT) From: imeevma@tarantool.org Subject: [tarantool-patches] [PATCH v1 0/2] sql: clean-up in case constraint creation failed Date: Tue, 25 Jun 2019 18:31:51 +0300 Message-Id: Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: korablev@tarantool.org Cc: tarantool-patches@freelists.org This patch makes VDBE run destructors before halting in case constraint creation failed. This is done using new opcode OP_Error, 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 Mergen Imeev (2): sql: add OP_Error opcode in VDBE sql: clean-up in case constraint creation failed src/box/sql/build.c | 94 +++++++++++++++++++++++++++++------------------- src/box/sql/sqlInt.h | 3 ++ src/box/sql/vdbe.c | 12 +++++++ test/sql/checks.result | 3 +- test/sql/checks.test.lua | 2 +- test/sql/clear.result | 27 ++++++++++++++ test/sql/clear.test.lua | 11 ++++++ 7 files changed, 113 insertions(+), 39 deletions(-) -- 2.7.4