Skip to content

Commit 163a1d3

Browse files
test: do not drop SQL_BUILTIN functions
SQL_BUILTIN was introduced in [1] (tarantool 2.2.1) and dropped in [2] (tarantool 2.10.0-beta2). It is not permitted to drop SQL_BUILTIN functions, thus, before this patch, tarantool_python_ci.lua was unable to run with versions between 2.2.1 and 2.10.0-beta2, failing with `ER_DROP_FUNCTION: Can't drop function 1: function is SQL built-in`. This patch fixes this. tarantool_python_ci.lua is used to start a tarantool instance for Windows tests. 1. tarantool/tarantool@200a492 2. tarantool/tarantool@c49eab9 Part of #182
1 parent 0f95f28 commit 163a1d3

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

test/suites/lib/tarantool_python_ci.lua

+10-3
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,21 @@ clean = function()
179179
end)
180180

181181
local _FUNC_NAME = 3
182+
local _FUNC_LANGUAGE = 5
182183
local allowed_funcs = {
183184
['box.schema.user.info'] = true,
184185
}
186+
local allowed_langs = {
187+
['SQL_BUILTIN'] = true,
188+
}
185189
box.space._func:pairs():map(function(tuple)
186190
local name = tuple[_FUNC_NAME]
187-
return name
188-
end):filter(function(name)
189-
return not allowed_funcs[name]
191+
local lang = tuple[_FUNC_LANGUAGE]
192+
return { name = name, lang = lang }
193+
end):filter(function(prop)
194+
return not allowed_funcs[prop.name]
195+
end):filter(function(prop)
196+
return not allowed_langs[prop.lang]
190197
end):each(function(name)
191198
box.schema.func.drop(name)
192199
end)

0 commit comments

Comments
 (0)