Skip to content

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

chore: change unnecessary int64 to int32 (#9108)

p0nyd0ae748c4183
diff --git a/backend/api/v1/database_service.go b/backend/api/v1/database_service.go
index 4ae7d600e7..08f102290b 100644
--- a/backend/api/v1/database_service.go
+++ b/backend/api/v1/database_service.go
@@ -1600,7 +1600,7 @@ func (s *DatabaseService) checkDatabasePermission(ctx context.Context, projectID
type totalValue struct {
totalQueryTime time.Duration
- totalCount int64
+ totalCount int32
}
// ListSlowQueries lists the slow queries.
diff --git a/backend/api/v1/sql_service.go b/backend/api/v1/sql_service.go
index 6b89522f2a..2f53a9b144 100644
--- a/backend/api/v1/sql_service.go
+++ b/backend/api/v1/sql_service.go
@@ -1801,8 +1801,8 @@ func validateQueryRequest(instance *store.InstanceMessage, databaseName string,
if ok {
querySyntaxError, err := status.New(codes.InvalidArgument, err.Error()).WithDetails(
&v1pb.PlanCheckRun_Result_SqlReviewReport{
- Line: int64(syntaxErr.Line),
- Column: int64(syntaxErr.Column),
+ Line: int32(syntaxErr.Line),
+ Column: int32(syntaxErr.Column),
Detail: syntaxErr.Message,
},
)
diff --git a/backend/common/error.go b/backend/common/error.go
index adff2f49a7..575c907bd1 100644
--- a/backend/common/error.go
+++ b/backend/common/error.go
@@ -55,9 +55,9 @@ func (c Code) Int() int {
return int(c)
}
-// Int64 returns the int64 type of code.
-func (c Code) Int64() int64 {
- return int64(c)
+// Int32 returns the int32 type of code.
+func (c Code) Int32() int32 {
+ return int32(c)
}
// Error represents an application-specific error. Application errors can be
diff --git a/backend/plugin/advisor/code.go b/backend/plugin/advisor/code.go
index ad4d2b992b..ed19b03d1b 100644
--- a/backend/plugin/advisor/code.go
+++ b/backend/plugin/advisor/code.go
@@ -144,7 +144,7 @@ func (c Code) Int() int {
return int(c)
}
-// Int64 returns the int64 type of code.
-func (c Code) Int64() int64 {
- return int64(c)
+// Int32 returns the int32 type of code.
+func (c Code) Int32() int32 {
+ return int32(c)
}
diff --git a/backend/plugin/db/pg/sync.go b/backend/plugin/db/pg/sync.go
index 3f49e004a0..cd4ae879ef 100644
--- a/backend/plugin/db/pg/sync.go
+++ b/backend/plugin/db/pg/sync.go
@@ -732,10 +732,10 @@ func (driver *Driver) SyncSlowQuery(ctx context.Context, _ time.Time) (map[strin
for slowQueryStatisticsRows.Next() {
var database string
var fingerprint string
- var calls int64
+ var calls int32
var totalExecTime float64
var maxExecTime float64
- var rows int64
+ var rows int32
if err := slowQueryStatisticsRows.Scan(&database, &fingerprint, &calls, &totalExecTime, &maxExecTime, &rows); err != nil {
return nil, err
}
diff --git a/backend/runner/approval/runner.go b/backend/runner/approval/runner.go
index e49b4d356d..79044211cb 100644
--- a/backend/runner/approval/runner.go
+++ b/backend/runner/approval/runner.go
@@ -288,7 +288,7 @@ func (r *Runner) findApprovalTemplateForIssue(ctx context.Context, issue *store.
return true, nil
}
-func getApprovalTemplate(approvalSetting *storepb.WorkspaceApprovalSetting, riskLevel int64, riskSource store.RiskSource) (*storepb.ApprovalTemplate, error) {
+func getApprovalTemplate(approvalSetting *storepb.WorkspaceApprovalSetting, riskLevel int32, riskSource store.RiskSource) (*storepb.ApprovalTemplate, error) {
e, err := cel.NewEnv(common.ApprovalFactors...)
if err != nil {
return nil, err
@@ -326,7 +326,7 @@ func getApprovalTemplate(approvalSetting *storepb.WorkspaceApprovalSetting, risk
return nil, nil
}
-func getIssueRisk(ctx context.Context, s *store.Store, licenseService enterprise.LicenseService, dbFactory *dbfactory.DBFactory, issue *store.IssueMessage, risks []*store.RiskMessage) (int64, store.RiskSource, bool, error) {
+func getIssueRisk(ctx context.Context, s *store.Store, licenseService enterprise.LicenseService, dbFactory *dbfactory.DBFactory, issue *store.IssueMessage, risks []*store.RiskMessage) (int32, store.RiskSource, bool, error) {
switch issue.Type {
case api.IssueGrantRequest:
return getGrantRequestIssueRisk(ctx, s, issue, risks)
@@ -337,7 +337,7 @@ func getIssueRisk(ctx context.Context, s *store.Store, licenseService enterprise
}
}
-func getDatabaseGeneralIssueRisk(ctx context.Context, s *store.Store, licenseService enterprise.LicenseService, dbFactory *dbfactory.DBFactory, issue *store.IssueMessage, risks []*store.RiskMessage) (int64, store.RiskSource, bool, error) {
+func getDatabaseGeneralIssueRisk(ctx context.Context, s *store.Store, licenseService enterprise.LicenseService, dbFactory *dbfactory.DBFactory, issue *store.IssueMessage, risks []*store.RiskMessage) (int32, store.RiskSource, bool, error) {
if issue.PlanUID == nil {
return 0, store.RiskSourceUnknown, false, errors.Errorf("expected plan UID in issue %v", issue.UID)
}
@@ -413,7 +413,7 @@ func getDatabaseGeneralIssueRisk(ctx context.Context, s *store.Store, licenseSer
return 0, store.RiskSourceUnknown, false, err
}
- var maxRiskLevel int64
+ var maxRiskLevel int32
for _, stage := range pipelineCreate.Stages {
for _, task := range stage.TaskList {
instance, err := s.GetInstanceV2(ctx, &store.FindInstanceMessage{
@@ -448,7 +448,7 @@ func getDatabaseGeneralIssueRisk(ctx context.Context, s *store.Store, licenseSer
environmentID = database.EffectiveEnvironmentID
}
- risk, err := func() (int64, error) {
+ risk, err := func() (int32, error) {
for _, risk := range risks {
if !risk.Active {
continue
@@ -533,7 +533,7 @@ func getDatabaseGeneralIssueRisk(ctx context.Context, s *store.Store, licenseSer
return maxRiskLevel, riskSource, true, nil
}
-func getGrantRequestIssueRisk(ctx context.Context, s *store.Store, issue *store.IssueMessage, risks []*store.RiskMessage) (int64, store.RiskSource, bool, error) {
+func getGrantRequestIssueRisk(ctx context.Context, s *store.Store, issue *store.IssueMessage, risks []*store.RiskMessage) (int32, store.RiskSource, bool, error) {
payload := issue.Payload
if payload.GrantRequest == nil {
return 0, store.RiskSourceUnknown, false, errors.New("grant request payload not found")
@@ -605,7 +605,7 @@ func getGrantRequestIssueRisk(ctx context.Context, s *store.Store, issue *store.
}
}
- var maxRisk int64
+ var maxRisk int32
for _, risk := range risks {
if !risk.Active {
continue
diff --git a/backend/runner/mail/slow_query_weekly_mail.go b/backend/runner/mail/slow_query_weekly_mail.go
index e4ccf861f7..8e27ce63b6 100644
--- a/backend/runner/mail/slow_query_weekly_mail.go
+++ b/backend/runner/mail/slow_query_weekly_mail.go
@@ -397,7 +397,7 @@ func (s *SlowQueryWeeklyMailSender) generateWeeklyEmailForProject(ctx context.Co
type totalValue struct {
totalQueryTime time.Duration
- totalCount int64
+ totalCount int32
}
func durationText(duration *durationpb.Duration) string {
diff --git a/backend/runner/plancheck/database_connect_executor.go b/backend/runner/plancheck/database_connect_executor.go
index 51027a1457..c05ab3056a 100644
--- a/backend/runner/plancheck/database_connect_executor.go
+++ b/backend/runner/plancheck/database_connect_executor.go
@@ -62,14 +62,14 @@ func (e *DatabaseConnectExecutor) checkDatabaseConnection(ctx context.Context, i
if err != nil {
return &storepb.PlanCheckRunResult_Result{
Status: storepb.PlanCheckRunResult_Result_ERROR,
- Code: common.DbConnectionFailure.Int64(),
+ Code: common.DbConnectionFailure.Int32(),
Title: fmt.Sprintf("Failed to connect %q", database.DatabaseName),
Content: err.Error(),
}
}
return &storepb.PlanCheckRunResult_Result{
Status: storepb.PlanCheckRunResult_Result_SUCCESS,
- Code: common.Ok.Int64(),
+ Code: common.Ok.Int32(),
Title: "OK",
Content: fmt.Sprintf("Successfully connected %q", database.DatabaseName),
}
diff --git a/backend/runner/plancheck/ghost_sync_executor.go b/backend/runner/plancheck/ghost_sync_executor.go
index ace7be1169..fc2fa7ba4e 100644
--- a/backend/runner/plancheck/ghost_sync_executor.go
+++ b/backend/runner/plancheck/ghost_sync_executor.go
@@ -46,7 +46,7 @@ func (e *GhostSyncExecutor) Run(ctx context.Context, config *storepb.PlanCheckRu
Status: storepb.PlanCheckRunResult_Result_ERROR,
Title: "gh-ost dry run failed",
Content: panicErr.Error(),
- Code: common.Internal.Int64(),
+ Code: common.Internal.Int32(),
Report: nil,
},
}
@@ -115,7 +115,7 @@ func (e *GhostSyncExecutor) Run(ctx context.Context, config *storepb.PlanCheckRu
Status: storepb.PlanCheckRunResult_Result_ERROR,
Title: "gh-ost dry run failed",
Content: err.Error(),
- Code: common.Internal.Int64(),
+ Code: common.Internal.Int32(),
Report: nil,
},
}, nil
@@ -126,7 +126,7 @@ func (e *GhostSyncExecutor) Run(ctx context.Context, config *storepb.PlanCheckRu
Status: storepb.PlanCheckRunResult_Result_SUCCESS,
Title: "OK",
Content: "gh-ost dry run succeeded",
- Code: common.Ok.Int64(),
+ Code: common.Ok.Int32(),
Report: nil,
},
}, nil
diff --git a/backend/runner/plancheck/pitr_mysql_executor.go b/backend/runner/plancheck/pitr_mysql_executor.go
index dfbe183079..024783ef6f 100644
--- a/backend/runner/plancheck/pitr_mysql_executor.go
+++ b/backend/runner/plancheck/pitr_mysql_executor.go
@@ -67,7 +67,7 @@ func (e *PITRMySQLExecutor) Run(ctx context.Context, config *storepb.PlanCheckRu
return []*storepb.PlanCheckRunResult_Result{
{
Status: storepb.PlanCheckRunResult_Result_SUCCESS,
- Code: common.Ok.Int64(),
+ Code: common.Ok.Int32(),
Title: "OK",
Content: "Ready to do PITR",
},
@@ -78,7 +78,7 @@ func convertErrorToResult(err error) []*storepb.PlanCheckRunResult_Result {
return []*storepb.PlanCheckRunResult_Result{
{
Status: storepb.PlanCheckRunResult_Result_ERROR,
- Code: common.Internal.Int64(),
+ Code: common.Internal.Int32(),
Title: "Error",
Content: err.Error(),
},
diff --git a/backend/runner/plancheck/statement_advise_executor.go b/backend/runner/plancheck/statement_advise_executor.go
index 2b761eaa08..7e6fd20b8c 100644
--- a/backend/runner/plancheck/statement_advise_executor.go
+++ b/backend/runner/plancheck/statement_advise_executor.go
@@ -64,7 +64,7 @@ func (e *StatementAdviseExecutor) runForDatabaseTarget(ctx context.Context, conf
return []*storepb.PlanCheckRunResult_Result{
{
Status: storepb.PlanCheckRunResult_Result_SUCCESS,
- Code: common.Ok.Int64(),
+ Code: common.Ok.Int32(),
Title: fmt.Sprintf("Statement advise is not supported for %s", instance.Engine),
Content: "",
},
@@ -99,7 +99,7 @@ func (e *StatementAdviseExecutor) runForDatabaseTarget(ctx context.Context, conf
SqlReviewReport: &storepb.PlanCheckRunResult_Result_SqlReviewReport{
Line: 0,
Detail: "",
- Code: advisor.Unsupported.Int64(),
+ Code: advisor.Unsupported.Int32(),
},
},
},
@@ -123,7 +123,7 @@ func (e *StatementAdviseExecutor) runForDatabaseTarget(ctx context.Context, conf
return []*storepb.PlanCheckRunResult_Result{
{
Status: storepb.PlanCheckRunResult_Result_SUCCESS,
- Code: common.Ok.Int64(),
+ Code: common.Ok.Int32(),
Title: "Large SQL review policy is disabled",
Content: "",
},
@@ -191,9 +191,9 @@ func (e *StatementAdviseExecutor) runForDatabaseTarget(ctx context.Context, conf
Code: 0,
Report: &storepb.PlanCheckRunResult_Result_SqlReviewReport_{
SqlReviewReport: &storepb.PlanCheckRunResult_Result_SqlReviewReport{
- Line: int64(advice.Line),
- Column: int64(advice.Column),
- Code: advice.Code.Int64(),
+ Line: int32(advice.Line),
+ Column: int32(advice.Column),
+ Code: advice.Code.Int32(),
Detail: advice.Details,
},
},
@@ -206,7 +206,7 @@ func (e *StatementAdviseExecutor) runForDatabaseTarget(ctx context.Context, conf
Status: storepb.PlanCheckRunResult_Result_SUCCESS,
Title: "OK",
Content: "",
- Code: common.Ok.Int64(),
+ Code: common.Ok.Int32(),
Report: nil,
},
}, nil
@@ -265,7 +265,7 @@ func (e *StatementAdviseExecutor) runForDatabaseGroupTarget(ctx context.Context,
return []*storepb.PlanCheckRunResult_Result{
{
Status: storepb.PlanCheckRunResult_Result_SUCCESS,
- Code: common.Ok.Int64(),
+ Code: common.Ok.Int32(),
Title: "Large SQL review policy is disabled",
Content: "",
},
@@ -313,7 +313,7 @@ func (e *StatementAdviseExecutor) runForDatabaseGroupTarget(ctx context.Context,
SqlReviewReport: &storepb.PlanCheckRunResult_Result_SqlReviewReport{
Line: 0,
Detail: "",
- Code: advisor.Unsupported.Int64(),
+ Code: advisor.Unsupported.Int32(),
},
},
},
@@ -403,9 +403,9 @@ func (e *StatementAdviseExecutor) runForDatabaseGroupTarget(ctx context.Context,
Code: 0,
Report: &storepb.PlanCheckRunResult_Result_SqlReviewReport_{
SqlReviewReport: &storepb.PlanCheckRunResult_Result_SqlReviewReport{
- Line: int64(advice.Line),
- Column: int64(advice.Column),
- Code: advice.Code.Int64(),
+ Line: int32(advice.Line),
+ Column: int32(advice.Column),
+ Code: advice.Code.Int32(),
Detail: advice.Details,
},
},
@@ -418,7 +418,7 @@ func (e *StatementAdviseExecutor) runForDatabaseGroupTarget(ctx context.Context,
Status: storepb.PlanCheckRunResult_Result_ERROR,
Title: "Failed to run SQL review",
Content: err.Error(),
- Code: common.Internal.Int64(),
+ Code: common.Internal.Int32(),
Report: nil,
})
} else {
@@ -433,7 +433,7 @@ func (e *StatementAdviseExecutor) runForDatabaseGroupTarget(ctx context.Context,
Status: storepb.PlanCheckRunResult_Result_SUCCESS,
Title: "OK",
Content: "",
- Code: common.Ok.Int64(),
+ Code: common.Ok.Int32(),
Report: nil,
},
}, nil
diff --git a/backend/runner/plancheck/statement_report_executor.go b/backend/runner/plancheck/statement_report_executor.go
index 90f97928e3..951bee5aa4 100644
--- a/backend/runner/plancheck/statement_report_executor.go
+++ b/backend/runner/plancheck/statement_report_executor.go
@@ -63,7 +63,7 @@ func (e *StatementReportExecutor) runForDatabaseTarget(ctx context.Context, conf
return []*storepb.PlanCheckRunResult_Result{
{
Status: storepb.PlanCheckRunResult_Result_SUCCESS,
- Code: common.Ok.Int64(),
+ Code: common.Ok.Int32(),
Title: fmt.Sprintf("Statement advise is not supported for %s", instance.Engine),
Content: "",
},
@@ -101,7 +101,7 @@ func (e *StatementReportExecutor) runForDatabaseTarget(ctx context.Context, conf
return []*storepb.PlanCheckRunResult_Result{
{
Status: storepb.PlanCheckRunResult_Result_SUCCESS,
- Code: common.Ok.Int64(),
+ Code: common.Ok.Int32(),
Title: "Report for large SQL is not supported",
Content: "",
},
@@ -149,7 +149,7 @@ func (e *StatementReportExecutor) runForDatabaseTarget(ctx context.Context, conf
return []*storepb.PlanCheckRunResult_Result{
{
Status: storepb.PlanCheckRunResult_Result_SUCCESS,
- Code: common.Ok.Int64(),
+ Code: common.Ok.Int32(),
Title: "Not available",
Content: fmt.Sprintf("Report is not supported for %s", instance.Engine),
},
@@ -206,7 +206,7 @@ func (e *StatementReportExecutor) runForDatabaseGroupTarget(ctx context.Context,
return []*storepb.PlanCheckRunResult_Result{
{
Status: storepb.PlanCheckRunResult_Result_SUCCESS,
- Code: common.Ok.Int64(),
+ Code: common.Ok.Int32(),
Title: "Large SQL review policy is disabled",
Content: "",
},
@@ -311,7 +311,7 @@ func (e *StatementReportExecutor) runForDatabaseGroupTarget(ctx context.Context,
Status: storepb.PlanCheckRunResult_Result_ERROR,
Title: "Failed to run report executor",
Content: err.Error(),
- Code: common.Internal.Int64(),
+ Code: common.Internal.Int32(),
Report: nil,
})
} else {
@@ -326,7 +326,7 @@ func (e *StatementReportExecutor) runForDatabaseGroupTarget(ctx context.Context,
Status: storepb.PlanCheckRunResult_Result_SUCCESS,
Title: "OK",
Content: "",
- Code: common.Ok.Int64(),
+ Code: common.Ok.Int32(),
Report: nil,
},
}, nil
@@ -347,7 +347,7 @@ func reportForOracle(databaseName string, schemaName string, statement string) (
Code: 0,
Report: &storepb.PlanCheckRunResult_Result_SqlSummaryReport_{
SqlSummaryReport: &storepb.PlanCheckRunResult_Result_SqlSummaryReport{
- Code: advisor.StatementSyntaxError.Int64(),
+ Code: advisor.StatementSyntaxError.Int32(),
},
},
},
@@ -371,7 +371,7 @@ func reportForOracle(databaseName string, schemaName string, statement string) (
return []*storepb.PlanCheckRunResult_Result{
{
Status: storepb.PlanCheckRunResult_Result_SUCCESS,
- Code: common.Ok.Int64(),
+ Code: common.Ok.Int32(),
Title: "OK",
Report: &storepb.PlanCheckRunResult_Result_SqlSummaryReport_{
SqlSummaryReport: &storepb.PlanCheckRunResult_Result_SqlSummaryReport{
@@ -399,7 +399,7 @@ func reportForMySQL(ctx context.Context, sqlDB *sql.DB, engine storepb.Engine, d
Code: 0,
Report: &storepb.PlanCheckRunResult_Result_SqlSummaryReport_{
SqlSummaryReport: &storepb.PlanCheckRunResult_Result_SqlSummaryReport{
- Code: advisor.StatementSyntaxError.Int64(),
+ Code: advisor.StatementSyntaxError.Int32(),
},
},
},
@@ -461,12 +461,12 @@ func reportForMySQL(ctx context.Context, sqlDB *sql.DB, engine storepb.Engine, d
return []*storepb.PlanCheckRunResult_Result{
{
Status: storepb.PlanCheckRunResult_Result_SUCCESS,
- Code: common.Ok.Int64(),
+ Code: common.Ok.Int32(),
Title: "OK",
Report: &storepb.PlanCheckRunResult_Result_SqlSummaryReport_{
SqlSummaryReport: &storepb.PlanCheckRunResult_Result_SqlSummaryReport{
StatementTypes: sqlTypes,
- AffectedRows: totalAffectedRows,
+ AffectedRows: int32(totalAffectedRows),
ChangedResources: convertToChangedResources(changedResources),
},
},
@@ -512,7 +512,7 @@ func reportForPostgres(ctx context.Context, sqlDB *sql.DB, database, statement s
Code: 0,
Report: &storepb.PlanCheckRunResult_Result_SqlSummaryReport_{
SqlSummaryReport: &storepb.PlanCheckRunResult_Result_SqlSummaryReport{
- Code: advisor.StatementSyntaxError.Int64(),
+ Code: advisor.StatementSyntaxError.Int32(),
},
},
},
@@ -551,12 +551,12 @@ func reportForPostgres(ctx context.Context, sqlDB *sql.DB, database, statement s
return []*storepb.PlanCheckRunResult_Result{
{
Status: storepb.PlanCheckRunResult_Result_SUCCESS,
- Code: common.Ok.Int64(),
+ Code: common.Ok.Int32(),
Title: "OK",
Report: &storepb.PlanCheckRunResult_Result_SqlSummaryReport_{
SqlSummaryReport: &storepb.PlanCheckRunResult_Result_SqlSummaryReport{
StatementTypes: sqlTypes,
- AffectedRows: totalAffectedRows,
+ AffectedRows: int32(totalAffectedRows),
ChangedResources: convertToChangedResources(changedResources),
},
},
diff --git a/backend/runner/plancheck/statement_type_executor.go b/backend/runner/plancheck/statement_type_executor.go
index ba9d2ca0e7..a214f31228 100644
--- a/backend/runner/plancheck/statement_type_executor.go
+++ b/backend/runner/plancheck/statement_type_executor.go
@@ -66,7 +66,7 @@ func (e *StatementTypeExecutor) runForDatabaseTarget(ctx context.Context, config
return []*storepb.PlanCheckRunResult_Result{
{
Status: storepb.PlanCheckRunResult_Result_SUCCESS,
- Code: common.Ok.Int64(),
+ Code: common.Ok.Int32(),
Title: fmt.Sprintf("Statement advise is not supported for %s", instance.Engine),
Content: "",
},
@@ -101,7 +101,7 @@ func (e *StatementTypeExecutor) runForDatabaseTarget(ctx context.Context, config
return []*storepb.PlanCheckRunResult_Result{
{
Status: storepb.PlanCheckRunResult_Result_SUCCESS,
- Code: common.Ok.Int64(),
+ Code: common.Ok.Int32(),
Title: "Large SQL review policy is disabled",
Content: "",
},
@@ -148,7 +148,7 @@ func (e *StatementTypeExecutor) runForDatabaseTarget(ctx context.Context, config
Status: storepb.PlanCheckRunResult_Result_SUCCESS,
Title: "OK",
Content: "",
- Code: common.Ok.Int64(),
+ Code: common.Ok.Int32(),
Report: nil,
},
}, nil
@@ -209,7 +209,7 @@ func (e *StatementTypeExecutor) runForDatabaseGroupTarget(ctx context.Context, c
return []*storepb.PlanCheckRunResult_Result{
{
Status: storepb.PlanCheckRunResult_Result_SUCCESS,
- Code: common.Ok.Int64(),
+ Code: common.Ok.Int32(),
Title: "Large SQL review policy is disabled",
Content: "",
},
@@ -311,7 +311,7 @@ func (e *StatementTypeExecutor) runForDatabaseGroupTarget(ctx context.Context, c
Status: storepb.PlanCheckRunResult_Result_ERROR,
Title: "Failed to run statement type check",
Content: err.Error(),
- Code: common.Internal.Int64(),
+ Code: common.Internal.Int32(),
Report: nil,
})
} else {
@@ -326,7 +326,7 @@ func (e *StatementTypeExecutor) runForDatabaseGroupTarget(ctx context.Context, c
Status: storepb.PlanCheckRunResult_Result_SUCCESS,
Title: "OK",
Content: "",
- Code: common.Ok.Int64(),
+ Code: common.Ok.Int32(),
Report: nil,
},
}, nil
@@ -364,12 +364,12 @@ func (e *StatementTypeExecutor) mysqlSDLTypeCheck(ctx context.Context, newSchema
for _, table := range node.Tables {
results = append(results, &storepb.PlanCheckRunResult_Result{
Status: storepb.PlanCheckRunResult_Result_WARNING,
- Code: common.TaskTypeDropTable.Int64(),
+ Code: common.TaskTypeDropTable.Int32(),
Title: "Plan to drop table",
Content: fmt.Sprintf("Plan to drop table `%s`", table.Name.O),
Report: &storepb.PlanCheckRunResult_Result_SqlReviewReport_{
SqlReviewReport: &storepb.PlanCheckRunResult_Result_SqlReviewReport{
- Line: int64(stmt.LastLine),
+ Line: int32(stmt.LastLine),
Detail: "",
Code: 0,
},
@@ -379,12 +379,12 @@ func (e *StatementTypeExecutor) mysqlSDLTypeCheck(ctx context.Context, newSchema
case *tidbast.DropIndexStmt:
results = append(results, &storepb.PlanCheckRunResult_Result{
Status: storepb.PlanCheckRunResult_Result_WARNING,
- Code: common.TaskTypeDropIndex.Int64(),
+ Code: common.TaskTypeDropIndex.Int32(),
Title: "Plan to drop index",
Content: fmt.Sprintf("Plan to drop index `%s` on table `%s`", node.IndexName, node.Table.Name.O),
Report: &storepb.PlanCheckRunResult_Result_SqlReviewReport_{
SqlReviewReport: &storepb.PlanCheckRunResult_Result_SqlReviewReport{
- Line: int64(stmt.LastLine),
+ Line: int32(stmt.LastLine),
Detail: "",
Code: 0,
},
@@ -396,12 +396,12 @@ func (e *StatementTypeExecutor) mysqlSDLTypeCheck(ctx context.Context, newSchema
case tidbast.AlterTableDropColumn:
results = append(results, &storepb.PlanCheckRunResult_Result{
Status: storepb.PlanCheckRunResult_Result_WARNING,
- Code: common.TaskTypeDropColumn.Int64(),
+ Code: common.TaskTypeDropColumn.Int32(),
Title: "Plan to drop column",
Content: fmt.Sprintf("Plan to drop column `%s` on table `%s`", spec.OldColumnName.Name.O, node.Table.Name.O),
Report: &storepb.PlanCheckRunResult_Result_SqlReviewReport_{
SqlReviewReport: &storepb.PlanCheckRunResult_Result_SqlReviewReport{
- Line: int64(stmt.LastLine),
+ Line: int32(stmt.LastLine),
Detail: "",
Code: 0,
},
@@ -410,12 +410,12 @@ func (e *StatementTypeExecutor) mysqlSDLTypeCheck(ctx context.Context, newSchema
case tidbast.AlterTableDropPrimaryKey:
results = append(results, &storepb.PlanCheckRunResult_Result{
Status: storepb.PlanCheckRunResult_Result_WARNING,
- Code: common.TaskTypeDropPrimaryKey.Int64(),
+ Code: common.TaskTypeDropPrimaryKey.Int32(),
Title: "Plan to drop primary key",
Content: fmt.Sprintf("Plan to drop primary key on table `%s`", node.Table.Name.O),
Report: &storepb.PlanCheckRunResult_Result_SqlReviewReport_{
SqlReviewReport: &storepb.PlanCheckRunResult_Result_SqlReviewReport{
- Line: int64(stmt.LastLine),
+ Line: int32(stmt.LastLine),
Detail: "",
Code: 0,
},
@@ -424,12 +424,12 @@ func (e *StatementTypeExecutor) mysqlSDLTypeCheck(ctx context.Context, newSchema
case tidbast.AlterTableDropForeignKey:
results = append(results, &storepb.PlanCheckRunResult_Result{
Status: storepb.PlanCheckRunResult_Result_WARNING,
- Code: common.TaskTypeDropForeignKey.Int64(),
+ Code: common.TaskTypeDropForeignKey.Int32(),
Title: "Plan to drop foreign key",
Content: fmt.Sprintf("Plan to drop foreign key `%s` on table `%s`", spec.Name, node.Table.Name.O),
Report: &storepb.PlanCheckRunResult_Result_SqlReviewReport_{
SqlReviewReport: &storepb.PlanCheckRunResult_Result_SqlReviewReport{
- Line: int64(stmt.LastLine),
+ Line: int32(stmt.LastLine),
Detail: "",
Code: 0,
},
@@ -438,12 +438,12 @@ func (e *StatementTypeExecutor) mysqlSDLTypeCheck(ctx context.Context, newSchema
case tidbast.AlterTableDropCheck:
results = append(results, &storepb.PlanCheckRunResult_Result{
Status: storepb.PlanCheckRunResult_Result_WARNING,
- Code: common.TaskTypeDropCheck.Int64(),
+ Code: common.TaskTypeDropCheck.Int32(),
Title: "Plan to drop check constraint",
Content: fmt.Sprintf("Plan to drop check constraint `%s` on table `%s`", spec.Constraint.Name, node.Table.Name.O),
Report: &storepb.PlanCheckRunResult_Result_SqlReviewReport_{
SqlReviewReport: &storepb.PlanCheckRunResult_Result_SqlReviewReport{
- Line: int64(stmt.LastLine),
+ Line: int32(stmt.LastLine),
Detail: "",
Code: 0,
},
@@ -463,14 +463,14 @@ func mysqlCreateAndDropDatabaseCheck(nodeList []tidbast.StmtNode) []*storepb.Pla
case *tidbast.DropDatabaseStmt:
results = append(results, &storepb.PlanCheckRunResult_Result{
Status: storepb.PlanCheckRunResult_Result_ERROR,
- Code: common.TaskTypeDropDatabase.Int64(),
+ Code: common.TaskTypeDropDatabase.Int32(),
Title: "Cannot drop database",
Content: fmt.Sprintf(`The statement "%s" drops database`, node.Text()),
})
case *tidbast.CreateDatabaseStmt:
results = append(results, &storepb.PlanCheckRunResult_Result{
Status: storepb.PlanCheckRunResult_Result_ERROR,
- Code: common.TaskTypeCreateDatabase.Int64(),
+ Code: common.TaskTypeCreateDatabase.Int32(),
Title: "Cannot create database",
Content: fmt.Sprintf(`The statement "%s" creates database`, node.Text()),
})
@@ -496,7 +496,7 @@ func mysqlStatementTypeCheck(statement string, charset string, collation string,
SqlReviewReport: &storepb.PlanCheckRunResult_Result_SqlReviewReport{
Line: 0,
Detail: "",
- Code: advisor.StatementSyntaxError.Int64(),
+ Code: advisor.StatementSyntaxError.Int32(),
},
},
},
@@ -524,7 +524,7 @@ func mysqlStatementTypeCheck(statement string, charset string, collation string,
SqlReviewReport: &storepb.PlanCheckRunResult_Result_SqlReviewReport{
Line: 0,
Detail: "",
- Code: advisor.StatementSyntaxError.Int64(),
+ Code: advisor.StatementSyntaxError.Int32(),
},
},
},
@@ -547,7 +547,7 @@ func mysqlStatementTypeCheck(statement string, charset string, collation string,
Status: storepb.PlanCheckRunResult_Result_WARNING,
Title: "Data change can only run DML",
Content: fmt.Sprintf("\"%s\" is not DML", node.Text()),
- Code: common.TaskTypeNotDML.Int64(),
+ Code: common.TaskTypeNotDML.Int32(),
Report: nil,
})
}
@@ -561,7 +561,7 @@ func mysqlStatementTypeCheck(statement string, charset string, collation string,
Status: storepb.PlanCheckRunResult_Result_WARNING,
Title: "Alter schema can only run DDL",
Content: fmt.Sprintf("\"%s\" is not DDL", node.Text()),
- Code: common.TaskTypeNotDDL.Int64(),
+ Code: common.TaskTypeNotDDL.Int32(),
Report: nil,
})
}
@@ -580,7 +580,7 @@ func postgresqlCreateAndDropDatabaseCheck(nodeList []ast.Node) []*storepb.PlanCh
case *ast.DropDatabaseStmt:
result = append(result, &storepb.PlanCheckRunResult_Result{
Status: storepb.PlanCheckRunResult_Result_ERROR,
- Code: common.TaskTypeDropDatabase.Int64(),
+ Code: common.TaskTypeDropDatabase.Int32(),
Title: "Cannot drop database",
Content: fmt.Sprintf(`The statement "%s" drops database`, node.Text()),
Report: nil,
@@ -588,7 +588,7 @@ func postgresqlCreateAndDropDatabaseCheck(nodeList []ast.Node) []*storepb.PlanCh
case *ast.CreateDatabaseStmt:
result = append(result, &storepb.PlanCheckRunResult_Result{
Status: storepb.PlanCheckRunResult_Result_ERROR,
- Code: common.TaskTypeCreateDatabase.Int64(),
+ Code: common.TaskTypeCreateDatabase.Int32(),
Title: "Cannot create database",
Content: fmt.Sprintf(`The statement "%s" creates database`, node.Text()),
Report: nil,
@@ -612,7 +612,7 @@ func postgresqlStatementTypeCheck(statement string, changeType storepb.PlanCheck
SqlReviewReport: &storepb.PlanCheckRunResult_Result_SqlReviewReport{
Line: 0,
Detail: "",
- Code: advisor.StatementSyntaxError.Int64(),
+ Code: advisor.StatementSyntaxError.Int32(),
},
},
},
@@ -635,7 +635,7 @@ func postgresqlStatementTypeCheck(statement string, changeType storepb.PlanCheck
Status: storepb.PlanCheckRunResult_Result_WARNING,
Title: "Data change can only run DML",
Content: fmt.Sprintf("\"%s\" is not DML", node.Text()),
- Code: common.TaskTypeNotDML.Int64(),
+ Code: common.TaskTypeNotDML.Int32(),
Report: nil,
})
}
@@ -650,7 +650,7 @@ func postgresqlStatementTypeCheck(statement string, changeType storepb.PlanCheck
Status: storepb.PlanCheckRunResult_Result_WARNING,
Title: "Alter schema can only run DDL",
Content: fmt.Sprintf("\"%s\" is not DDL", node.Text()),
- Code: common.TaskTypeNotDDL.Int64(),
+ Code: common.TaskTypeNotDDL.Int32(),
Report: nil,
})
}
diff --git a/backend/store/risk.go b/backend/store/risk.go
index b9a8e10b7e..88522b358e 100644
--- a/backend/store/risk.go
+++ b/backend/store/risk.go
@@ -34,7 +34,7 @@ const (
// RiskMessage is the message for risks.
type RiskMessage struct {
Source RiskSource
- Level int64
+ Level int32
Name string
Active bool
Expression *expr.Expr // *v1alpha1.ParsedExpr
@@ -48,7 +48,7 @@ type RiskMessage struct {
type UpdateRiskMessage struct {
Name *string
Active *bool
- Level *int64
+ Level *int32
Expression *expr.Expr
RowStatus *api.RowStatus
}
diff --git a/backend/store/slow_query.go b/backend/store/slow_query.go
index 6e7931f69f..b2a67ba947 100644
--- a/backend/store/slow_query.go
+++ b/backend/store/slow_query.go
@@ -51,8 +51,8 @@ func (s *Store) ListSlowQuery(ctx context.Context, list *ListSlowQueryMessage) (
type slowQueryLogValue struct {
log *v1pb.SlowQueryLog
totalQueryTime time.Duration
- totalRowsSent int64
- totalRowsExamined int64
+ totalRowsSent int32
+ totalRowsExamined int32
}
func (*Store) listSlowQueryImpl(ctx context.Context, tx *Tx, list *ListSlowQueryMessage) ([]*v1pb.SlowQueryLog, error) {
@@ -182,8 +182,8 @@ func (*Store) listSlowQueryImpl(ctx context.Context, tx *Tx, list *ListSlowQuery
func calculateStatistics(value *slowQueryLogValue) *v1pb.SlowQueryLog {
result := value.log
result.Statistics.AverageQueryTime = durationpb.New(value.totalQueryTime / time.Duration(result.Statistics.Count))
- result.Statistics.AverageRowsSent = int64(value.totalRowsSent / result.Statistics.Count)
- result.Statistics.AverageRowsExamined = int64(value.totalRowsExamined / result.Statistics.Count)
+ result.Statistics.AverageRowsSent = value.totalRowsSent / result.Statistics.Count
+ result.Statistics.AverageRowsExamined = value.totalRowsExamined / result.Statistics.Count
return result
}
diff --git a/backend/tests/sensitive_data_test.go b/backend/tests/sensitive_data_test.go
index 0c50322f06..04068c40a8 100644
--- a/backend/tests/sensitive_data_test.go
+++ b/backend/tests/sensitive_data_test.go
@@ -158,8 +158,8 @@ func TestSensitiveData(t *testing.T) {
a.Len(st.Details(), 1)
report, ok := st.Details()[0].(*v1pb.PlanCheckRun_Result_SqlReviewReport)
a.True(ok)
- a.Equal(int64(1), report.Line)
- a.Equal(int64(13), report.Column)
+ a.Equal(int32(1), report.Line)
+ a.Equal(int32(13), report.Column)
a.Equal("Syntax error at line 1:13 \nrelated text: SELECT hello TO", report.Detail)
sheet, err := ctl.sheetServiceClient.CreateSheet(ctx, &v1pb.CreateSheetRequest{
diff --git a/frontend/src/types/proto/store/plan_check_run.ts b/frontend/src/types/proto/store/plan_check_run.ts
index 2bc6930aee..3c38010ee7 100644
--- a/frontend/src/types/proto/store/plan_check_run.ts
+++ b/frontend/src/types/proto/store/plan_check_run.ts
@@ -455,7 +455,7 @@ export const PlanCheckRunResult_Result = {
writer.uint32(26).string(message.content);
}
if (message.code !== 0) {
- writer.uint32(32).int64(message.code);
+ writer.uint32(32).int32(message.code);
}
if (message.sqlSummaryReport !== undefined) {
PlanCheckRunResult_Result_SqlSummaryReport.encode(message.sqlSummaryReport, writer.uint32(42).fork()).ldelim();
@@ -499,7 +499,7 @@ export const PlanCheckRunResult_Result = {
break;
}
- message.code = longToNumber(reader.int64() as Long);
+ message.code = reader.int32();
continue;
case 5:
if (tag !== 42) {
@@ -581,13 +581,13 @@ function createBasePlanCheckRunResult_Result_SqlSummaryReport(): PlanCheckRunRes
export const PlanCheckRunResult_Result_SqlSummaryReport = {
encode(message: PlanCheckRunResult_Result_SqlSummaryReport, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.code !== 0) {
- writer.uint32(8).int64(message.code);
+ writer.uint32(8).int32(message.code);
}
for (const v of message.statementTypes) {
writer.uint32(18).string(v!);
}
if (message.affectedRows !== 0) {
- writer.uint32(24).int64(message.affectedRows);
+ writer.uint32(24).int32(message.affectedRows);
}
if (message.changedResources !== undefined) {
ChangedResources.encode(message.changedResources, writer.uint32(34).fork()).ldelim();
@@ -607,7 +607,7 @@ export const PlanCheckRunResult_Result_SqlSummaryReport = {
break;
}
- message.code = longToNumber(reader.int64() as Long);
+ message.code = reader.int32();
continue;
case 2:
if (tag !== 18) {
@@ -621,7 +621,7 @@ export const PlanCheckRunResult_Result_SqlSummaryReport = {
break;
}
- message.affectedRows = longToNumber(reader.int64() as Long);
+ message.affectedRows = reader.int32();
continue;
case 4:
if (tag !== 34) {
@@ -687,16 +687,16 @@ function createBasePlanCheckRunResult_Result_SqlReviewReport(): PlanCheckRunResu
export const PlanCheckRunResult_Result_SqlReviewReport = {
encode(message: PlanCheckRunResult_Result_SqlReviewReport, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.line !== 0) {
- writer.uint32(8).int64(message.line);
+ writer.uint32(8).int32(message.line);
}
if (message.column !== 0) {
- writer.uint32(16).int64(message.column);
+ writer.uint32(16).int32(message.column);
}
if (message.detail !== "") {
writer.uint32(26).string(message.detail);
}
if (message.code !== 0) {
- writer.uint32(32).int64(message.code);
+ writer.uint32(32).int32(message.code);
}
return writer;
},
@@ -713,14 +713,14 @@ export const PlanCheckRunResult_Result_SqlReviewReport = {
break;
}
- message.line = longToNumber(reader.int64() as Long);
+ message.line = reader.int32();
continue;
case 2:
if (tag !== 16) {
break;
}
- message.column = longToNumber(reader.int64() as Long);
+ message.column = reader.int32();
continue;
case 3:
if (tag !== 26) {
@@ -734,7 +734,7 @@ export const PlanCheckRunResult_Result_SqlReviewReport = {
break;
}
- message.code = longToNumber(reader.int64() as Long);
+ message.code = reader.int32();
continue;
}
if ((tag & 7) === 4 || tag === 0) {
diff --git a/frontend/src/types/proto/store/slow_query.ts b/frontend/src/types/proto/store/slow_query.ts
index 471752408c..cd2f1c73d8 100644
--- a/frontend/src/types/proto/store/slow_query.ts
+++ b/frontend/src/types/proto/store/slow_query.ts
@@ -1,5 +1,4 @@
/* eslint-disable */
-import Long from "long";
import _m0 from "protobufjs/minimal";
import { Duration } from "../google/protobuf/duration";
import { Timestamp } from "../google/protobuf/timestamp";
@@ -147,7 +146,7 @@ export const SlowQueryStatisticsItem = {
writer.uint32(10).string(message.sqlFingerprint);
}
if (message.count !== 0) {
- writer.uint32(16).int64(message.count);
+ writer.uint32(16).int32(message.count);
}
if (message.latestLogTime !== undefined) {
Timestamp.encode(toTimestamp(message.latestLogTime), writer.uint32(26).fork()).ldelim();
@@ -159,16 +158,16 @@ export const SlowQueryStatisticsItem = {
Duration.encode(message.maximumQueryTime, writer.uint32(42).fork()).ldelim();
}
if (message.totalRowsSent !== 0) {
- writer.uint32(48).int64(message.totalRowsSent);
+ writer.uint32(48).int32(message.totalRowsSent);
}
if (message.maximumRowsSent !== 0) {
- writer.uint32(56).int64(message.maximumRowsSent);
+ writer.uint32(56).int32(message.maximumRowsSent);
}
if (message.totalRowsExamined !== 0) {
- writer.uint32(64).int64(message.totalRowsExamined);
+ writer.uint32(64).int32(message.totalRowsExamined);
}
if (message.maximumRowsExamined !== 0) {
- writer.uint32(72).int64(message.maximumRowsExamined);
+ writer.uint32(72).int32(message.maximumRowsExamined);
}
for (const v of message.samples) {
SlowQueryDetails.encode(v!, writer.uint32(82).fork()).ldelim();
@@ -195,7 +194,7 @@ export const SlowQueryStatisticsItem = {
break;
}
- message.count = longToNumber(reader.int64() as Long);
+ message.count = reader.int32();
continue;
case 3:
if (tag !== 26) {
@@ -223,28 +222,28 @@ export const SlowQueryStatisticsItem = {
break;
}
- message.totalRowsSent = longToNumber(reader.int64() as Long);
+ message.totalRowsSent = reader.int32();
continue;
case 7:
if (tag !== 56) {
break;
}
- message.maximumRowsSent = longToNumber(reader.int64() as Long);
+ message.maximumRowsSent = reader.int32();
continue;
case 8:
if (tag !== 64) {
break;
}
- message.totalRowsExamined = longToNumber(reader.int64() as Long);
+ message.totalRowsExamined = reader.int32();
continue;
case 9:
if (tag !== 72) {
break;
}
- message.maximumRowsExamined = longToNumber(reader.int64() as Long);
+ message.maximumRowsExamined = reader.int32();
continue;
case 10:
if (tag !== 82) {
@@ -338,10 +337,10 @@ export const SlowQueryDetails = {
Duration.encode(message.lockTime, writer.uint32(26).fork()).ldelim();
}
if (message.rowsSent !== 0) {
- writer.uint32(32).int64(message.rowsSent);
+ writer.uint32(32).int32(message.rowsSent);
}
if (message.rowsExamined !== 0) {
- writer.uint32(40).int64(message.rowsExamined);
+ writer.uint32(40).int32(message.rowsExamined);
}
if (message.sqlText !== "") {
writer.uint32(50).string(message.sqlText);
@@ -382,14 +381,14 @@ export const SlowQueryDetails = {
break;
}
- message.rowsSent = longToNumber(reader.int64() as Long);
+ message.rowsSent = reader.int32();
continue;
case 5:
if (tag !== 40) {
break;
}
- message.rowsExamined = longToNumber(reader.int64() as Long);
+ message.rowsExamined = reader.int32();
continue;
case 6:
if (tag !== 50) {
@@ -450,25 +449,6 @@ export const SlowQueryDetails = {
},
};
-declare const self: any | undefined;
-declare const window: any | undefined;
-declare const global: any | undefined;
-const tsProtoGlobalThis: any = (() => {
- if (typeof globalThis !== "undefined") {
- return globalThis;
- }
- if (typeof self !== "undefined") {
- return self;
- }
- if (typeof window !== "undefined") {
- return window;
- }
- if (typeof global !== "undefined") {
- return global;
- }
- throw "Unable to locate global object";
-})();
-
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
@@ -498,18 +478,6 @@ function fromJsonTimestamp(o: any): Date {
}
}
-function longToNumber(long: Long): number {
- if (long.gt(Number.MAX_SAFE_INTEGER)) {
- throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
- }
- return long.toNumber();
-}
-
-if (_m0.util.Long !== Long) {
- _m0.util.Long = Long as any;
- _m0.configure();
-}
-
function isSet(value: any): boolean {
return value !== null && value !== undefined;
}
diff --git a/frontend/src/types/proto/v1/database_service.ts b/frontend/src/types/proto/v1/database_service.ts
index 4b6a42247e..1cd8de126b 100644
--- a/frontend/src/types/proto/v1/database_service.ts
+++ b/frontend/src/types/proto/v1/database_service.ts
@@ -5867,7 +5867,7 @@ export const SlowQueryStatistics = {
writer.uint32(10).string(message.sqlFingerprint);
}
if (message.count !== 0) {
- writer.uint32(16).int64(message.count);
+ writer.uint32(16).int32(message.count);
}
if (message.latestLogTime !== undefined) {
Timestamp.encode(toTimestamp(message.latestLogTime), writer.uint32(26).fork()).ldelim();
@@ -5879,16 +5879,16 @@ export const SlowQueryStatistics = {
Duration.encode(message.maximumQueryTime, writer.uint32(42).fork()).ldelim();
}
if (message.averageRowsSent !== 0) {
- writer.uint32(48).int64(message.averageRowsSent);
+ writer.uint32(48).int32(message.averageRowsSent);
}
if (message.maximumRowsSent !== 0) {
- writer.uint32(56).int64(message.maximumRowsSent);
+ writer.uint32(56).int32(message.maximumRowsSent);
}
if (message.averageRowsExamined !== 0) {
- writer.uint32(64).int64(message.averageRowsExamined);
+ writer.uint32(64).int32(message.averageRowsExamined);
}
if (message.maximumRowsExamined !== 0) {
- writer.uint32(72).int64(message.maximumRowsExamined);
+ writer.uint32(72).int32(message.maximumRowsExamined);
}
if (message.queryTimePercent !== 0) {
writer.uint32(81).double(message.queryTimePercent);
@@ -5921,7 +5921,7 @@ export const SlowQueryStatistics = {
break;
}
- message.count = longToNumber(reader.int64() as Long);
+ message.count = reader.int32();
continue;
case 3:
if (tag !== 26) {
@@ -5949,28 +5949,28 @@ export const SlowQueryStatistics = {
break;
}
- message.averageRowsSent = longToNumber(reader.int64() as Long);
+ message.averageRowsSent = reader.int32();
continue;
case 7:
if (tag !== 56) {
break;
}
- message.maximumRowsSent = longToNumber(reader.int64() as Long);
+ message.maximumRowsSent = reader.int32();
continue;
case 8:
if (tag !== 64) {
break;
}
- message.averageRowsExamined = longToNumber(reader.int64() as Long);
+ message.averageRowsExamined = reader.int32();
continue;
case 9:
if (tag !== 72) {
break;
}
- message.maximumRowsExamined = longToNumber(reader.int64() as Long);
+ message.maximumRowsExamined = reader.int32();
continue;
case 10:
if (tag !== 81) {
@@ -6084,10 +6084,10 @@ export const SlowQueryDetails = {
Duration.encode(message.lockTime, writer.uint32(26).fork()).ldelim();
}
if (message.rowsSent !== 0) {
- writer.uint32(32).int64(message.rowsSent);
+ writer.uint32(32).int32(message.rowsSent);
}
if (message.rowsExamined !== 0) {
- writer.uint32(40).int64(message.rowsExamined);
+ writer.uint32(40).int32(message.rowsExamined);
}
if (message.sqlText !== "") {
writer.uint32(50).string(message.sqlText);
@@ -6128,14 +6128,14 @@ export const SlowQueryDetails = {
break;
}
- message.rowsSent = longToNumber(reader.int64() as Long);
+ message.rowsSent = reader.int32();
continue;
case 5:
if (tag !== 40) {
break;
}
- message.rowsExamined = longToNumber(reader.int64() as Long);
+ message.rowsExamined = reader.int32();
continue;
case 6:
if (tag !== 50) {
diff --git a/frontend/src/types/proto/v1/risk_service.ts b/frontend/src/types/proto/v1/risk_service.ts
index 61ad7a1c64..ce9c060cd6 100644
--- a/frontend/src/types/proto/v1/risk_service.ts
+++ b/frontend/src/types/proto/v1/risk_service.ts
@@ -1,5 +1,4 @@
/* eslint-disable */
-import Long from "long";
import _m0 from "protobufjs/minimal";
import { Empty } from "../google/protobuf/empty";
import { FieldMask } from "../google/protobuf/field_mask";
@@ -478,7 +477,7 @@ export const Risk = {
writer.uint32(34).string(message.title);
}
if (message.level !== 0) {
- writer.uint32(40).int64(message.level);
+ writer.uint32(40).int32(message.level);
}
if (message.active === true) {
writer.uint32(56).bool(message.active);
@@ -529,7 +528,7 @@ export const Risk = {
break;
}
- message.level = longToNumber(reader.int64() as Long);
+ message.level = reader.int32();
continue;
case 7:
if (tag !== 56) {
@@ -715,25 +714,6 @@ export const RiskServiceDefinition = {
},
} as const;
-declare const self: any | undefined;
-declare const window: any | undefined;
-declare const global: any | undefined;
-const tsProtoGlobalThis: any = (() => {
- if (typeof globalThis !== "undefined") {
- return globalThis;
- }
- if (typeof self !== "undefined") {
- return self;
- }
- if (typeof window !== "undefined") {
- return window;
- }
- if (typeof global !== "undefined") {
- return global;
- }
- throw "Unable to locate global object";
-})();
-
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
@@ -741,18 +721,6 @@ export type DeepPartial<T> = T extends Builtin ? T
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
: Partial<T>;
-function longToNumber(long: Long): number {
- if (long.gt(Number.MAX_SAFE_INTEGER)) {
- throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
- }
- return long.toNumber();
-}
-
-if (_m0.util.Long !== Long) {
- _m0.util.Long = Long as any;
- _m0.configure();
-}
-
function isSet(value: any): boolean {
return value !== null && value !== undefined;
}
diff --git a/frontend/src/types/proto/v1/rollout_service.ts b/frontend/src/types/proto/v1/rollout_service.ts
index 2fa74576ff..589631f3a1 100644
--- a/frontend/src/types/proto/v1/rollout_service.ts
+++ b/frontend/src/types/proto/v1/rollout_service.ts
@@ -1,5 +1,4 @@
/* eslint-disable */
-import Long from "long";
import _m0 from "protobufjs/minimal";
import { FieldMask } from "../google/protobuf/field_mask";
import { Timestamp } from "../google/protobuf/timestamp";
@@ -3368,7 +3367,7 @@ export const PlanCheckRun_Result = {
writer.uint32(26).string(message.content);
}
if (message.code !== 0) {
- writer.uint32(32).int64(message.code);
+ writer.uint32(32).int32(message.code);
}
if (message.sqlSummaryReport !== undefined) {
PlanCheckRun_Result_SqlSummaryReport.encode(message.sqlSummaryReport, writer.uint32(42).fork()).ldelim();
@@ -3412,7 +3411,7 @@ export const PlanCheckRun_Result = {
break;
}
- message.code = longToNumber(reader.int64() as Long);
+ message.code = reader.int32();
continue;
case 5:
if (tag !== 42) {
@@ -3494,13 +3493,13 @@ function createBasePlanCheckRun_Result_SqlSummaryReport(): PlanCheckRun_Result_S
export const PlanCheckRun_Result_SqlSummaryReport = {
encode(message: PlanCheckRun_Result_SqlSummaryReport, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.code !== 0) {
- writer.uint32(8).int64(message.code);
+ writer.uint32(8).int32(message.code);
}
for (const v of message.statementTypes) {
writer.uint32(18).string(v!);
}
if (message.affectedRows !== 0) {
- writer.uint32(24).int64(message.affectedRows);
+ writer.uint32(24).int32(message.affectedRows);
}
if (message.changedResources !== undefined) {
ChangedResources.encode(message.changedResources, writer.uint32(34).fork()).ldelim();
@@ -3520,7 +3519,7 @@ export const PlanCheckRun_Result_SqlSummaryReport = {
break;
}
- message.code = longToNumber(reader.int64() as Long);
+ message.code = reader.int32();
continue;
case 2:
if (tag !== 18) {
@@ -3534,7 +3533,7 @@ export const PlanCheckRun_Result_SqlSummaryReport = {
break;
}
- message.affectedRows = longToNumber(reader.int64() as Long);
+ message.affectedRows = reader.int32();
continue;
case 4:
if (tag !== 34) {
@@ -3598,16 +3597,16 @@ function createBasePlanCheckRun_Result_SqlReviewReport(): PlanCheckRun_Result_Sq
export const PlanCheckRun_Result_SqlReviewReport = {
encode(message: PlanCheckRun_Result_SqlReviewReport, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.line !== 0) {
- writer.uint32(8).int64(message.line);
+ writer.uint32(8).int32(message.line);
}
if (message.column !== 0) {
- writer.uint32(16).int64(message.column);
+ writer.uint32(16).int32(message.column);
}
if (message.detail !== "") {
writer.uint32(26).string(message.detail);
}
if (message.code !== 0) {
- writer.uint32(32).int64(message.code);
+ writer.uint32(32).int32(message.code);
}
return writer;
},
@@ -3624,14 +3623,14 @@ export const PlanCheckRun_Result_SqlReviewReport = {
break;
}
- message.line = longToNumber(reader.int64() as Long);
+ message.line = reader.int32();
continue;
case 2:
if (tag !== 16) {
break;
}
- message.column = longToNumber(reader.int64() as Long);
+ message.column = reader.int32();
continue;
case 3:
if (tag !== 26) {
@@ -3645,7 +3644,7 @@ export const PlanCheckRun_Result_SqlReviewReport = {
break;
}
- message.code = longToNumber(reader.int64() as Long);
+ message.code = reader.int32();
continue;
}
if ((tag & 7) === 4 || tag === 0) {
@@ -6332,25 +6331,6 @@ export const RolloutServiceDefinition = {
},
} as const;
-declare const self: any | undefined;
-declare const window: any | undefined;
-declare const global: any | undefined;
-const tsProtoGlobalThis: any = (() => {
- if (typeof globalThis !== "undefined") {
- return globalThis;
- }
- if (typeof self !== "undefined") {
- return self;
- }
- if (typeof window !== "undefined") {
- return window;
- }
- if (typeof global !== "undefined") {
- return global;
- }
- throw "Unable to locate global object";
-})();
-
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
@@ -6380,18 +6360,6 @@ function fromJsonTimestamp(o: any): Date {
}
}
-function longToNumber(long: Long): number {
- if (long.gt(Number.MAX_SAFE_INTEGER)) {
- throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
- }
- return long.toNumber();
-}
-
-if (_m0.util.Long !== Long) {
- _m0.util.Long = Long as any;
- _m0.configure();
-}
-
function isObject(value: any): boolean {
return typeof value === "object" && value !== null;
}
diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.md
index 4ed06fb320..28dce27e2b 100644
--- a/proto/gen/grpc-doc/store/README.md
+++ b/proto/gen/grpc-doc/store/README.md
@@ -1896,7 +1896,7 @@ Type is the database change type.
| status | [PlanCheckRunResult.Result.Status](#bytebase-store-PlanCheckRunResult-Result-Status) | | |
| title | [string](#string) | | |
| content | [string](#string) | | |
-| code | [int64](#int64) | | |
+| code | [int32](#int32) | | |
| sql_summary_report | [PlanCheckRunResult.Result.SqlSummaryReport](#bytebase-store-PlanCheckRunResult-Result-SqlSummaryReport) | | |
| sql_review_report | [PlanCheckRunResult.Result.SqlReviewReport](#bytebase-store-PlanCheckRunResult-Result-SqlReviewReport) | | |
@@ -1913,10 +1913,10 @@ Type is the database change type.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| line | [int64](#int64) | | |
-| column | [int64](#int64) | | |
+| line | [int32](#int32) | | |
+| column | [int32](#int32) | | |
| detail | [string](#string) | | |
-| code | [int64](#int64) | | Code from sql review. |
+| code | [int32](#int32) | | Code from sql review. |
@@ -1931,9 +1931,9 @@ Type is the database change type.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| code | [int64](#int64) | | |
+| code | [int32](#int32) | | |
| statement_types | [string](#string) | repeated | statement_types are the types of statements that are found in the sql. |
-| affected_rows | [int64](#int64) | | |
+| affected_rows | [int32](#int32) | | |
| changed_resources | [ChangedResources](#bytebase-store-ChangedResources) | | |
@@ -2898,8 +2898,8 @@ SlowQueryDetails is the details of a slow query.
| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | start_time is the start time of the slow query. |
| query_time | [google.protobuf.Duration](#google-protobuf-Duration) | | query_time is the query time of the slow query. |
| lock_time | [google.protobuf.Duration](#google-protobuf-Duration) | | lock_time is the lock time of the slow query. |
-| rows_sent | [int64](#int64) | | rows_sent is the number of rows sent by the slow query. |
-| rows_examined | [int64](#int64) | | rows_examined is the number of rows examined by the slow query. |
+| rows_sent | [int32](#int32) | | rows_sent is the number of rows sent by the slow query. |
+| rows_examined | [int32](#int32) | | rows_examined is the number of rows examined by the slow query. |
| sql_text | [string](#string) | | sql_text is the SQL text of the slow query. |
@@ -2931,14 +2931,14 @@ SlowQueryStatisticsItem is the item of slow query statistics.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| sql_fingerprint | [string](#string) | | sql_fingerprint is the fingerprint of the slow query. |
-| count | [int64](#int64) | | count is the number of slow queries with the same fingerprint. |
+| count | [int32](#int32) | | count is the number of slow queries with the same fingerprint. |
| latest_log_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | latest_log_time is the time of the latest slow query with the same fingerprint. |
| total_query_time | [google.protobuf.Duration](#google-protobuf-Duration) | | The total query time of the slow query log. |
| maximum_query_time | [google.protobuf.Duration](#google-protobuf-Duration) | | The maximum query time of the slow query log. |
-| total_rows_sent | [int64](#int64) | | The total rows sent of the slow query log. |
-| maximum_rows_sent | [int64](#int64) | | The maximum rows sent of the slow query log. |
-| total_rows_examined | [int64](#int64) | | The total rows examined of the slow query log. |
-| maximum_rows_examined | [int64](#int64) | | The maximum rows examined of the slow query log. |
+| total_rows_sent | [int32](#int32) | | The total rows sent of the slow query log. |
+| maximum_rows_sent | [int32](#int32) | | The maximum rows sent of the slow query log. |
+| total_rows_examined | [int32](#int32) | | The total rows examined of the slow query log. |
+| maximum_rows_examined | [int32](#int32) | | The maximum rows examined of the slow query log. |
| samples | [SlowQueryDetails](#bytebase-store-SlowQueryDetails) | repeated | samples are the details of the sample slow queries with the same fingerprint. |
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index dc76ca34f2..011a1edd7b 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -3299,8 +3299,8 @@ SlowQueryDetails is the details of the slow query log.
| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The start time of the slow query log. |
| query_time | [google.protobuf.Duration](#google-protobuf-Duration) | | The query time of the slow query log. |
| lock_time | [google.protobuf.Duration](#google-protobuf-Duration) | | The lock time of the slow query log. |
-| rows_sent | [int64](#int64) | | The rows sent of the slow query log. |
-| rows_examined | [int64](#int64) | | The rows examined of the slow query log. |
+| rows_sent | [int32](#int32) | | The rows sent of the slow query log. |
+| rows_examined | [int32](#int32) | | The rows examined of the slow query log. |
| sql_text | [string](#string) | | The sql text of the slow query log. |
@@ -3334,14 +3334,14 @@ SlowQueryStatistics is the statistics of the slow query log.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| sql_fingerprint | [string](#string) | | The fingerprint of the slow query log. |
-| count | [int64](#int64) | | The count of the slow query log. |
+| count | [int32](#int32) | | The count of the slow query log. |
| latest_log_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The latest log time of the slow query log. |
| average_query_time | [google.protobuf.Duration](#google-protobuf-Duration) | | The average query time of the slow query log. |
| maximum_query_time | [google.protobuf.Duration](#google-protobuf-Duration) | | The maximum query time of the slow query log. |
-| average_rows_sent | [int64](#int64) | | The average rows sent of the slow query log. |
-| maximum_rows_sent | [int64](#int64) | | The maximum rows sent of the slow query log. |
-| average_rows_examined | [int64](#int64) | | The average rows examined of the slow query log. |
-| maximum_rows_examined | [int64](#int64) | | The maximum rows examined of the slow query log. |
+| average_rows_sent | [int32](#int32) | | The average rows sent of the slow query log. |
+| maximum_rows_sent | [int32](#int32) | | The maximum rows sent of the slow query log. |
+| average_rows_examined | [int32](#int32) | | The average rows examined of the slow query log. |
+| maximum_rows_examined | [int32](#int32) | | The maximum rows examined of the slow query log. |
| query_time_percent | [double](#double) | | The percentage of the query time. |
| count_percent | [double](#double) | | The percentage of the count. |
| samples | [SlowQueryDetails](#bytebase-v1-SlowQueryDetails) | repeated | Samples are details of the sample slow query logs with the same fingerprint. |
@@ -7189,7 +7189,7 @@ When paginating, all other parameters provided to `LiskRisks` must match the cal
| uid | [string](#string) | | system-generated unique identifier. |
| source | [Risk.Source](#bytebase-v1-Risk-Source) | | |
| title | [string](#string) | | |
-| level | [int64](#int64) | | |
+| level | [int32](#int32) | | |
| active | [bool](#bool) | | |
| condition | [google.type.Expr](#google-type-Expr) | | |
@@ -7837,7 +7837,7 @@ When paginating, all other parameters provided to `ListRolloutTaskRuns` must mat
| status | [PlanCheckRun.Result.Status](#bytebase-v1-PlanCheckRun-Result-Status) | | |
| title | [string](#string) | | |
| content | [string](#string) | | |
-| code | [int64](#int64) | | |
+| code | [int32](#int32) | | |
| sql_summary_report | [PlanCheckRun.Result.SqlSummaryReport](#bytebase-v1-PlanCheckRun-Result-SqlSummaryReport) | | |
| sql_review_report | [PlanCheckRun.Result.SqlReviewReport](#bytebase-v1-PlanCheckRun-Result-SqlReviewReport) | | |
@@ -7854,10 +7854,10 @@ When paginating, all other parameters provided to `ListRolloutTaskRuns` must mat
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| line | [int64](#int64) | | |
-| column | [int64](#int64) | | |
+| line | [int32](#int32) | | |
+| column | [int32](#int32) | | |
| detail | [string](#string) | | |
-| code | [int64](#int64) | | Code from sql review. |
+| code | [int32](#int32) | | Code from sql review. |
@@ -7872,9 +7872,9 @@ When paginating, all other parameters provided to `ListRolloutTaskRuns` must mat
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| code | [int64](#int64) | | |
+| code | [int32](#int32) | | |
| statement_types | [string](#string) | repeated | statement_types are the types of statements that are found in the sql. |
-| affected_rows | [int64](#int64) | | |
+| affected_rows | [int32](#int32) | | |
| changed_resources | [ChangedResources](#bytebase-v1-ChangedResources) | | |
diff --git a/proto/generated-go/store/plan_check_run.pb.go b/proto/generated-go/store/plan_check_run.pb.go
index d3818da369..aaca71ab8a 100644
--- a/proto/generated-go/store/plan_check_run.pb.go
+++ b/proto/generated-go/store/plan_check_run.pb.go
@@ -275,7 +275,7 @@ type PlanCheckRunResult_Result struct {
Status PlanCheckRunResult_Result_Status `protobuf:"varint,1,opt,name=status,proto3,enum=bytebase.store.PlanCheckRunResult_Result_Status" json:"status,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
- Code int64 `protobuf:"varint,4,opt,name=code,proto3" json:"code,omitempty"`
+ Code int32 `protobuf:"varint,4,opt,name=code,proto3" json:"code,omitempty"`
// Types that are assignable to Report:
//
// *PlanCheckRunResult_Result_SqlSummaryReport_
@@ -336,7 +336,7 @@ func (x *PlanCheckRunResult_Result) GetContent() string {
return ""
}
-func (x *PlanCheckRunResult_Result) GetCode() int64 {
+func (x *PlanCheckRunResult_Result) GetCode() int32 {
if x != nil {
return x.Code
}
@@ -385,10 +385,10 @@ type PlanCheckRunResult_Result_SqlSummaryReport struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
+ Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
// statement_types are the types of statements that are found in the sql.
StatementTypes []string `protobuf:"bytes,2,rep,name=statement_types,json=statementTypes,proto3" json:"statement_types,omitempty"`
- AffectedRows int64 `protobuf:"varint,3,opt,name=affected_rows,json=affectedRows,proto3" json:"affected_rows,omitempty"`
+ AffectedRows int32 `protobuf:"varint,3,opt,name=affected_rows,json=affectedRows,proto3" json:"affected_rows,omitempty"`
ChangedResources *ChangedResources `protobuf:"bytes,4,opt,name=changed_resources,json=changedResources,proto3" json:"changed_resources,omitempty"`
}
@@ -424,7 +424,7 @@ func (*PlanCheckRunResult_Result_SqlSummaryReport) Descriptor() ([]byte, []int)
return file_store_plan_check_run_proto_rawDescGZIP(), []int{1, 0, 0}
}
-func (x *PlanCheckRunResult_Result_SqlSummaryReport) GetCode() int64 {
+func (x *PlanCheckRunResult_Result_SqlSummaryReport) GetCode() int32 {
if x != nil {
return x.Code
}
@@ -438,7 +438,7 @@ func (x *PlanCheckRunResult_Result_SqlSummaryReport) GetStatementTypes() []strin
return nil
}
-func (x *PlanCheckRunResult_Result_SqlSummaryReport) GetAffectedRows() int64 {
+func (x *PlanCheckRunResult_Result_SqlSummaryReport) GetAffectedRows() int32 {
if x != nil {
return x.AffectedRows
}
@@ -457,11 +457,11 @@ type PlanCheckRunResult_Result_SqlReviewReport struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Line int64 `protobuf:"varint,1,opt,name=line,proto3" json:"line,omitempty"`
- Column int64 `protobuf:"varint,2,opt,name=column,proto3" json:"column,omitempty"`
+ Line int32 `protobuf:"varint,1,opt,name=line,proto3" json:"line,omitempty"`
+ Column int32 `protobuf:"varint,2,opt,name=column,proto3" json:"column,omitempty"`
Detail string `protobuf:"bytes,3,opt,name=detail,proto3" json:"detail,omitempty"`
// Code from sql review.
- Code int64 `protobuf:"varint,4,opt,name=code,proto3" json:"code,omitempty"`
+ Code int32 `protobuf:"varint,4,opt,name=code,proto3" json:"code,omitempty"`
}
func (x *PlanCheckRunResult_Result_SqlReviewReport) Reset() {
@@ -496,14 +496,14 @@ func (*PlanCheckRunResult_Result_SqlReviewReport) Descriptor() ([]byte, []int) {
return file_store_plan_check_run_proto_rawDescGZIP(), []int{1, 0, 1}
}
-func (x *PlanCheckRunResult_Result_SqlReviewReport) GetLine() int64 {
+func (x *PlanCheckRunResult_Result_SqlReviewReport) GetLine() int32 {
if x != nil {
return x.Line
}
return 0
}
-func (x *PlanCheckRunResult_Result_SqlReviewReport) GetColumn() int64 {
+func (x *PlanCheckRunResult_Result_SqlReviewReport) GetColumn() int32 {
if x != nil {
return x.Column
}
@@ -517,7 +517,7 @@ func (x *PlanCheckRunResult_Result_SqlReviewReport) GetDetail() string {
return ""
}
-func (x *PlanCheckRunResult_Result_SqlReviewReport) GetCode() int64 {
+func (x *PlanCheckRunResult_Result_SqlReviewReport) GetCode() int32 {
if x != nil {
return x.Code
}
@@ -581,7 +581,7 @@ var file_store_plan_check_run_proto_rawDesc = []byte{
0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74,
0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65,
- 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
+ 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05,
0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x6a, 0x0a, 0x12, 0x73, 0x71, 0x6c, 0x5f, 0x73, 0x75,
0x6d, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74,
@@ -597,12 +597,12 @@ var file_store_plan_check_run_proto_rawDesc = []byte{
0x65, 0x77, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x71, 0x6c, 0x52,
0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0xc3, 0x01, 0x0a, 0x10,
0x53, 0x71, 0x6c, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74,
- 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04,
+ 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04,
0x63, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e,
0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x73,
0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x23, 0x0a,
0x0d, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x03,
- 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x6f,
+ 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x6f,
0x77, 0x73, 0x12, 0x4d, 0x0a, 0x11, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x5f, 0x72, 0x65,
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e,
0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x43,
@@ -610,11 +610,11 @@ var file_store_plan_check_run_proto_rawDesc = []byte{
0x10, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
0x73, 0x1a, 0x69, 0x0a, 0x0f, 0x53, 0x71, 0x6c, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65,
0x70, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x03, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75,
- 0x6d, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e,
+ 0x28, 0x05, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75,
+ 0x6d, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e,
0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65,
- 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x45, 0x0a, 0x06,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x45, 0x0a, 0x06,
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53,
0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09,
0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x41, 0x52,
diff --git a/proto/generated-go/store/slow_query.pb.go b/proto/generated-go/store/slow_query.pb.go
index 54a0af2f9d..833d8358c6 100644
--- a/proto/generated-go/store/slow_query.pb.go
+++ b/proto/generated-go/store/slow_query.pb.go
@@ -80,7 +80,7 @@ type SlowQueryStatisticsItem struct {
// sql_fingerprint is the fingerprint of the slow query.
SqlFingerprint string `protobuf:"bytes,1,opt,name=sql_fingerprint,json=sqlFingerprint,proto3" json:"sql_fingerprint,omitempty"`
// count is the number of slow queries with the same fingerprint.
- Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
+ Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
// latest_log_time is the time of the latest slow query with the same fingerprint.
LatestLogTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=latest_log_time,json=latestLogTime,proto3" json:"latest_log_time,omitempty"`
// The total query time of the slow query log.
@@ -88,13 +88,13 @@ type SlowQueryStatisticsItem struct {
// The maximum query time of the slow query log.
MaximumQueryTime *durationpb.Duration `protobuf:"bytes,5,opt,name=maximum_query_time,json=maximumQueryTime,proto3" json:"maximum_query_time,omitempty"`
// The total rows sent of the slow query log.
- TotalRowsSent int64 `protobuf:"varint,6,opt,name=total_rows_sent,json=totalRowsSent,proto3" json:"total_rows_sent,omitempty"`
+ TotalRowsSent int32 `protobuf:"varint,6,opt,name=total_rows_sent,json=totalRowsSent,proto3" json:"total_rows_sent,omitempty"`
// The maximum rows sent of the slow query log.
- MaximumRowsSent int64 `protobuf:"varint,7,opt,name=maximum_rows_sent,json=maximumRowsSent,proto3" json:"maximum_rows_sent,omitempty"`
+ MaximumRowsSent int32 `protobuf:"varint,7,opt,name=maximum_rows_sent,json=maximumRowsSent,proto3" json:"maximum_rows_sent,omitempty"`
// The total rows examined of the slow query log.
- TotalRowsExamined int64 `protobuf:"varint,8,opt,name=total_rows_examined,json=totalRowsExamined,proto3" json:"total_rows_examined,omitempty"`
+ TotalRowsExamined int32 `protobuf:"varint,8,opt,name=total_rows_examined,json=totalRowsExamined,proto3" json:"total_rows_examined,omitempty"`
// The maximum rows examined of the slow query log.
- MaximumRowsExamined int64 `protobuf:"varint,9,opt,name=maximum_rows_examined,json=maximumRowsExamined,proto3" json:"maximum_rows_examined,omitempty"`
+ MaximumRowsExamined int32 `protobuf:"varint,9,opt,name=maximum_rows_examined,json=maximumRowsExamined,proto3" json:"maximum_rows_examined,omitempty"`
// samples are the details of the sample slow queries with the same fingerprint.
Samples []*SlowQueryDetails `protobuf:"bytes,10,rep,name=samples,proto3" json:"samples,omitempty"`
}
@@ -138,7 +138,7 @@ func (x *SlowQueryStatisticsItem) GetSqlFingerprint() string {
return ""
}
-func (x *SlowQueryStatisticsItem) GetCount() int64 {
+func (x *SlowQueryStatisticsItem) GetCount() int32 {
if x != nil {
return x.Count
}
@@ -166,28 +166,28 @@ func (x *SlowQueryStatisticsItem) GetMaximumQueryTime() *durationpb.Duration {
return nil
}
-func (x *SlowQueryStatisticsItem) GetTotalRowsSent() int64 {
+func (x *SlowQueryStatisticsItem) GetTotalRowsSent() int32 {
if x != nil {
return x.TotalRowsSent
}
return 0
}
-func (x *SlowQueryStatisticsItem) GetMaximumRowsSent() int64 {
+func (x *SlowQueryStatisticsItem) GetMaximumRowsSent() int32 {
if x != nil {
return x.MaximumRowsSent
}
return 0
}
-func (x *SlowQueryStatisticsItem) GetTotalRowsExamined() int64 {
+func (x *SlowQueryStatisticsItem) GetTotalRowsExamined() int32 {
if x != nil {
return x.TotalRowsExamined
}
return 0
}
-func (x *SlowQueryStatisticsItem) GetMaximumRowsExamined() int64 {
+func (x *SlowQueryStatisticsItem) GetMaximumRowsExamined() int32 {
if x != nil {
return x.MaximumRowsExamined
}
@@ -214,9 +214,9 @@ type SlowQueryDetails struct {
// lock_time is the lock time of the slow query.
LockTime *durationpb.Duration `protobuf:"bytes,3,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"`
// rows_sent is the number of rows sent by the slow query.
- RowsSent int64 `protobuf:"varint,4,opt,name=rows_sent,json=rowsSent,proto3" json:"rows_sent,omitempty"`
+ RowsSent int32 `protobuf:"varint,4,opt,name=rows_sent,json=rowsSent,proto3" json:"rows_sent,omitempty"`
// rows_examined is the number of rows examined by the slow query.
- RowsExamined int64 `protobuf:"varint,5,opt,name=rows_examined,json=rowsExamined,proto3" json:"rows_examined,omitempty"`
+ RowsExamined int32 `protobuf:"varint,5,opt,name=rows_examined,json=rowsExamined,proto3" json:"rows_examined,omitempty"`
// sql_text is the SQL text of the slow query.
SqlText string `protobuf:"bytes,6,opt,name=sql_text,json=sqlText,proto3" json:"sql_text,omitempty"`
}
@@ -274,14 +274,14 @@ func (x *SlowQueryDetails) GetLockTime() *durationpb.Duration {
return nil
}
-func (x *SlowQueryDetails) GetRowsSent() int64 {
+func (x *SlowQueryDetails) GetRowsSent() int32 {
if x != nil {
return x.RowsSent
}
return 0
}
-func (x *SlowQueryDetails) GetRowsExamined() int64 {
+func (x *SlowQueryDetails) GetRowsExamined() int32 {
if x != nil {
return x.RowsExamined
}
@@ -315,7 +315,7 @@ var file_store_slow_query_proto_rawDesc = []byte{
0x71, 0x6c, 0x5f, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x71, 0x6c, 0x46, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70,
0x72, 0x69, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x0f, 0x6c, 0x61,
+ 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x0f, 0x6c, 0x61,
0x74, 0x65, 0x73, 0x74, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52,
@@ -330,15 +330,15 @@ var file_store_slow_query_proto_rawDesc = []byte{
0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x69,
0x6d, 0x75, 0x6d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0f,
0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18,
- 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x6f, 0x77, 0x73,
+ 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x6f, 0x77, 0x73,
0x53, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f,
- 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52,
+ 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52,
0x0f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x6f, 0x77, 0x73, 0x53, 0x65, 0x6e, 0x74,
0x12, 0x2e, 0x0a, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x65,
- 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x74,
+ 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x74,
0x6f, 0x74, 0x61, 0x6c, 0x52, 0x6f, 0x77, 0x73, 0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64,
0x12, 0x32, 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x72, 0x6f, 0x77, 0x73,
- 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52,
+ 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52,
0x13, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x6f, 0x77, 0x73, 0x45, 0x78, 0x61, 0x6d,
0x69, 0x6e, 0x65, 0x64, 0x12, 0x3a, 0x0a, 0x07, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18,
0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
@@ -357,9 +357,9 @@ var file_store_slow_query_proto_rawDesc = []byte{
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69,
0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18,
- 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x72, 0x6f, 0x77, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x12,
+ 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x6f, 0x77, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x12,
0x23, 0x0a, 0x0d, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64,
- 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x72, 0x6f, 0x77, 0x73, 0x45, 0x78, 0x61, 0x6d,
+ 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x72, 0x6f, 0x77, 0x73, 0x45, 0x78, 0x61, 0x6d,
0x69, 0x6e, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x71, 0x6c, 0x5f, 0x74, 0x65, 0x78, 0x74,
0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x71, 0x6c, 0x54, 0x65, 0x78, 0x74, 0x42,
0x14, 0x5a, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f,
diff --git a/proto/generated-go/v1/database_service.pb.go b/proto/generated-go/v1/database_service.pb.go
index a0dd586d31..568f46ce01 100644
--- a/proto/generated-go/v1/database_service.pb.go
+++ b/proto/generated-go/v1/database_service.pb.go
@@ -3874,7 +3874,7 @@ type SlowQueryStatistics struct {
// The fingerprint of the slow query log.
SqlFingerprint string `protobuf:"bytes,1,opt,name=sql_fingerprint,json=sqlFingerprint,proto3" json:"sql_fingerprint,omitempty"`
// The count of the slow query log.
- Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
+ Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
// The latest log time of the slow query log.
LatestLogTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=latest_log_time,json=latestLogTime,proto3" json:"latest_log_time,omitempty"`
// The average query time of the slow query log.
@@ -3882,13 +3882,13 @@ type SlowQueryStatistics struct {
// The maximum query time of the slow query log.
MaximumQueryTime *durationpb.Duration `protobuf:"bytes,5,opt,name=maximum_query_time,json=maximumQueryTime,proto3" json:"maximum_query_time,omitempty"`
// The average rows sent of the slow query log.
- AverageRowsSent int64 `protobuf:"varint,6,opt,name=average_rows_sent,json=averageRowsSent,proto3" json:"average_rows_sent,omitempty"`
+ AverageRowsSent int32 `protobuf:"varint,6,opt,name=average_rows_sent,json=averageRowsSent,proto3" json:"average_rows_sent,omitempty"`
// The maximum rows sent of the slow query log.
- MaximumRowsSent int64 `protobuf:"varint,7,opt,name=maximum_rows_sent,json=maximumRowsSent,proto3" json:"maximum_rows_sent,omitempty"`
+ MaximumRowsSent int32 `protobuf:"varint,7,opt,name=maximum_rows_sent,json=maximumRowsSent,proto3" json:"maximum_rows_sent,omitempty"`
// The average rows examined of the slow query log.
- AverageRowsExamined int64 `protobuf:"varint,8,opt,name=average_rows_examined,json=averageRowsExamined,proto3" json:"average_rows_examined,omitempty"`
+ AverageRowsExamined int32 `protobuf:"varint,8,opt,name=average_rows_examined,json=averageRowsExamined,proto3" json:"average_rows_examined,omitempty"`
// The maximum rows examined of the slow query log.
- MaximumRowsExamined int64 `protobuf:"varint,9,opt,name=maximum_rows_examined,json=maximumRowsExamined,proto3" json:"maximum_rows_examined,omitempty"`
+ MaximumRowsExamined int32 `protobuf:"varint,9,opt,name=maximum_rows_examined,json=maximumRowsExamined,proto3" json:"maximum_rows_examined,omitempty"`
// The percentage of the query time.
QueryTimePercent float64 `protobuf:"fixed64,10,opt,name=query_time_percent,json=queryTimePercent,proto3" json:"query_time_percent,omitempty"`
// The percentage of the count.
@@ -3936,7 +3936,7 @@ func (x *SlowQueryStatistics) GetSqlFingerprint() string {
return ""
}
-func (x *SlowQueryStatistics) GetCount() int64 {
+func (x *SlowQueryStatistics) GetCount() int32 {
if x != nil {
return x.Count
}
@@ -3964,28 +3964,28 @@ func (x *SlowQueryStatistics) GetMaximumQueryTime() *durationpb.Duration {
return nil
}
-func (x *SlowQueryStatistics) GetAverageRowsSent() int64 {
+func (x *SlowQueryStatistics) GetAverageRowsSent() int32 {
if x != nil {
return x.AverageRowsSent
}
return 0
}
-func (x *SlowQueryStatistics) GetMaximumRowsSent() int64 {
+func (x *SlowQueryStatistics) GetMaximumRowsSent() int32 {
if x != nil {
return x.MaximumRowsSent
}
return 0
}
-func (x *SlowQueryStatistics) GetAverageRowsExamined() int64 {
+func (x *SlowQueryStatistics) GetAverageRowsExamined() int32 {
if x != nil {
return x.AverageRowsExamined
}
return 0
}
-func (x *SlowQueryStatistics) GetMaximumRowsExamined() int64 {
+func (x *SlowQueryStatistics) GetMaximumRowsExamined() int32 {
if x != nil {
return x.MaximumRowsExamined
}
@@ -4026,9 +4026,9 @@ type SlowQueryDetails struct {
// The lock time of the slow query log.
LockTime *durationpb.Duration `protobuf:"bytes,3,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"`
// The rows sent of the slow query log.
- RowsSent int64 `protobuf:"varint,4,opt,name=rows_sent,json=rowsSent,proto3" json:"rows_sent,omitempty"`
+ RowsSent int32 `protobuf:"varint,4,opt,name=rows_sent,json=rowsSent,proto3" json:"rows_sent,omitempty"`
// The rows examined of the slow query log.
- RowsExamined int64 `protobuf:"varint,5,opt,name=rows_examined,json=rowsExamined,proto3" json:"rows_examined,omitempty"`
+ RowsExamined int32 `protobuf:"varint,5,opt,name=rows_examined,json=rowsExamined,proto3" json:"rows_examined,omitempty"`
// The sql text of the slow query log.
SqlText string `protobuf:"bytes,6,opt,name=sql_text,json=sqlText,proto3" json:"sql_text,omitempty"`
}
@@ -4086,14 +4086,14 @@ func (x *SlowQueryDetails) GetLockTime() *durationpb.Duration {
return nil
}
-func (x *SlowQueryDetails) GetRowsSent() int64 {
+func (x *SlowQueryDetails) GetRowsSent() int32 {
if x != nil {
return x.RowsSent
}
return 0
}
-func (x *SlowQueryDetails) GetRowsExamined() int64 {
+func (x *SlowQueryDetails) GetRowsExamined() int32 {
if x != nil {
return x.RowsExamined
}
@@ -5712,7 +5712,7 @@ var file_v1_database_service_proto_rawDesc = []byte{
0x5f, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0e, 0x73, 0x71, 0x6c, 0x46, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69,
0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x0f, 0x6c, 0x61, 0x74, 0x65,
+ 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x0f, 0x6c, 0x61, 0x74, 0x65,
0x73, 0x74, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x6c,
@@ -5727,16 +5727,16 @@ var file_v1_database_service_proto_rawDesc = []byte{
0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x6d, 0x61,
0x78, 0x69, 0x6d, 0x75, 0x6d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2a,
0x0a, 0x11, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x73,
- 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x61, 0x76, 0x65, 0x72, 0x61,
+ 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x61, 0x76, 0x65, 0x72, 0x61,
0x67, 0x65, 0x52, 0x6f, 0x77, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x6d, 0x61,
0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18,
- 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x6f,
+ 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x6f,
0x77, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67,
0x65, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x18,
- 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x52, 0x6f,
+ 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x52, 0x6f,
0x77, 0x73, 0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x6d, 0x61,
0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x69,
- 0x6e, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x6d, 0x61, 0x78, 0x69, 0x6d,
+ 0x6e, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x6d, 0x61, 0x78, 0x69, 0x6d,
0x75, 0x6d, 0x52, 0x6f, 0x77, 0x73, 0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x12, 0x2c,
0x0a, 0x12, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x70, 0x65, 0x72,
0x63, 0x65, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x01, 0x52, 0x10, 0x71, 0x75, 0x65, 0x72,
@@ -5759,9 +5759,9 @@ var file_v1_database_service_proto_rawDesc = []byte{
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09,
- 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52,
+ 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52,
0x08, 0x72, 0x6f, 0x77, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x6f, 0x77,
- 0x73, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03,
+ 0x73, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05,
0x52, 0x0c, 0x72, 0x6f, 0x77, 0x73, 0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x12, 0x19,
0x0a, 0x08, 0x73, 0x71, 0x6c, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
0x52, 0x07, 0x73, 0x71, 0x6c, 0x54, 0x65, 0x78, 0x74, 0x22, 0x6d, 0x0a, 0x12, 0x4c, 0x69, 0x73,
diff --git a/proto/generated-go/v1/risk_service.pb.go b/proto/generated-go/v1/risk_service.pb.go
index 65acbda811..bcf862ecce 100644
--- a/proto/generated-go/v1/risk_service.pb.go
+++ b/proto/generated-go/v1/risk_service.pb.go
@@ -371,7 +371,7 @@ type Risk struct {
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
Source Risk_Source `protobuf:"varint,3,opt,name=source,proto3,enum=bytebase.v1.Risk_Source" json:"source,omitempty"`
Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"`
- Level int64 `protobuf:"varint,5,opt,name=level,proto3" json:"level,omitempty"`
+ Level int32 `protobuf:"varint,5,opt,name=level,proto3" json:"level,omitempty"`
Active bool `protobuf:"varint,7,opt,name=active,proto3" json:"active,omitempty"`
Condition *expr.Expr `protobuf:"bytes,8,opt,name=condition,proto3" json:"condition,omitempty"`
}
@@ -436,7 +436,7 @@ func (x *Risk) GetTitle() string {
return ""
}
-func (x *Risk) GetLevel() int64 {
+func (x *Risk) GetLevel() int32 {
if x != nil {
return x.Level
}
@@ -508,7 +508,7 @@ var file_v1_risk_service_proto_rawDesc = []byte{
0x69, 0x73, 0x6b, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72,
0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65,
- 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x16,
+ 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x16,
0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06,
0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74,
0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
diff --git a/proto/generated-go/v1/rollout_service.pb.go b/proto/generated-go/v1/rollout_service.pb.go
index e2ca17181b..17d3423164 100644
--- a/proto/generated-go/v1/rollout_service.pb.go
+++ b/proto/generated-go/v1/rollout_service.pb.go
@@ -3034,7 +3034,7 @@ type PlanCheckRun_Result struct {
Status PlanCheckRun_Result_Status `protobuf:"varint,1,opt,name=status,proto3,enum=bytebase.v1.PlanCheckRun_Result_Status" json:"status,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
- Code int64 `protobuf:"varint,4,opt,name=code,proto3" json:"code,omitempty"`
+ Code int32 `protobuf:"varint,4,opt,name=code,proto3" json:"code,omitempty"`
// Types that are assignable to Report:
//
// *PlanCheckRun_Result_SqlSummaryReport_
@@ -3095,7 +3095,7 @@ func (x *PlanCheckRun_Result) GetContent() string {
return ""
}
-func (x *PlanCheckRun_Result) GetCode() int64 {
+func (x *PlanCheckRun_Result) GetCode() int32 {
if x != nil {
return x.Code
}
@@ -3144,10 +3144,10 @@ type PlanCheckRun_Result_SqlSummaryReport struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
+ Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
// statement_types are the types of statements that are found in the sql.
StatementTypes []string `protobuf:"bytes,2,rep,name=statement_types,json=statementTypes,proto3" json:"statement_types,omitempty"`
- AffectedRows int64 `protobuf:"varint,3,opt,name=affected_rows,json=affectedRows,proto3" json:"affected_rows,omitempty"`
+ AffectedRows int32 `protobuf:"varint,3,opt,name=affected_rows,json=affectedRows,proto3" json:"affected_rows,omitempty"`
ChangedResources *ChangedResources `protobuf:"bytes,4,opt,name=changed_resources,json=changedResources,proto3" json:"changed_resources,omitempty"`
}
@@ -3183,7 +3183,7 @@ func (*PlanCheckRun_Result_SqlSummaryReport) Descriptor() ([]byte, []int) {
return file_v1_rollout_service_proto_rawDescGZIP(), []int{16, 0, 0}
}
-func (x *PlanCheckRun_Result_SqlSummaryReport) GetCode() int64 {
+func (x *PlanCheckRun_Result_SqlSummaryReport) GetCode() int32 {
if x != nil {
return x.Code
}
@@ -3197,7 +3197,7 @@ func (x *PlanCheckRun_Result_SqlSummaryReport) GetStatementTypes() []string {
return nil
}
-func (x *PlanCheckRun_Result_SqlSummaryReport) GetAffectedRows() int64 {
+func (x *PlanCheckRun_Result_SqlSummaryReport) GetAffectedRows() int32 {
if x != nil {
return x.AffectedRows
}
@@ -3216,11 +3216,11 @@ type PlanCheckRun_Result_SqlReviewReport struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Line int64 `protobuf:"varint,1,opt,name=line,proto3" json:"line,omitempty"`
- Column int64 `protobuf:"varint,2,opt,name=column,proto3" json:"column,omitempty"`
+ Line int32 `protobuf:"varint,1,opt,name=line,proto3" json:"line,omitempty"`
+ Column int32 `protobuf:"varint,2,opt,name=column,proto3" json:"column,omitempty"`
Detail string `protobuf:"bytes,3,opt,name=detail,proto3" json:"detail,omitempty"`
// Code from sql review.
- Code int64 `protobuf:"varint,4,opt,name=code,proto3" json:"code,omitempty"`
+ Code int32 `protobuf:"varint,4,opt,name=code,proto3" json:"code,omitempty"`
}
func (x *PlanCheckRun_Result_SqlReviewReport) Reset() {
@@ -3255,14 +3255,14 @@ func (*PlanCheckRun_Result_SqlReviewReport) Descriptor() ([]byte, []int) {
return file_v1_rollout_service_proto_rawDescGZIP(), []int{16, 0, 1}
}
-func (x *PlanCheckRun_Result_SqlReviewReport) GetLine() int64 {
+func (x *PlanCheckRun_Result_SqlReviewReport) GetLine() int32 {
if x != nil {
return x.Line
}
return 0
}
-func (x *PlanCheckRun_Result_SqlReviewReport) GetColumn() int64 {
+func (x *PlanCheckRun_Result_SqlReviewReport) GetColumn() int32 {
if x != nil {
return x.Column
}
@@ -3276,7 +3276,7 @@ func (x *PlanCheckRun_Result_SqlReviewReport) GetDetail() string {
return ""
}
-func (x *PlanCheckRun_Result_SqlReviewReport) GetCode() int64 {
+func (x *PlanCheckRun_Result_SqlReviewReport) GetCode() int32 {
if x != nil {
return x.Code
}
@@ -4007,7 +4007,7 @@ var file_v1_rollout_service_proto_rawDesc = []byte{
0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c,
0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63,
- 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12,
+ 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12,
0x61, 0x0a, 0x12, 0x73, 0x71, 0x6c, 0x5f, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x72,
0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x62, 0x79,
0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68,
@@ -4022,11 +4022,11 @@ var file_v1_rollout_service_proto_rawDesc = []byte{
0x00, 0x52, 0x0f, 0x73, 0x71, 0x6c, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x70, 0x6f,
0x72, 0x74, 0x1a, 0xc0, 0x01, 0x0a, 0x10, 0x53, 0x71, 0x6c, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72,
0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x73,
+ 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x73,
0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x02,
0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54,
0x79, 0x70, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64,
- 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x61, 0x66, 0x66,
+ 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x61, 0x66, 0x66,
0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x77, 0x73, 0x12, 0x4a, 0x0a, 0x11, 0x63, 0x68, 0x61,
0x6e, 0x67, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x04,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
@@ -4034,11 +4034,11 @@ var file_v1_rollout_service_proto_rawDesc = []byte{
0x63, 0x65, 0x73, 0x52, 0x10, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f,
0x75, 0x72, 0x63, 0x65, 0x73, 0x1a, 0x69, 0x0a, 0x0f, 0x53, 0x71, 0x6c, 0x52, 0x65, 0x76, 0x69,
0x65, 0x77, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06,
- 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x6f,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06,
+ 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x63, 0x6f,
0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x12, 0x0a, 0x04,
- 0x63, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65,
+ 0x63, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65,
0x22, 0x45, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54,
0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44,
0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x0b, 0x0a,
diff --git a/proto/store/plan_check_run.proto b/proto/store/plan_check_run.proto
index c900322e87..6ee65cb9b6 100644
--- a/proto/store/plan_check_run.proto
+++ b/proto/store/plan_check_run.proto
@@ -38,25 +38,25 @@ message PlanCheckRunResult {
Status status = 1;
string title = 2;
string content = 3;
- int64 code = 4;
+ int32 code = 4;
oneof report {
SqlSummaryReport sql_summary_report = 5;
SqlReviewReport sql_review_report = 6;
}
message SqlSummaryReport {
- int64 code = 1;
+ int32 code = 1;
// statement_types are the types of statements that are found in the sql.
repeated string statement_types = 2;
- int64 affected_rows = 3;
+ int32 affected_rows = 3;
ChangedResources changed_resources = 4;
}
message SqlReviewReport {
- int64 line = 1;
- int64 column = 2;
+ int32 line = 1;
+ int32 column = 2;
string detail = 3;
// Code from sql review.
- int64 code = 4;
+ int32 code = 4;
}
}
}
diff --git a/proto/store/slow_query.proto b/proto/store/slow_query.proto
index 4792c0d255..30297edcd4 100644
--- a/proto/store/slow_query.proto
+++ b/proto/store/slow_query.proto
@@ -19,7 +19,7 @@ message SlowQueryStatisticsItem {
string sql_fingerprint = 1;
// count is the number of slow queries with the same fingerprint.
- int64 count = 2;
+ int32 count = 2;
// latest_log_time is the time of the latest slow query with the same fingerprint.
google.protobuf.Timestamp latest_log_time = 3;
@@ -31,16 +31,16 @@ message SlowQueryStatisticsItem {
google.protobuf.Duration maximum_query_time = 5;
// The total rows sent of the slow query log.
- int64 total_rows_sent = 6;
+ int32 total_rows_sent = 6;
// The maximum rows sent of the slow query log.
- int64 maximum_rows_sent = 7;
+ int32 maximum_rows_sent = 7;
// The total rows examined of the slow query log.
- int64 total_rows_examined = 8;
+ int32 total_rows_examined = 8;
// The maximum rows examined of the slow query log.
- int64 maximum_rows_examined = 9;
+ int32 maximum_rows_examined = 9;
// samples are the details of the sample slow queries with the same fingerprint.
repeated SlowQueryDetails samples = 10;
@@ -58,10 +58,10 @@ message SlowQueryDetails {
google.protobuf.Duration lock_time = 3;
// rows_sent is the number of rows sent by the slow query.
- int64 rows_sent = 4;
+ int32 rows_sent = 4;
// rows_examined is the number of rows examined by the slow query.
- int64 rows_examined = 5;
+ int32 rows_examined = 5;
// sql_text is the SQL text of the slow query.
string sql_text = 6;
diff --git a/proto/v1/database_service.proto b/proto/v1/database_service.proto
index 82ba156a4e..b7f5a8e302 100644
--- a/proto/v1/database_service.proto
+++ b/proto/v1/database_service.proto
@@ -881,7 +881,7 @@ message SlowQueryStatistics {
string sql_fingerprint = 1;
// The count of the slow query log.
- int64 count = 2;
+ int32 count = 2;
// The latest log time of the slow query log.
google.protobuf.Timestamp latest_log_time = 3;
@@ -893,16 +893,16 @@ message SlowQueryStatistics {
google.protobuf.Duration maximum_query_time = 5;
// The average rows sent of the slow query log.
- int64 average_rows_sent = 6;
+ int32 average_rows_sent = 6;
// The maximum rows sent of the slow query log.
- int64 maximum_rows_sent = 7;
+ int32 maximum_rows_sent = 7;
// The average rows examined of the slow query log.
- int64 average_rows_examined = 8;
+ int32 average_rows_examined = 8;
// The maximum rows examined of the slow query log.
- int64 maximum_rows_examined = 9;
+ int32 maximum_rows_examined = 9;
// The percentage of the query time.
double query_time_percent = 10;
@@ -926,10 +926,10 @@ message SlowQueryDetails {
google.protobuf.Duration lock_time = 3;
// The rows sent of the slow query log.
- int64 rows_sent = 4;
+ int32 rows_sent = 4;
// The rows examined of the slow query log.
- int64 rows_examined = 5;
+ int32 rows_examined = 5;
// The sql text of the slow query log.
string sql_text = 6;
diff --git a/proto/v1/risk_service.proto b/proto/v1/risk_service.proto
index 99df92e6c5..df622cc43c 100644
--- a/proto/v1/risk_service.proto
+++ b/proto/v1/risk_service.proto
@@ -101,7 +101,7 @@ message Risk {
Source source = 3;
string title = 4;
- int64 level = 5;
+ int32 level = 5;
bool active = 7;
google.type.Expr condition = 8;
}
diff --git a/proto/v1/rollout_service.proto b/proto/v1/rollout_service.proto
index 0aef526e37..98dbab9eb6 100644
--- a/proto/v1/rollout_service.proto
+++ b/proto/v1/rollout_service.proto
@@ -415,25 +415,25 @@ message PlanCheckRun {
Status status = 1;
string title = 2;
string content = 3;
- int64 code = 4;
+ int32 code = 4;
oneof report {
SqlSummaryReport sql_summary_report = 5;
SqlReviewReport sql_review_report = 6;
}
message SqlSummaryReport {
- int64 code = 1;
+ int32 code = 1;
// statement_types are the types of statements that are found in the sql.
repeated string statement_types = 2;
- int64 affected_rows = 3;
+ int32 affected_rows = 3;
ChangedResources changed_resources = 4;
}
message SqlReviewReport {
- int64 line = 1;
- int64 column = 2;
+ int32 line = 1;
+ int32 column = 2;
string detail = 3;
// Code from sql review.
- int64 code = 4;
+ int32 code = 4;
}
}
}