Lua error leads to Segfault

Details

Detail name Value
Changelog Number 18022
Type Bug
Status Resolved
Affected Versions Exasol 7.1.0, Exasol 8.0.0
Fix Versions Exasol 8.25.0, Exasol 7.1.26
Resolution Date 2024-02-15

Description

When executing Lua script, which imports another Lua script throwing an exception that a type can’t be handled, the query returns an internal server error.

CREATE SCHEMA test;
open schema test;
--/
CREATE
OR
REPLACE lua script test.s_test_hashtype() returns rowcount AS 

SQL =
"select a from  (VALUES (hashtype_md5('A')) AS t(a))"
res=query(SQL)
SQL = "select '"..res[1].A.."'"
res=query(SQL)
/
--/
CREATE OR REPLACE lua script test.s2 returns rowcount AS
import("test.s_test_hashtype", "foo")
res = foo.toString()
/

EXECUTE SCRIPT test.s2();

Workaround

There is no workaround.

Fix

Execution of above script does not cause an internal server error. An exception from the imported script is thrown instead.