Skip to content

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

chore: oceanbase 3 readonly (#10836)

Danny Xuff5c37c9fdab
diff --git a/backend/plugin/db/mysql/mysql.go b/backend/plugin/db/mysql/mysql.go
index 7b8c296714..e2612c8de6 100644
--- a/backend/plugin/db/mysql/mysql.go
+++ b/backend/plugin/db/mysql/mysql.go
@@ -157,6 +157,9 @@ func (driver *Driver) getVersion(ctx context.Context) (string, string, error) {
}
func (driver *Driver) getReadOnly() bool {
+ if driver.dbType == storepb.Engine_OCEANBASE {
+ return false
+ }
// MariaDB 5.5 doesn't support READ ONLY transactions.
// Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'READ ONLY' at line 1
v, err := semver.Make(driver.connectionCtx.EngineVersion)
diff --git a/frontend/src/components/IssueV1/components/Sidebar/PreBackupSection/common.ts b/frontend/src/components/IssueV1/components/Sidebar/PreBackupSection/common.ts
index f3d372bfa2..3310c1464b 100644
--- a/frontend/src/components/IssueV1/components/Sidebar/PreBackupSection/common.ts
+++ b/frontend/src/components/IssueV1/components/Sidebar/PreBackupSection/common.ts
@@ -4,10 +4,8 @@ import {
specForTask,
useIssueContext,
} from "@/components/IssueV1/logic";
-import { useActuatorV1Store } from "@/store";
import { Engine } from "@/types/proto/v1/common";
import { Task_Type } from "@/types/proto/v1/rollout_service";
-import { isDev } from "@/utils";
export const usePreBackupContext = () => {
const context = useIssueContext();
@@ -22,11 +20,7 @@ export const usePreBackupContext = () => {
if (engine !== Engine.MYSQL && engine !== Engine.TIDB) {
return false;
}
- if (isDev()) {
- return true;
- }
-
- return useActuatorV1Store().serverInfo?.preUpdateBackup || false;
+ return true;
});
const showPreBackupDisabled = computed((): boolean => {
diff --git a/frontend/src/components/Role/Setting/components/RolePanel.vue b/frontend/src/components/Role/Setting/components/RolePanel.vue
index 1286669ea6..fe0c84c93b 100644
--- a/frontend/src/components/Role/Setting/components/RolePanel.vue
+++ b/frontend/src/components/Role/Setting/components/RolePanel.vue
@@ -47,7 +47,7 @@
</div>
</div>
- <div v-if="isDev()" class="flex flex-col gap-y-2">
+ <div class="flex flex-col gap-y-2">
<div class="w-full flex flex-row justify-between items-center">
<div class="textlabel">
{{ $t("common.permissions") }}
@@ -110,7 +110,7 @@ import {
WORKSPACE_PERMISSIONS,
} from "@/types";
import { Role } from "@/types/proto/v1/role_service";
-import { extractRoleResourceName, isDev } from "@/utils";
+import { extractRoleResourceName } from "@/utils";
import { useCustomRoleSettingContext } from "../context";
import ImportPermissionFromRoleModal from "./ImportPermissionFromRoleModal.vue";
@@ -165,7 +165,7 @@ const allowSave = computed(() => {
if (!resourceIdField.value.resourceId) return false;
if (!resourceIdField.value.isValidated) return false;
}
- if (isDev() && state.role.permissions.length === 0) {
+ if (state.role.permissions.length === 0) {
return false;
}
return true;