[mysql] Add sanitization, long query/value truncation and backtraces