Hi Panos,
I share Andy's comment.
It is a matter of knowing and wrapping the client library "C" of MySQL.
Studying the gawk API will be quite comfortable.
It is worth seeing the code in pgsql.c, redis.c and lmdb.c of the "gawkextlib" project, you will notice that the most complex work is done by the C libpq API in the case of "pgsql.c" or "hiredis" API "in" redis.c ".
So writing a gawk-mariadb extension would be to create an interface for libmysqlclient, that is what you would have to assess whether it is a complex task or not, as far as the other party is concerned, the "api gawk" will not have problems.
I hope I have encouraged you.
--Paulino