Skip to content

Commit 6f9472e

Browse files
author
CodeBuddy Attribution Bot
committed
fix(attribution): MCP 工具:MySQL 开通 READY 后 SQL 操作仍超时 - 缺乏数据库就绪检测 (issue_mnry7ddi_rn8emg)
1 parent 4ad9aba commit 6f9472e

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

mcp/src/tools/databaseSQL.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -689,14 +689,21 @@ async function getSqlInstanceInfo({
689689
throw error;
690690
}
691691

692+
const clusterDetailLaggingAfterProvision = createStatus === "READY";
693+
692694
return {
693-
exists: createStatus === "PENDING" || createStatus === "RUNNING",
695+
// The cluster-detail API can lag behind a successful create result.
696+
// Treat that window as an existing instance that is still warming up.
697+
exists:
698+
clusterDetailLaggingAfterProvision ||
699+
createStatus === "PENDING" ||
700+
createStatus === "RUNNING",
694701
envId,
695702
instanceId: "default",
696703
schema: envId,
697704
rawStatus:
698705
typeof createRawStatus === "string" ? createRawStatus : null,
699-
status: createStatus,
706+
status: clusterDetailLaggingAfterProvision ? "PENDING" : createStatus,
700707
createResult: createData ?? createResult,
701708
};
702709
}

0 commit comments

Comments
 (0)