File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
jdbc-v2/src/test/java/com/clickhouse/jdbc Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -306,10 +306,12 @@ public void setAndGetClientInfoTest(String clientName) throws SQLException {
306306
307307 final String testQuery = "SELECT '" + UUID .randomUUID () + "'" ;
308308 stmt .execute (testQuery );
309+ String queryId = ((StatementImpl )stmt ).getLastQueryId ();
309310 stmt .execute ("SYSTEM FLUSH LOGS" );
310311
312+
311313 final String logQuery ="SELECT http_user_agent " +
312- " FROM clusterAllReplicas('default', system.query_log) WHERE query = ' " + testQuery . replaceAll ( "'" , " \\ \\ '" ) + "'" ;
314+ " FROM clusterAllReplicas('default', system.query_log) WHERE query_id = " + stmt . enquoteLiteral ( queryId ) ;
313315 try (ResultSet rs = stmt .executeQuery (logQuery )) {
314316 Assert .assertTrue (rs .next ());
315317 String userAgent = rs .getString ("http_user_agent" );
You can’t perform that action at this time.
0 commit comments