Skip to content

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

fix(frontend): should run sql check before submitting (#10076)

Liu Ji7da1790f79c3
diff --git a/frontend/src/components/SQLCheck/SQLCheckButton.vue b/frontend/src/components/SQLCheck/SQLCheckButton.vue
index 805501fc0d..c2aee843a3 100644
--- a/frontend/src/components/SQLCheck/SQLCheckButton.vue
+++ b/frontend/src/components/SQLCheck/SQLCheckButton.vue
@@ -91,7 +91,6 @@ const { t } = useI18n();
const SKIP_CHECK_THRESHOLD = 512 * 1024;
const isRunning = ref(false);
const advices = ref<Advice[]>();
-const checkRunCounter = ref(0);
const context = useSQLCheckContext();
const confirmDialog = ref<Defer<boolean>>();
@@ -128,7 +127,6 @@ const runCheckInternal = async (statement: string) => {
statement,
database: database.name,
});
- checkRunCounter.value++;
return result;
};
@@ -179,9 +177,7 @@ onMounted(() => {
return true;
}
- if (checkRunCounter.value === 0) {
- await runChecks();
- }
+ await runChecks();
const hasError = advices.value?.some(
(advice) =>