From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 dev.tarantool.org (Postfix) with ESMTPS id 2EB0043D678 for ; Wed, 16 Oct 2019 16:51:23 +0300 (MSK) References: <20191015151557.GA93939@tarantool.org> From: Kirill Shcherbatov Message-ID: <05b1f332-97a2-787e-a231-c1b1cf4fffd1@tarantool.org> Date: Wed, 16 Oct 2019 16:51:22 +0300 MIME-Version: 1.0 In-Reply-To: <20191015151557.GA93939@tarantool.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [tarantool-patches] Re: [PATCH v4 4/4] sql: use name instead of function pointer for UDF List-Id: Tarantool development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@freelists.org, Nikita Pettik Cc: tarantool-patches@dev.tarantool.org > Something is wrong with this test case. Firstly, it works fine > even on master branch. Secondly, I've dropped myfunc = nil and > got the same error (on master as well) - i.e. INSERT fails with > 'procedure is not defined' error even if function is not dropped. > Obviously, to make it crash on master you should drop function > before insertion; to fix second problem you should uppercase function's > name. You are right. A fixed test case is below. +-- +-- gh-4176: Can't recover if check constraint involves function. +-- +function myfunc(x) return x < 10 end +box.schema.func.create('MYFUNC', {param_list = {'integer'}, returns = 'integer', is_deterministic = true, exports = {'LUA', 'SQL'}}) +box.execute("CREATE TABLE t6(a INT CHECK (myfunc(a)) primary key);"); +box.func.MYFUNC:drop() +box.execute("INSERT INTO t6 VALUES(11);"); +box.execute("DROP TABLE t6") + test_run:cmd("clear filter")