fix(mysql): refresh stale snapshots and streamline table reloads
This commit is contained in:
11 files changed
+911
-54
No files matched your search
@@ -5064,9 +5064,10 @@ export const useQueryStore = defineStore("query", () => {
|
||||
return clearInvalidDataTabSortState(tab, tab.tableMeta.columns);
|
||||
}
|
||||
|
||||
function setTableMeta(id: string, meta: NonNullable<QueryTab["tableMeta"]>) {
|
||||
function setTableMeta(id: string, meta: NonNullable<QueryTab["tableMeta"]>, options: { rowIdentityPending?: boolean } = {}) {
|
||||
const tab = tabs.value.find((t) => t.id === id);
|
||||
if (tab) {
|
||||
if (options.rowIdentityPending) tab.tableMetaPending = true;
|
||||
tab.tableMeta = meta;
|
||||
// 记录写入时的连接元数据代次:disconnect/关库/死池重连会使该代次递增,
|
||||
// 代次失配视同冷缓存,即使位于 30s TTL 窗口内也会重建结构(issue #6623 /
|
||||
@@ -5078,7 +5079,7 @@ export const useQueryStore = defineStore("query", () => {
|
||||
// columns/primaryKeys 为空的占位身份(如 useNavigationTargets),不得
|
||||
// 借此提前解除编辑门控。失败/中止路径不清除——标签页保持只读是安全
|
||||
// 兜底,刷新或重开表会重新加载元数据恢复
|
||||
if (meta.columns.length > 0) tab.tableMetaPending = false;
|
||||
if (meta.columns.length > 0 && !options.rowIdentityPending) tab.tableMetaPending = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user