A LUA script for MySQL proxy to output failed SQL queries as JSON