PHP doesn't seem to throw an exception when MariaDB times out a query. Instead it just returns an empty result set. We tried running this via PHP PDO:
SET STATEMENT max_statement_time = 2 FOR
SELECT "A", SLEEP(10);
I'd expect it to throw some sort of PDOException, like when you do something similar in Postgres, but instead it completes successfully and returns an empty result set. There doesn't seem to be any way to distinguish between a timed out query and one that just doesn't return anything.
Anyone know of any way to get this to throw an exception?