The following test hangs forever if it is executed with MariaDB Java client. With MySQL Connector/J it works all right.
It does not matter whether the timeout is actually reached or not.
Adding stmt.close() also does not help.
Please note that the same code executed via JUnit does not hang.