Skip to content

Commit 0b60ad1

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 0b60ad1

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

test/suites/lib/tarantool_python_ci.lua

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,16 +179,23 @@ 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]
190-
end):each(function(name)
191-
box.schema.func.drop(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]
197+
end):each(function(prop)
198+
box.schema.func.drop(prop.name)
192199
end)
193200

194201
cleanup_cluster()

0 commit comments

Comments
 (0)