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 {
306
306
307
307
final String testQuery = "SELECT '" + UUID .randomUUID () + "'" ;
308
308
stmt .execute (testQuery );
309
+ String queryId = ((StatementImpl )stmt ).getLastQueryId ();
309
310
stmt .execute ("SYSTEM FLUSH LOGS" );
310
311
312
+
311
313
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 ) ;
313
315
try (ResultSet rs = stmt .executeQuery (logQuery )) {
314
316
Assert .assertTrue (rs .next ());
315
317
String userAgent = rs .getString ("http_user_agent" );
You can’t perform that action at this time.
0 commit comments