You are tired of writing your UDFs in C or never wanted to write them in C at all ? How about writing them in lua ?
LUA is
- easy to learn
- easy to embed
- easy to use
functions
As example we want to read the real startup time of the errorlog.
-- we are run with the permissions of the mysqld -- -- let's try the read the "ready for connections" from the errorlog and look -- for the last [Note]: -- -- 061124 17:28:39 [Note] /usr/sbin/mysqld-max: ready for connections. local f = assert(io.open(params[1], "r")) local readysince = nil while true do local line = f:read() if not line then break end local match = string.match(line, "^([0-9]+ [0-9:]+) %[Note%]") if match then readysince = match end end …[Read more]