fix(mysql): health-check pooled connection before DDL query
* fix(mysql): health-check pooled connection before DDL query `mysql_ddl` fetched a connection with a raw `pool.get_conn()` and issued `SHOW CREATE TABLE` directly, unlike other read paths (`get_columns`, `list_indexes`, ...) which go through `get_conn_with_health_check`. A pooled connection that went stale while idle (server closed it after its idle timeout, NAT/firewall dropped the TCP state, ...) would then fail on the first DDL request after a period of inactivity, surfacing a low-level connection error that a manual refresh would mask. Route `mysql_ddl` through `get_conn_with_health_check` so stale connections are pinged and replaced before the query runs, matching the rest of the MySQL metadata path. * fix(test): add redis_scan_page_size to ConnectionConfig test helpers `d815a16b` (feat(redis): move scan page size to connections) added `redis_scan_page_size` to `ConnectionConfig` but did not update several struct-literal test helpers, so `cargo clippy --workspace --all-targets` fails with `missing field redis_scan_page_size`. This is a pre-existing breakage on `main` (CI has been red since that commit) and is unrelated to this PR's actual change; included here only to unblock CI. Helpers fixed here: - src-tauri/src/commands/connection.rs (`mongodb_config`) - crates/dbx-web/src/routes/connection.rs (`sqlite_config`)
This commit is contained in:
1 parent
eb664dba4c
commit
82fd078c10
3 files changed
+8
-1
No files matched your search
@@ -248,6 +248,7 @@ mod tests {
|
||||
redis_sentinel_tls: false,
|
||||
redis_cluster_nodes: String::new(),
|
||||
redis_key_separator: dbx_core::models::connection::default_redis_key_separator(),
|
||||
redis_scan_page_size: None,
|
||||
etcd_endpoints: String::new(),
|
||||
gbase_server: String::new(),
|
||||
informix_server: String::new(),
|
||||
|
||||
Reference in new issue
Block a user