MariaDB server 10.3.15 requires that the DEFINER, when the stored function has SQL SECURITY DEFINER set, has privileges not just for the whole table, but the specific columns as well.
WHy is that? I expect that the user is allowed to run the SELECT over the columns because the user has the SELECT privilege for the table.
SELECT test_function('a', 'b');
mysqltest: At line 48: query 'SELECT test_function('a', 'b')' failed: 1143: SELECT command denied to user 'admin_user'@'localh
ost' for column 'column2' in table 'table2'
A test SQL script is attached.