[Tarantool-patches] [tarantool-patches] Re: [PATCH v4 4/4] sql: use name instead of function pointer for UDF

Kirill Shcherbatov kshcherbatov at tarantool.org
Wed Oct 16 16:51:22 MSK 2019


> 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")


More information about the Tarantool-patches mailing list