[CONJ-969] org.mariadb.jdbc.ClientPreparedStatement is missing a toString implementation Created: 2022-05-03  Updated: 2022-05-13  Resolved: 2022-05-13

Status: Closed
Project: MariaDB Connector/J
Component/s: Other
Affects Version/s: 3.0.4
Fix Version/s: 3.0.5

Type: Bug Priority: Minor
Reporter: Florens Pauwels Assignee: Diego Dupin
Resolution: Fixed Votes: 0
Labels: None


 Description   

It seems like org.mariadb.jdbc.ClientPreparedStatement has lost its toString implementation in the 3.0.0 rewrite. In 2.7.5, org.mariadb.jdbc.ClientSidePreparedStatement does have a toString implementation returning the sql string.

This is useful for logging purposes, for example with Hibernate slow query logging:
// 2.7.5
SlowQuery: 11 milliseconds. SQL: 'HikariProxyPreparedStatement@71013107 wrapping prep7070: update "table_name" set "col_name"=? where "id"=?

{1: 'some_value', 2: 'some_id'}

'

// 3.0.4
SlowQuery: 11 milliseconds. SQL: 'HikariProxyPreparedStatement@71013107 wrapping org.mariadb.jdbc.ClientPreparedStatement@4029ae9a'


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