Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

fix(core): guard mq registry cleanup

t8y2693eb0dbb930
diff --git a/crates/dbx-core/src/connection.rs b/crates/dbx-core/src/connection.rs
index 729fc7cd70..2668e24262 100644
--- a/crates/dbx-core/src/connection.rs
+++ b/crates/dbx-core/src/connection.rs
@@ -638,6 +638,8 @@ impl AppState {
pool: PoolKind,
config: &ConnectionConfig,
) {
+ // mq_registry only exists in mq-admin builds; other builds reject MQ connects before a pool is created.
+ #[cfg(feature = "mq-admin")]
if matches!(pool, PoolKind::MessageQueue) {
self.mq_registry.drop_connection(connection_id).await;
}