Operation hangs when using Ant and MariaDB JDBC Driver

Description

We use MySQL as database, and Ant and JDBC to prepare test databases.
We recently switched over from commercial MySQL driver, to the MariaDB client. Our main application works fine with the MariaDB client, but when using Ant and JDBC to execute database preparation operations, such as; drop, create, use, MariaDB hangs indefinitely.

We've tried drop, create database, use database, select * from mysql.user, all hangs forever. (One one occasion our build hang approximately 14 hours over night.)

This target using MariaDB client, hangs:
<target name="sql-maria">
<sql userid="root" password="root" url="jdbc:mysql://localhost/" driver="org.mariadb.jdbc.Driver" classpath="mariadb-client-1.0.0.jar" print="true">
use my_database;
</sql>
</target>

Output from MySQL in mysqld.sql:
130114 10:11:07 101 Connect root@localhost on
101 Query select @@sql_mode
101 Query set autocommit=0
101 Query use my_database

This target using MySQL commercial driver, works fine:
<target name="sql">
<sql userid="root" password="root" url="jdbc:mysql://localhost/" driver="com.mysql.jdbc.Driver" classpath="mysql-connector-java-commercial-5.1.13-bin.jar" print="true">
use my_database;
</sql>
</target>

Output from MySQL in mysqld.sql:
130114 10:10:46 100 Connect root@localhost on
100 Query /* mysql-connector-java-commercial-5.1.13 ( Revision: ${bzr.revision-id} ) */SHOW VARIABLES WHERE Variable_name ='language' OR Variable_name = 'net_write_timeout' OR Variable_name = 'interactive_timeout' OR Variable_name = 'wait_timeout' OR Variable_name = 'character_set_client' OR Variable_name = 'character_set_connection' OR Variable_name = 'character_set' OR Variable_name = 'character_set_server' OR Variable_name = 'tx_isolation' OR Variable_name = 'transaction_isolation' OR Variable_name = 'character_set_results' OR Variable_name = 'timezone' OR Variable_name = 'time_zone' OR Variable_name = 'system_time_zone' OR Variable_name = 'lower_case_table_names' OR Variable_name = 'max_allowed_packet' OR Variable_name = 'net_buffer_length' OR Variable_name = 'sql_mode' OR Variable_name = 'query_cache_type' OR Variable_name = 'query_cache_size' OR Variable_name = 'init_connect'
100 Query /* mysql-connector-java-commercial-5.1.13 ( Revision: ${bzr.revision-id} ) */SELECT @@session.auto_increment_increment
100 Query SHOW COLLATION
100 Query SET character_set_results = NULL
100 Query SET autocommit=1
100 Query SET sql_mode='STRICT_TRANS_TABLES'
100 Query SET autocommit=0
100 Query use my_database
100 Query SHOW WARNINGS
100 Query commit
100 Query rollback
100 Quit

Environment

Gentoo Linux 3.0.6
MySQL Server: 5.1.56-log Gentoo Linux mysql-5.1.56
Apache Ant(TM) version 1.8.4
java.version : 1.6.0_38

RHEL 6.2
MySQL Server version: 5.5.19-enterprise-commercial-advanced-log
Apache Ant(TM) version 1.8.2
java.version : 1.6.0_31

Status

Assignee

Vladislav Vaintroub

Reporter

Fredrik Vihlborg

Labels

External issue ID

None

External issue ID

None

Fix versions

Affects versions

1.1.0

Priority

Major
Configure