Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix: ignore errors from clickhouse admin query (#5670)
Danny Xu9842681e8a1f
diff --git a/backend/plugin/db/util/driverutil.go b/backend/plugin/db/util/driverutil.goindex 903918ac90..cc8869caf4 100644--- a/backend/plugin/db/util/driverutil.go+++ b/backend/plugin/db/util/driverutil.go@@ -209,6 +209,10 @@ func Query(ctx context.Context, dbType db.Type, conn *sql.Conn, statement stringfunc queryAdmin(ctx context.Context, dbType db.Type, conn *sql.Conn, statement string, _ int) ([]any, error) {rows, err := conn.QueryContext(ctx, statement)if err != nil {+ // TODO(d): ClickHouse will return "driver: bad connection" if we use non-SELECT statement for Query(). We need to ignore the error.+ if dbType == db.ClickHouse {+ return nil, nil+ }return nil, FormatErrorWithQuery(err, statement)}defer rows.Close()