Chat2DB Edition
Chat2DB Community
Chat2DB Version
main at 2442df9
Deployment
Web and Desktop
Operating System
Any
Database and Version
ClickHouse with JDBC access over IPv6
Problem Summary
Switching a ClickHouse connection to another schema corrupts bracketed IPv6 JDBC URLs. ClickHouseDBManager splits the URL using the bare host and port as a regular expression, which cannot match the bracketed IPv6 authority and does not safely preserve URL query or fragment suffixes.
Steps to Reproduce
- Configure a ClickHouse connection with URL jdbc:clickhouse://[2001:db8::1]:8123/default?ssl=true.
- Store the connection host as 2001:db8::1 and port as 8123.
- Switch the connection schema to analytics.
Expected Behavior
The URL becomes jdbc:clickhouse://[2001:db8::1]:8123/analytics?ssl=true and remains stable on reconnect. Query parameters and ClickHouse fragment tags are preserved.
Actual Behavior
The host and port split does not match the bracketed authority. The implementation appends the bare address and schema to the existing URL, producing a malformed value such as jdbc:clickhouse://[2001:db8::1]:8123/default?ssl=true2001:db8::1:8123/analytics. The bad URL is then written back to ConnectInfo.
Logs
The ClickHouse driver rejects the malformed JDBC URL or connects with the wrong database.
Screenshots or Additional Context
ClickHouse supports schema switching and fragment tags. URL rewriting should replace only the database path while preserving the authority, query, and fragment boundaries.
Impact
IPv6 ClickHouse connections cannot reliably switch databases and reconnect attempts can reuse the corrupted URL.
Workaround
Manually restore the JDBC URL and avoid switching schemas from Chat2DB.
Submission Checklist
Chat2DB Edition
Chat2DB Community
Chat2DB Version
main at 2442df9
Deployment
Web and Desktop
Operating System
Any
Database and Version
ClickHouse with JDBC access over IPv6
Problem Summary
Switching a ClickHouse connection to another schema corrupts bracketed IPv6 JDBC URLs. ClickHouseDBManager splits the URL using the bare host and port as a regular expression, which cannot match the bracketed IPv6 authority and does not safely preserve URL query or fragment suffixes.
Steps to Reproduce
Expected Behavior
The URL becomes jdbc:clickhouse://[2001:db8::1]:8123/analytics?ssl=true and remains stable on reconnect. Query parameters and ClickHouse fragment tags are preserved.
Actual Behavior
The host and port split does not match the bracketed authority. The implementation appends the bare address and schema to the existing URL, producing a malformed value such as jdbc:clickhouse://[2001:db8::1]:8123/default?ssl=true2001:db8::1:8123/analytics. The bad URL is then written back to ConnectInfo.
Logs
The ClickHouse driver rejects the malformed JDBC URL or connects with the wrong database.
Screenshots or Additional Context
ClickHouse supports schema switching and fragment tags. URL rewriting should replace only the database path while preserving the authority, query, and fragment boundaries.
Impact
IPv6 ClickHouse connections cannot reliably switch databases and reconnect attempts can reuse the corrupted URL.
Workaround
Manually restore the JDBC URL and avoid switching schemas from Chat2DB.
Submission Checklist