In the procedure below, SELECT COUNT takes clearly longer that 1 millisecond, however it is not interrupted.
Compare with this:
I saw a comment in KB which says
MariaDB's can kill any queries (excluding stored procedures).
I'm not sure what it means, i.e. whether the whole procedure can't be measured and compared to MAX_STATEMENT_TIME, or any individual statement in the procedure cannot; in any case, the above examples show that the behavior is inconsistent.