[CONJ-293] Driver returns broken connection when host is missed in URL Created: 2016-05-09  Updated: 2016-08-24  Resolved: 2016-08-24

Status: Closed
Project: MariaDB Connector/J
Component/s: Other
Affects Version/s: 1.5.0-RC, 1.4.4, 1.4.5, 1.4.6, 1.5.1-RC
Fix Version/s: 1.5.2

Type: Bug Priority: Minor
Reporter: taras v Assignee: Diego Dupin
Resolution: Fixed Votes: 0
Labels: None


 Description   

My application stopped working after MariaDB JDBC driver was upgraded from version 1.1.8 to version 1.4.4. Any JDBC call against connection throws "SQLNonTransientConnectionException: Connection is close" exception. host missed in connection URL was direct reason of this e.g. "jdbc:mariadb:///schemaname" instead "jdbc:mariadb://localhost/schemaname". My application worked before drivers upgrade because host was optional in connection URL at least for 1.1.8 (same as in MySlq connection URL).

Yes this is RTFM but current driver behavior looks not good because according to javadoc java.sql.Driver#connect method should return valid connection or throws exception when can't connect to database. Otherwise it is hard to catch problem reason without driver code debugging.



 Comments   
Comment by Diego Dupin [ 2016-06-13 ]

Correction done in 1.4.6.

Comment by Diego Dupin [ 2016-08-24 ]

réopen issue, since test case wasn't working, and correction show that wasn't correct.

Comment by Diego Dupin [ 2016-08-24 ]

fixed in 1.5.2 with commit https://github.com/MariaDB/mariadb-connector-j/commit/d370cac711728c27b25ddbe6dd988ec326ca9366

Generated at Thu Feb 08 03:14:36 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.