Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: don't use readonly for clickhouse (#2897)
Danny Xua8a2ef1ca955
diff --git a/plugin/db/util/driverutil.go b/plugin/db/util/driverutil.goindex 385f4933c6..2d8ca2db85 100644--- a/plugin/db/util/driverutil.go+++ b/plugin/db/util/driverutil.go@@ -313,7 +313,8 @@ func Query(ctx context.Context, dbType db.Type, sqldb *sql.DB, statement string,readOnly := true// TiDB doesn't support READ ONLY transactions. We have to skip the flag for it.// https://github.com/pingcap/tidb/issues/34626- if dbType == db.TiDB {+ // Clickhouse doesn't support READ ONLY transactions (Error: sql: driver does not support read-only transactions).+ if dbType == db.TiDB || dbType == db.ClickHouse {readOnly = false}tx, err := sqldb.BeginTx(ctx, &sql.TxOptions{ReadOnly: readOnly})