Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: clear retained status (#3562)

Liu Jid65c7ecf970a
diff --git a/frontend/src/views/sql-editor/TerminalPanel/TerminalPanel.vue b/frontend/src/views/sql-editor/TerminalPanel/TerminalPanel.vue
index d994b83e29..7286fca627 100644
--- a/frontend/src/views/sql-editor/TerminalPanel/TerminalPanel.vue
+++ b/frontend/src/views/sql-editor/TerminalPanel/TerminalPanel.vue
@@ -92,6 +92,11 @@ const handleExecute = async (
return;
}
+ // Prevent executing empty query;
+ if (!query) {
+ return;
+ }
+
try {
queryItem.executeParams = { query, config, option };
queryItem.isExecutingSQL = true;
@@ -102,6 +107,9 @@ const handleExecute = async (
sql: "",
isExecutingSQL: false,
});
+ // Clear the tab's statement and keep it sync with the latest query
+ tabStore.currentTab.statement = "";
+ tabStore.currentTab.selectedStatement = "";
} finally {
queryItem.isExecutingSQL = false;
}