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.
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.5) (6b24-1.11.5-0ubuntu1~11.10.1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)