[CONJ-465] Permit to have a "debug" mode when socket exception occur. Created: 2017-05-04  Updated: 2020-08-25  Resolved: 2017-05-10

Status: Closed
Project: MariaDB Connector/J
Component/s: Other
Affects Version/s: None
Fix Version/s: 1.6.0, 2.0.1

Type: Task Priority: Major
Reporter: Diego Dupin Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None


 Description   

Driver must provide a way to have more verbose debug information when a socket error occur.
This must be enabled by an option (default is disabled).

example of stracktrace when enable :

java.sql.SQLNonTransientConnectionException: (conn:24863) Got packets out of order
Query is: SELECT ...
last exchanges:
write (2017.05.03 11:01:34:467):
     14 00 00 00 03 74 72 75  6E 63 61 74 65 20 74 65     .....truncate te
     73 74 5F 62 61 74 63 68                                 st_batch
read (2017.05.03 11:01:34:470):
     00 00 00 02 00 00 00                                 .......
        at org.mariadb.jdbc.internal.util.ExceptionMapper.get(ExceptionMapper.java:137)
        at org.mariadb.jdbc.internal.util.ExceptionMapper.getException(ExceptionMapper.java:101)
        at org.mariadb.jdbc.internal.util.ExceptionMapper.throwAndLogException(ExceptionMapper.java:77)
        at org.mariadb.jdbc.MariaDbStatement.executeQueryEpilog(MariaDbStatement.java:226)
        at org.mariadb.jdbc.MariaDbServerPreparedStatement.executeInternal(MariaDbServerPreparedStatement.java:413)
        at org.mariadb.jdbc.MariaDbServerPreparedStatement.execute(MariaDbServerPreparedStatement.java:362)
        at org.mariadb.jdbc.MariaDbServerPreparedStatement.executeQuery(MariaDbServerPreparedStatement.java:343)
        at com.broadsoft.persistence.PreparedStatementDecorator.executeQuery(PreparedStatementDecorator.java:88)
        at com.broadsoft.profileBuilding.ProfileBuildingUtility.readTasks(ProfileBuildingUtility.java:307)
        at com.broadsoft.profileBuilding.ProfileBuildingManager.doRun(ProfileBuildingManager.java:222)
        at com.broadsoft.profileBuilding.ProfileBuildingManager.run(ProfileBuildingManager.java:146)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.mariadb.jdbc.internal.util.dao.QueryException: Got packets out of order


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