Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: no double ok (#12865)
Danny Xuc7ecadac6b7d
diff --git a/backend/plugin/advisor/generator/mssql.template b/backend/plugin/advisor/generator/mssql.templateindex 3a37605151..f4fec647f8 100644--- a/backend/plugin/advisor/generator/mssql.template+++ b/backend/plugin/advisor/generator/mssql.template@@ -56,13 +56,5 @@ type %CheckerName struct {// generateAdvice returns the advices generated by the listener, the advices must not be empty.func (l *%CheckerName) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/generator/mysql.template b/backend/plugin/advisor/generator/mysql.templateindex a82cff28ac..f57e8ef6ed 100644--- a/backend/plugin/advisor/generator/mysql.template+++ b/backend/plugin/advisor/generator/mysql.template@@ -46,14 +46,6 @@ func (*%AdvisorName) Check(ctx advisor.Context, _ string) ([]*storepb.Advice, er(stmt).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/generator/oracle.template b/backend/plugin/advisor/generator/oracle.templateindex 4a381fdc19..eb0237f2b3 100644--- a/backend/plugin/advisor/generator/oracle.template+++ b/backend/plugin/advisor/generator/oracle.template@@ -58,13 +58,5 @@ type %CheckerName struct {func (l *%CheckerName) generateAdvice() ([]*storepb.Advice, error) {advice := []*storepb.Advice{}- if len(advice) == 0 {- advice = append(advice, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return advice, nil}diff --git a/backend/plugin/advisor/generator/postgresql.template b/backend/plugin/advisor/generator/postgresql.templateindex a99aff7037..a5ac29dd06 100644--- a/backend/plugin/advisor/generator/postgresql.template+++ b/backend/plugin/advisor/generator/postgresql.template@@ -43,14 +43,6 @@ func (*%AdvisorName) Check(ctx advisor.Context, _ string) ([]*storepb.Advice, erast.Walk(checker, stmt)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/generator/snowflake.template b/backend/plugin/advisor/generator/snowflake.templateindex df3714457a..db302704c4 100644--- a/backend/plugin/advisor/generator/snowflake.template+++ b/backend/plugin/advisor/generator/snowflake.template@@ -56,13 +56,5 @@ type %CheckerName struct {// generateAdvice returns the advices generated by the listener, the advices must not be empty.func (l *%CheckerName) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/mssql/advisor_column_maximum_varchar_length.go b/backend/plugin/advisor/mssql/advisor_column_maximum_varchar_length.goindex 6335d60aec..5124b8151a 100644--- a/backend/plugin/advisor/mssql/advisor_column_maximum_varchar_length.go+++ b/backend/plugin/advisor/mssql/advisor_column_maximum_varchar_length.go@@ -78,14 +78,6 @@ type columnMaximumVarcharLengthChecker struct {// generateAdvice returns the advices generated by the listener, the advices must not be empty.func (l *columnMaximumVarcharLengthChecker) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/mssql/advisor_column_no_null.go b/backend/plugin/advisor/mssql/advisor_column_no_null.goindex 692abb4c38..146683e28b 100644--- a/backend/plugin/advisor/mssql/advisor_column_no_null.go+++ b/backend/plugin/advisor/mssql/advisor_column_no_null.go@@ -69,14 +69,6 @@ type columnNoNullChecker struct {// generateAdvice returns the advices generated by the listener, the advices must not be empty.func (l *columnNoNullChecker) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/mssql/advisor_column_require.go b/backend/plugin/advisor/mssql/advisor_column_require.goindex 57cf065b37..a2e542f315 100644--- a/backend/plugin/advisor/mssql/advisor_column_require.go+++ b/backend/plugin/advisor/mssql/advisor_column_require.go@@ -80,14 +80,6 @@ type columnRequireChecker struct {// generateAdvice returns the advices generated by the listener, the advices must not be empty.func (l *columnRequireChecker) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/mssql/advisor_column_type_disallow_list.go b/backend/plugin/advisor/mssql/advisor_column_type_disallow_list.goindex 260347e320..cd048c0909 100644--- a/backend/plugin/advisor/mssql/advisor_column_type_disallow_list.go+++ b/backend/plugin/advisor/mssql/advisor_column_type_disallow_list.go@@ -50,14 +50,6 @@ func (*ColumnTypeDisallowListAdvisor) Check(ctx advisor.Context, _ string) ([]*santlr.ParseTreeWalkerDefault.Walk(checker, tree)- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mssql/advisor_function_disallow_create_or_alter.go b/backend/plugin/advisor/mssql/advisor_function_disallow_create_or_alter.goindex b33f596c53..e145bc2367 100644--- a/backend/plugin/advisor/mssql/advisor_function_disallow_create_or_alter.go+++ b/backend/plugin/advisor/mssql/advisor_function_disallow_create_or_alter.go@@ -42,14 +42,6 @@ func (*FunctionDisallowCreateOrAlterAdvisor) Check(ctx advisor.Context, _ stringantlr.ParseTreeWalkerDefault.Walk(checker, tree)- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mssql/advisor_index_not_redundant.go b/backend/plugin/advisor/mssql/advisor_index_not_redundant.goindex 137c044761..6927af2503 100644--- a/backend/plugin/advisor/mssql/advisor_index_not_redundant.go+++ b/backend/plugin/advisor/mssql/advisor_index_not_redundant.go@@ -55,15 +55,6 @@ func (IndexNotRedundantAdvisor) Check(ctx advisor.Context, _ string) ([]*storepbantlr.ParseTreeWalkerDefault.Walk(checker, tree)- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }-return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mssql/advisor_migration_compatibility.go b/backend/plugin/advisor/mssql/advisor_migration_compatibility.goindex 6eff287abb..37d1dfe6a5 100644--- a/backend/plugin/advisor/mssql/advisor_migration_compatibility.go+++ b/backend/plugin/advisor/mssql/advisor_migration_compatibility.go@@ -74,14 +74,6 @@ type migrationCompatibilityChecker struct {// generateAdvice returns the advices generated by the listener, the advices must not be empty.func (l *migrationCompatibilityChecker) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/mssql/advisor_naming_identifier_no_keyword.go b/backend/plugin/advisor/mssql/advisor_naming_identifier_no_keyword.goindex 8078a98078..23e3532a3a 100644--- a/backend/plugin/advisor/mssql/advisor_naming_identifier_no_keyword.go+++ b/backend/plugin/advisor/mssql/advisor_naming_identifier_no_keyword.go@@ -59,14 +59,6 @@ type namingIdentifierNoKeywordChecker struct {// generateAdvice returns the advices generated by the listener, the advices must not be empty.func (l *namingIdentifierNoKeywordChecker) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/mssql/advisor_naming_table.go b/backend/plugin/advisor/mssql/advisor_naming_table.goindex d1778beca9..7f62dd1fc5 100644--- a/backend/plugin/advisor/mssql/advisor_naming_table.go+++ b/backend/plugin/advisor/mssql/advisor_naming_table.go@@ -71,14 +71,6 @@ type namingTableListener struct {// generateAdvice returns the advices generated by the listener, the advices must not be empty.func (l *namingTableListener) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/mssql/advisor_naming_table_no_keyword.go b/backend/plugin/advisor/mssql/advisor_naming_table_no_keyword.goindex a8ca25f2af..7a6a86ed7f 100644--- a/backend/plugin/advisor/mssql/advisor_naming_table_no_keyword.go+++ b/backend/plugin/advisor/mssql/advisor_naming_table_no_keyword.go@@ -59,14 +59,6 @@ type namingTableNoKeywordChecker struct {// generateAdvice returns the advices generated by the listener, the advices must not be empty.func (l *namingTableNoKeywordChecker) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/mssql/advisor_procedure_disallow_create_or_alter.go b/backend/plugin/advisor/mssql/advisor_procedure_disallow_create_or_alter.goindex 58a38ef977..64c80a6642 100644--- a/backend/plugin/advisor/mssql/advisor_procedure_disallow_create_or_alter.go+++ b/backend/plugin/advisor/mssql/advisor_procedure_disallow_create_or_alter.go@@ -41,14 +41,6 @@ func (*ProcedureDisallowCreateOrAlterAdvisor) Check(ctx advisor.Context, _ strinantlr.ParseTreeWalkerDefault.Walk(checker, tree)- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mssql/advisor_select_no_select_all.go b/backend/plugin/advisor/mssql/advisor_select_no_select_all.goindex f2259032ce..7d0c3f052b 100644--- a/backend/plugin/advisor/mssql/advisor_select_no_select_all.go+++ b/backend/plugin/advisor/mssql/advisor_select_no_select_all.go@@ -56,14 +56,6 @@ type selectNoSelectAllChecker struct {// generateAdvice returns the advices generated by the listener, the advices must not be empty.func (l *selectNoSelectAllChecker) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/mssql/advisor_statement_disallow_cross_db_queries.go b/backend/plugin/advisor/mssql/advisor_statement_disallow_cross_db_queries.goindex f307e51793..5cd4cc2b9f 100644--- a/backend/plugin/advisor/mssql/advisor_statement_disallow_cross_db_queries.go+++ b/backend/plugin/advisor/mssql/advisor_statement_disallow_cross_db_queries.go@@ -46,15 +46,6 @@ func (*DisallowCrossDBQueriesAdvisor) Check(ctx advisor.Context, _ string) ([]*santlr.ParseTreeWalkerDefault.Walk(checker, tree)- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }-return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mssql/advisor_statement_where_disallow_functions_and_calculations.go b/backend/plugin/advisor/mssql/advisor_statement_where_disallow_functions_and_calculations.goindex 4d289b9830..25ecc1b3fb 100644--- a/backend/plugin/advisor/mssql/advisor_statement_where_disallow_functions_and_calculations.go+++ b/backend/plugin/advisor/mssql/advisor_statement_where_disallow_functions_and_calculations.go@@ -56,15 +56,6 @@ func (*DisallowFuncAndCalculationsAdvisor) Check(ctx advisor.Context, _ string)antlr.ParseTreeWalkerDefault.Walk(checker, tree)- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }-return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mssql/advisor_table_disallow_ddl.go b/backend/plugin/advisor/mssql/advisor_table_disallow_ddl.goindex 8b67691ec5..a518f65deb 100644--- a/backend/plugin/advisor/mssql/advisor_table_disallow_ddl.go+++ b/backend/plugin/advisor/mssql/advisor_table_disallow_ddl.go@@ -47,14 +47,6 @@ func (*TableDisallowDDLAdvisor) Check(ctx advisor.Context, _ string) ([]*storepbantlr.ParseTreeWalkerDefault.Walk(checker, tree)- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mssql/advisor_table_disallow_dml.go b/backend/plugin/advisor/mssql/advisor_table_disallow_dml.goindex 82d051d9f6..e33cf73c91 100644--- a/backend/plugin/advisor/mssql/advisor_table_disallow_dml.go+++ b/backend/plugin/advisor/mssql/advisor_table_disallow_dml.go@@ -47,14 +47,6 @@ func (*TableDisallowDMLAdvisor) Check(ctx advisor.Context, _ string) ([]*storepbantlr.ParseTreeWalkerDefault.Walk(checker, tree)- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mssql/advisor_table_drop_naming_convention.go b/backend/plugin/advisor/mssql/advisor_table_drop_naming_convention.goindex 179203b6c3..638e2b39ad 100644--- a/backend/plugin/advisor/mssql/advisor_table_drop_naming_convention.go+++ b/backend/plugin/advisor/mssql/advisor_table_drop_naming_convention.go@@ -66,14 +66,6 @@ type tableDropNamingConventionChecker struct {// generateAdvice returns the advices generated by the listener, the advices must not be empty.func (l *tableDropNamingConventionChecker) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/mssql/advisor_table_no_foreign_key.go b/backend/plugin/advisor/mssql/advisor_table_no_foreign_key.goindex 6c93ec8af8..1f6eca6f53 100644--- a/backend/plugin/advisor/mssql/advisor_table_no_foreign_key.go+++ b/backend/plugin/advisor/mssql/advisor_table_no_foreign_key.go@@ -87,16 +87,6 @@ func (l *tableNoForeignKeyChecker) generateAdvice() ([]*storepb.Advice, error) {})}}- if len(l.adviceList) == 0 {- return []*storepb.Advice{- {- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- },- }, nil- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/mssql/advisor_table_require_pk.go b/backend/plugin/advisor/mssql/advisor_table_require_pk.goindex b45f0ab971..31d3f95e46 100644--- a/backend/plugin/advisor/mssql/advisor_table_require_pk.go+++ b/backend/plugin/advisor/mssql/advisor_table_require_pk.go@@ -87,14 +87,6 @@ func (l *tableRequirePkChecker) generateAdvice() ([]*storepb.Advice, error) {})}}- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/mssql/advisor_where_require.go b/backend/plugin/advisor/mssql/advisor_where_require.goindex 543933d176..b36c2b7bb2 100644--- a/backend/plugin/advisor/mssql/advisor_where_require.go+++ b/backend/plugin/advisor/mssql/advisor_where_require.go@@ -56,14 +56,6 @@ type whereRequireChecker struct {// generateAdvice returns the advices generated by the listener, the advices must not be empty.func (l *whereRequireChecker) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/mssql/test/column_maximum_varchar_length.yaml b/backend/plugin/advisor/mssql/test/column_maximum_varchar_length.yamlindex 6070c5af5e..1be47f4835 100644--- a/backend/plugin/advisor/mssql/test/column_maximum_varchar_length.yaml+++ b/backend/plugin/advisor/mssql/test/column_maximum_varchar_length.yaml@@ -1,12 +1,7 @@- statement: CREATE TABLE MyTable(a VARCHAR(20));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE MyTable ADD b VARCHAR(3000);+ changeType: 0want:- status: 2code: 422@@ -16,7 +11,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE MyTable ALTER COLUMN a VARCHAR(MAX);+ changeType: 0want:- status: 2code: 422@@ -26,7 +23,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE MyTable ALTER COLUMN a NVARCHAR(MAX);+ changeType: 0want:- status: 2code: 422@@ -36,3 +35,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mssql/test/column_no_null.yaml b/backend/plugin/advisor/mssql/test/column_no_null.yamlindex 627578182b..ebec8f7010 100644--- a/backend/plugin/advisor/mssql/test/column_no_null.yaml+++ b/backend/plugin/advisor/mssql/test/column_no_null.yaml@@ -5,6 +5,7 @@Age INT,Address VARCHAR(200));+ changeType: 0want:- status: 2code: 402@@ -14,6 +15,7 @@startposition:line: 4column: 0+ endposition: null- status: 2code: 402title: column.no-null@@ -22,6 +24,7 @@startposition:line: 5column: 0+ endposition: null- statement: |-CREATE TABLE MyTable (Id INT,@@ -30,6 +33,7 @@Address VARCHAR(200),PRIMARY KEY (Id, Age));+ changeType: 0want:- status: 2code: 402@@ -39,7 +43,9 @@startposition:line: 5column: 0+ endposition: null- statement: ALTER TABLE MyTable ALTER COLUMN Name VARCHAR(100) NULL;+ changeType: 0want:- status: 2code: 402@@ -49,15 +55,11 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE MyTable ALTER COLUMN Name VARCHAR(100) NOT NULL;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE MyTable ADD Age INT;+ changeType: 0want:- status: 2code: 402@@ -67,7 +69,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE MyTable ADD Age INT NULL;+ changeType: 0want:- status: 2code: 402@@ -77,11 +81,6 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE MyTable ADD Age INT NOT NULL;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/mssql/test/column_required.yaml b/backend/plugin/advisor/mssql/test/column_required.yamlindex a3a8c6741f..98ad3c3268 100644--- a/backend/plugin/advisor/mssql/test/column_required.yaml+++ b/backend/plugin/advisor/mssql/test/column_required.yaml@@ -6,18 +6,13 @@updated_ts INT,updater_id INT);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t (name TEXT,age INT);+ changeType: 0want:- status: 2code: 401@@ -27,6 +22,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 401title: column.required@@ -35,6 +31,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 401title: column.required@@ -43,6 +40,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 401title: column.required@@ -51,6 +49,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 401title: column.required@@ -59,6 +58,7 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE t (id INT,@@ -66,6 +66,7 @@created_ts INT,updater_id INT);+ changeType: 0want:- status: 2code: 401@@ -75,7 +76,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE t DROP COLUMN created_ts;+ changeType: 0want:- status: 2code: 401@@ -85,7 +88,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE t DROP COLUMN creator_id;+ changeType: 0want:- status: 2code: 401@@ -95,3 +100,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mssql/test/column_type_disallow_list.yaml b/backend/plugin/advisor/mssql/test/column_type_disallow_list.yamlindex b9a82e286c..743805953a 100644--- a/backend/plugin/advisor/mssql/test/column_type_disallow_list.yaml+++ b/backend/plugin/advisor/mssql/test/column_type_disallow_list.yaml@@ -4,6 +4,7 @@age INT,payload JSON);+ changeType: 0want:- status: 2code: 411@@ -13,3 +14,4 @@startposition:line: 4column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mssql/test/index_not_redundant.yaml b/backend/plugin/advisor/mssql/test/index_not_redundant.yamlindex 777011de15..b28b72ff77 100644--- a/backend/plugin/advisor/mssql/test/index_not_redundant.yaml+++ b/backend/plugin/advisor/mssql/test/index_not_redundant.yaml@@ -1,4 +1,5 @@- statement: CREATE INDEX test_index ON dbo.pokes (c1, c2);+ changeType: 0want:- status: 2code: 817@@ -8,15 +9,11 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE INDEX test_index ON dbo.pokes (c100, c200);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE INDEX test_index ON [dbo].[pokes] (c1, c2);+ changeType: 0want:- status: 2code: 817@@ -26,3 +23,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mssql/test/naming_identifier_no_keyword.yaml b/backend/plugin/advisor/mssql/test/naming_identifier_no_keyword.yamlindex 6d5e00cff0..d7fa567818 100644--- a/backend/plugin/advisor/mssql/test/naming_identifier_no_keyword.yaml+++ b/backend/plugin/advisor/mssql/test/naming_identifier_no_keyword.yaml@@ -1,6 +1,7 @@- statement: |-CREATE TABLE [Fillfactor](Id INT, [Exec] INT);CREATE INDEX [Add] ON [Fillfactor]([Exec]);+ changeType: 0want:- status: 2code: 308@@ -10,6 +11,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 308title: naming.identifier.no-keyword@@ -18,6 +20,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 308title: naming.identifier.no-keyword@@ -26,6 +29,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 308title: naming.identifier.no-keyword@@ -34,3 +38,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mssql/test/naming_table.yaml b/backend/plugin/advisor/mssql/test/naming_table.yamlindex 2926e0b57d..d3926dd5b4 100644--- a/backend/plugin/advisor/mssql/test/naming_table.yaml+++ b/backend/plugin/advisor/mssql/test/naming_table.yaml@@ -1,12 +1,7 @@- statement: CREATE TABLE ALL_UPPERCASE(ID INT);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE [\\](ID INT);+ changeType: 0want:- status: 2code: 301@@ -16,7 +11,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE all_lowercase(ID INT);+ changeType: 0want:- status: 2code: 301@@ -26,23 +23,13 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE PascalCase(ID INT);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: execute sp_rename 'Sales.SalesTerritory', 'SALESTERR';- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: execute sp_rename 'Sales.SalesTerritory', 'salesTerr';+ changeType: 0want:- status: 2code: 301@@ -52,3 +39,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mssql/test/naming_table_no_keyword.yaml b/backend/plugin/advisor/mssql/test/naming_table_no_keyword.yamlindex f9ac2a2a83..a61878f6cd 100644--- a/backend/plugin/advisor/mssql/test/naming_table_no_keyword.yaml+++ b/backend/plugin/advisor/mssql/test/naming_table_no_keyword.yaml@@ -1,4 +1,5 @@- statement: CREATE TABLE [fillfactor] (id INT);+ changeType: 0want:- status: 2code: 308@@ -8,7 +9,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE MyDB.MySchema.[fillfactor] (id INT);+ changeType: 0want:- status: 2code: 308@@ -18,11 +21,6 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE Person(id INT);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/mssql/test/schema_backward_compatibility.yaml b/backend/plugin/advisor/mssql/test/schema_backward_compatibility.yamlindex 5135d13725..947b6561d9 100644--- a/backend/plugin/advisor/mssql/test/schema_backward_compatibility.yaml+++ b/backend/plugin/advisor/mssql/test/schema_backward_compatibility.yaml@@ -1,4 +1,5 @@- statement: EXEC sp_rename N'Phone', N'Telephone', N'USERDATATYPE';+ changeType: 0want:- status: 2code: 102@@ -8,7 +9,9 @@startposition:line: 1column: 0+ endposition: null- statement: DROP TABLE MyTable;+ changeType: 0want:- status: 2code: 112@@ -18,17 +21,13 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE MyTable(Id INT PRIMARY KEY);DROP TABLE MyTable;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: DROP SCHEMA MySchema;+ changeType: 0want:- status: 2code: 112@@ -38,17 +37,13 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE SCHEMA AUTHORIZATION dbo;DROP SCHEMA dbo;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: DROP DATABASE MyDB;+ changeType: 0want:- status: 2code: 112@@ -58,16 +53,11 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE DATABASE MyDB;DROP DATABASE MyDB;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-ALTER TABLE MyTable DROP COLUMN MyColumnOne, MyColumnTwo;ALTER TABLE MyTable ALTER COLUMN MyColumnOne INT NOT NULL;@@ -78,6 +68,7 @@ALTER TABLE MyTable WITH CHECK ADD CONSTRAINT MyConstraint CHECK (MyColumnOne > 0);ALTER TABLE MyTable WITH NOCHECK ADD FOREIGN KEY (MyColumnOne) REFERENCES MyTableTwo(MyColumnTwo);ALTER TABLE MyTable WITH CHECK ADD FOREIGN KEY (MyColumnOne) REFERENCES MyTableTwo(MyColumnTwo);+ changeType: 0want:- status: 2code: 112@@ -87,6 +78,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 111title: schema.backward-compatibility@@ -95,6 +87,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 106title: schema.backward-compatibility@@ -103,6 +96,7 @@startposition:line: 3column: 0+ endposition: null- status: 2code: 107title: schema.backward-compatibility@@ -111,6 +105,7 @@startposition:line: 4column: 0+ endposition: null- status: 2code: 109title: schema.backward-compatibility@@ -119,6 +114,7 @@startposition:line: 5column: 0+ endposition: null- status: 2code: 108title: schema.backward-compatibility@@ -127,6 +123,7 @@startposition:line: 6column: 0+ endposition: null- status: 2code: 108title: schema.backward-compatibility@@ -135,7 +132,9 @@startposition:line: 8column: 0+ endposition: null- statement: EXEC sp_rename 'Sales.SalesTerritory', 'SalesTerr';+ changeType: 0want:- status: 2code: 102@@ -145,7 +144,9 @@startposition:line: 1column: 0+ endposition: null- statement: EXEC sp_rename 'dbo.ErrorLog.ErrorTime', 'ErrorDateTime', 'COLUMN';+ changeType: 0want:- status: 2code: 102@@ -155,3 +156,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mssql/test/statement_disallow_cross_db_queries.yaml b/backend/plugin/advisor/mssql/test/statement_disallow_cross_db_queries.yamlindex b293128cf7..9de88ba1b0 100644--- a/backend/plugin/advisor/mssql/test/statement_disallow_cross_db_queries.yaml+++ b/backend/plugin/advisor/mssql/test/statement_disallow_cross_db_queries.yaml@@ -1,15 +1,10 @@- statement: SELECT * FROM MASTER.dbo.pokes;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-WITH foo1 AS (SELECT * FROM master2.dbo.tech_book)SELECT * FROM master.dbo.pokes;CREATE TABLE pokes (foo int);+ changeType: 0want:- status: 2code: 233@@ -19,9 +14,11 @@startposition:line: 1column: 0+ endposition: null- statement: |-USE master2;SELECT * FROM master.dbo.pokes;+ changeType: 0want:- status: 2code: 233@@ -31,3 +28,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mssql/test/statement_select_no_select_all.yaml b/backend/plugin/advisor/mssql/test/statement_select_no_select_all.yamlindex da283d21ee..0548a580f9 100644--- a/backend/plugin/advisor/mssql/test/statement_select_no_select_all.yaml+++ b/backend/plugin/advisor/mssql/test/statement_select_no_select_all.yaml@@ -1,4 +1,5 @@- statement: SELECT * FROM t+ changeType: 0want:- status: 2code: 203@@ -8,15 +9,11 @@startposition:line: 1column: 0+ endposition: null- statement: SELECT a, b FROM t- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: SELECT a, b FROM (SELECT * from t1, t2) t+ changeType: 0want:- status: 2code: 203@@ -26,7 +23,9 @@startposition:line: 1column: 0+ endposition: null- statement: INSERT INTO t SELECT * FROM t1+ changeType: 0want:- status: 2code: 203@@ -36,3 +35,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mssql/test/statement_where_disallow_functions_and_calculations.yaml b/backend/plugin/advisor/mssql/test/statement_where_disallow_functions_and_calculations.yamlindex 5b7ed45615..e564f4a5c6 100644--- a/backend/plugin/advisor/mssql/test/statement_where_disallow_functions_and_calculations.yaml+++ b/backend/plugin/advisor/mssql/test/statement_where_disallow_functions_and_calculations.yaml@@ -3,6 +3,7 @@SELECT foo FROM pokes WHERE (foo + 1) * 2 > 0;INSERT INTO pokes VALUES(1);SELECT foo FROM pokes WHERE ~foo > 0;+ changeType: 0want:- status: 2code: 234@@ -12,6 +13,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 234title: statement.where.disallow-functions-and-calculations@@ -20,9 +22,11 @@startposition:line: 4column: 0+ endposition: null- statement: |-SELECT foo FROM pokes WHERE foo | -foo > 0;SELECT bar FROM pokes WHERE bar > AVG(bar);+ changeType: 0want:- status: 2code: 234@@ -32,6 +36,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 234title: statement.where.disallow-functions-and-calculations@@ -40,27 +45,17 @@startposition:line: 2column: 0+ endposition: null- statement: SELECT bar FROM pokes WHERE bar > 1;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-SELECT Department, AVG(Salary) AS AvgSalaryFROM EmployeesGROUP BY DepartmentHAVING AVG(Salary) * 3 + 1 > 50000;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: select * from (select * from t where t.a > 1) t1 where a > AVG(a);+ changeType: 0want:- status: 2code: 234@@ -70,3 +65,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mssql/test/statement_where_require.yaml b/backend/plugin/advisor/mssql/test/statement_where_require.yamlindex 5cea807206..498477137c 100644--- a/backend/plugin/advisor/mssql/test/statement_where_require.yaml+++ b/backend/plugin/advisor/mssql/test/statement_where_require.yaml@@ -1,4 +1,5 @@- statement: SELECT * FROM MyTable;+ changeType: 0want:- status: 2code: 202@@ -8,15 +9,11 @@startposition:line: 1column: 0+ endposition: null- statement: SELECT * FROM MyTable WHERE a = 1;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: UPDATE MyTable SET a = 1;+ changeType: 0want:- status: 2code: 202@@ -26,15 +23,11 @@startposition:line: 1column: 0+ endposition: null- statement: UPDATE MyTable SET a = 1 WHERE a = 1;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: DELETE FROM MyTable;+ changeType: 0want:- status: 2code: 202@@ -44,18 +37,14 @@startposition:line: 1column: 0+ endposition: null- statement: DELETE FROM MyTable WHERE a = 1;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-WITH CteA AS (SELECT * FROM TableA WHERE a = 1),CteB AS (SELECT * FROM TableB)SELECT * FROM CteA INNER JOIN CteB ON CteA.a = CteB.b;+ changeType: 0want:- status: 2code: 202@@ -65,6 +54,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 202title: statement.where.require@@ -73,11 +63,6 @@startposition:line: 3column: 0+ endposition: null- statement: SELECT 1;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/mssql/test/system_function_disallow_create.yaml b/backend/plugin/advisor/mssql/test/system_function_disallow_create.yamlindex f132aece0b..851b078be4 100644--- a/backend/plugin/advisor/mssql/test/system_function_disallow_create.yaml+++ b/backend/plugin/advisor/mssql/test/system_function_disallow_create.yaml@@ -13,6 +13,7 @@SET @ret = 0;RETURN @ret;END;+ changeType: 0want:- status: 2code: 1701@@ -22,3 +23,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mssql/test/system_procedure_disallow_create.yaml b/backend/plugin/advisor/mssql/test/system_procedure_disallow_create.yamlindex b325c85610..d677574320 100644--- a/backend/plugin/advisor/mssql/test/system_procedure_disallow_create.yaml+++ b/backend/plugin/advisor/mssql/test/system_procedure_disallow_create.yaml@@ -17,6 +17,7 @@WHERE FirstName = @FirstName AND LastName = @LastName;ENDGO+ changeType: 0want:- status: 2code: 1701@@ -26,3 +27,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mssql/test/table_disallow_ddl.yaml b/backend/plugin/advisor/mssql/test/table_disallow_ddl.yamlindex 9e9957fe99..ed9b7a0f0c 100644--- a/backend/plugin/advisor/mssql/test/table_disallow_ddl.yaml+++ b/backend/plugin/advisor/mssql/test/table_disallow_ddl.yaml@@ -7,6 +7,7 @@Id INT NOT NULL,Name VARCHAR(50) NOT NULL);+ changeType: 0want:- status: 2code: 613@@ -16,3 +17,4 @@startposition:line: 5column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mssql/test/table_disallow_dml.yaml b/backend/plugin/advisor/mssql/test/table_disallow_dml.yamlindex ba81cde93c..829f392a8d 100644--- a/backend/plugin/advisor/mssql/test/table_disallow_dml.yaml+++ b/backend/plugin/advisor/mssql/test/table_disallow_dml.yaml@@ -2,6 +2,7 @@MERGE INTO MySchema.Identifier USING MySchema.MyTable ON Identifier.Id = MyTable.IdWHEN MATCHED THEN UPDATE SET Identifier.Name = MyTable.NameWHEN NOT MATCHED THEN INSERT (Id, Name) VALUES (MyTable.Id, MyTable.Name);+ changeType: 0want:- status: 2code: 614@@ -11,9 +12,11 @@startposition:line: 1column: 0+ endposition: null- statement: |-INSERT INTO MySchema.MyTable (Id, Name) VALUES (1, 'Alice');INSERT INTO MySchema.Identifier (Id, Name) VALUES (1, 'Alice');+ changeType: 0want:- status: 2code: 614@@ -23,7 +26,9 @@startposition:line: 2column: 0+ endposition: null- statement: DELETE FROM MySchema.Identifier WHERE Id = 1;+ changeType: 0want:- status: 2code: 614@@ -33,7 +38,9 @@startposition:line: 1column: 0+ endposition: null- statement: UPDATE MySchema.Identifier SET Name = 'Bob' WHERE Id = 1;+ changeType: 0want:- status: 2code: 614@@ -43,7 +50,9 @@startposition:line: 1column: 0+ endposition: null- statement: SELECT * INTO MySchema.Identifier FROM MySchema.MyTable;+ changeType: 0want:- status: 2code: 614@@ -53,3 +62,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mssql/test/table_drop_naming_convention.yaml b/backend/plugin/advisor/mssql/test/table_drop_naming_convention.yamlindex a310421168..3a6cb28c72 100644--- a/backend/plugin/advisor/mssql/test/table_drop_naming_convention.yaml+++ b/backend/plugin/advisor/mssql/test/table_drop_naming_convention.yaml@@ -1,12 +1,7 @@- statement: DROP TABLE IF EXISTS [Foo_delete];- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: DROP TABLE Foo;+ changeType: 0want:- status: 2code: 603@@ -16,7 +11,9 @@startposition:line: 1column: 0+ endposition: null- statement: DROP TABLE [Foo], [Bar_delete];+ changeType: 0want:- status: 2code: 603@@ -26,3 +23,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mssql/test/table_no_foreign_key.yaml b/backend/plugin/advisor/mssql/test/table_no_foreign_key.yamlindex 43cfab64dc..798652a80a 100644--- a/backend/plugin/advisor/mssql/test/table_no_foreign_key.yaml+++ b/backend/plugin/advisor/mssql/test/table_no_foreign_key.yaml@@ -5,6 +5,7 @@FullName VARCHAR(10),POSITION VARCHAR(100));+ changeType: 0want:- status: 2code: 602@@ -14,6 +15,7 @@startposition:line: 3column: 0+ endposition: null- statement: |-CREATE TABLE Customer(@@ -22,6 +24,7 @@Position VARCHAR(100),FOREIGN KEY (Id) REFERENCES PERSON(Id));+ changeType: 0want:- status: 2code: 602@@ -31,6 +34,7 @@startposition:line: 6column: 0+ endposition: null- statement: |-CREATE TABLE Customer(@@ -39,6 +43,7 @@Position VARCHAR(100));ALTER TABLE Customer ADD FOREIGN KEY (Id) REFERENCES Person(Id);+ changeType: 0want:- status: 2code: 602@@ -48,6 +53,7 @@startposition:line: 7column: 0+ endposition: null- statement: |-CREATE TABLE Customer(@@ -61,10 +67,4 @@FullName VARCHAR(10),Position VARCHAR(100));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/mssql/test/table_require_pk.yaml b/backend/plugin/advisor/mssql/test/table_require_pk.yamlindex ec3092c4a4..70770e7009 100644--- a/backend/plugin/advisor/mssql/test/table_require_pk.yaml+++ b/backend/plugin/advisor/mssql/test/table_require_pk.yaml@@ -3,6 +3,7 @@Id INT NOT NULL,Name VARCHAR(50) NOT NULL);+ changeType: 0want:- status: 2code: 601@@ -12,36 +13,19 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE MySchema.MyTable (Id INT NOT NULL PRIMARY KEY,Name VARCHAR(50) NOT NULL);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE MySchema.MyTable (Id INT NOT NULL,Name VARCHAR(50) NOT NULL,PRIMARY KEY (Id));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE MySchema.MyTable ADD CONSTRAINT PK_MyTable PRIMARY KEY (Id);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/mysql/advisor_charset_allowlist.go b/backend/plugin/advisor/mysql/advisor_charset_allowlist.goindex f329561f08..db9b206f58 100644--- a/backend/plugin/advisor/mysql/advisor_charset_allowlist.go+++ b/backend/plugin/advisor/mysql/advisor_charset_allowlist.go@@ -55,14 +55,6 @@ func (*CharsetAllowlistAdvisor) Check(ctx advisor.Context, _ string) ([]*storepbantlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_collation_allowlist.go b/backend/plugin/advisor/mysql/advisor_collation_allowlist.goindex e200bf81a7..b67f0a9bc8 100644--- a/backend/plugin/advisor/mysql/advisor_collation_allowlist.go+++ b/backend/plugin/advisor/mysql/advisor_collation_allowlist.go@@ -56,14 +56,6 @@ func (*CollationAllowlistAdvisor) Check(ctx advisor.Context, _ string) ([]*storeantlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_colum_require_default.go b/backend/plugin/advisor/mysql/advisor_colum_require_default.goindex c5e50e1308..ef8e8d13d8 100644--- a/backend/plugin/advisor/mysql/advisor_colum_require_default.go+++ b/backend/plugin/advisor/mysql/advisor_colum_require_default.go@@ -47,14 +47,6 @@ func (*ColumnRequireDefaultAdvisor) Check(ctx advisor.Context, _ string) ([]*stoantlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_column_auto_increment_initial_value.go b/backend/plugin/advisor/mysql/advisor_column_auto_increment_initial_value.goindex f86ac916ae..8c22d92692 100644--- a/backend/plugin/advisor/mysql/advisor_column_auto_increment_initial_value.go+++ b/backend/plugin/advisor/mysql/advisor_column_auto_increment_initial_value.go@@ -56,14 +56,6 @@ func (*ColumnAutoIncrementInitialValueAdvisor) Check(ctx advisor.Context, _ striantlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_column_auto_increment_must_integer.go b/backend/plugin/advisor/mysql/advisor_column_auto_increment_must_integer.goindex a944950967..d9e67cf12f 100644--- a/backend/plugin/advisor/mysql/advisor_column_auto_increment_must_integer.go+++ b/backend/plugin/advisor/mysql/advisor_column_auto_increment_must_integer.go@@ -50,14 +50,6 @@ func (*ColumnAutoIncrementMustIntegerAdvisor) Check(ctx advisor.Context, _ strinantlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_column_auto_increment_must_unsigned.go b/backend/plugin/advisor/mysql/advisor_column_auto_increment_must_unsigned.goindex d1358ae732..7685a47346 100644--- a/backend/plugin/advisor/mysql/advisor_column_auto_increment_must_unsigned.go+++ b/backend/plugin/advisor/mysql/advisor_column_auto_increment_must_unsigned.go@@ -50,14 +50,6 @@ func (*ColumnAutoIncrementMustUnsignedAdvisor) Check(ctx advisor.Context, _ striantlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_column_comment_convention.go b/backend/plugin/advisor/mysql/advisor_column_comment_convention.goindex 575909a2c8..c7397df4f6 100644--- a/backend/plugin/advisor/mysql/advisor_column_comment_convention.go+++ b/backend/plugin/advisor/mysql/advisor_column_comment_convention.go@@ -56,14 +56,6 @@ func (*ColumnCommentConventionAdvisor) Check(ctx advisor.Context, _ string) ([]*antlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_column_current_time_count_limit.go b/backend/plugin/advisor/mysql/advisor_column_current_time_count_limit.goindex 608eecc3f2..3161de914f 100644--- a/backend/plugin/advisor/mysql/advisor_column_current_time_count_limit.go+++ b/backend/plugin/advisor/mysql/advisor_column_current_time_count_limit.go@@ -238,13 +238,6 @@ func (checker *columnCurrentTimeCountLimitChecker) generateAdvice() []*storepb.A})}}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }+return checker.adviceList}diff --git a/backend/plugin/advisor/mysql/advisor_column_disallow_changing.go b/backend/plugin/advisor/mysql/advisor_column_disallow_changing.goindex ab791f303f..ad2b4346a3 100644--- a/backend/plugin/advisor/mysql/advisor_column_disallow_changing.go+++ b/backend/plugin/advisor/mysql/advisor_column_disallow_changing.go@@ -50,14 +50,6 @@ func (*ColumnDisallowChangingAdvisor) Check(ctx advisor.Context, _ string) ([]*santlr.ParseTreeWalkerDefault.Walk(checker, stmtNode.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_column_disallow_changing_order.go b/backend/plugin/advisor/mysql/advisor_column_disallow_changing_order.goindex 9e7c88408e..636f47220e 100644--- a/backend/plugin/advisor/mysql/advisor_column_disallow_changing_order.go+++ b/backend/plugin/advisor/mysql/advisor_column_disallow_changing_order.go@@ -50,14 +50,6 @@ func (*ColumnDisallowChangingOrderAdvisor) Check(ctx advisor.Context, _ string)antlr.ParseTreeWalkerDefault.Walk(checker, stmtNode.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_column_disallow_changing_type.go b/backend/plugin/advisor/mysql/advisor_column_disallow_changing_type.goindex 526f3309c4..8236d736aa 100644--- a/backend/plugin/advisor/mysql/advisor_column_disallow_changing_type.go+++ b/backend/plugin/advisor/mysql/advisor_column_disallow_changing_type.go@@ -53,14 +53,6 @@ func (*ColumnDisallowChangingTypeAdvisor) Check(ctx advisor.Context, _ string) (antlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_column_disallow_drop.go b/backend/plugin/advisor/mysql/advisor_column_disallow_drop.goindex c7cd0c9c33..c5a8093d08 100644--- a/backend/plugin/advisor/mysql/advisor_column_disallow_drop.go+++ b/backend/plugin/advisor/mysql/advisor_column_disallow_drop.go@@ -49,15 +49,6 @@ func (*ColumnDisallowDropAdvisor) Check(ctx advisor.Context, _ string) ([]*storeantlr.ParseTreeWalkerDefault.Walk(checker, stmtNode.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }-return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_column_disallow_drop_in_index.go b/backend/plugin/advisor/mysql/advisor_column_disallow_drop_in_index.goindex e4ee8d4efa..b29b9a53de 100644--- a/backend/plugin/advisor/mysql/advisor_column_disallow_drop_in_index.go+++ b/backend/plugin/advisor/mysql/advisor_column_disallow_drop_in_index.go@@ -54,15 +54,6 @@ func (*ColumnDisallowDropInIndexAdvisor) Check(ctx advisor.Context, _ string) ([antlr.ParseTreeWalkerDefault.Walk(checker, stmtNode.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }-return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_column_disallow_set_charset.go b/backend/plugin/advisor/mysql/advisor_column_disallow_set_charset.goindex 97dbed726a..66eedf3ca8 100644--- a/backend/plugin/advisor/mysql/advisor_column_disallow_set_charset.go+++ b/backend/plugin/advisor/mysql/advisor_column_disallow_set_charset.go@@ -50,14 +50,6 @@ func (*ColumnDisallowSetCharsetAdvisor) Check(ctx advisor.Context, _ string) ([]antlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_column_maximum_character_length.go b/backend/plugin/advisor/mysql/advisor_column_maximum_character_length.goindex 532ccc9380..5055ed9a77 100644--- a/backend/plugin/advisor/mysql/advisor_column_maximum_character_length.go+++ b/backend/plugin/advisor/mysql/advisor_column_maximum_character_length.go@@ -54,14 +54,6 @@ func (*ColumnMaximumCharacterLengthAdvisor) Check(ctx advisor.Context, _ string)antlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_column_maximum_varchar_length.go b/backend/plugin/advisor/mysql/advisor_column_maximum_varchar_length.goindex 044e644fc3..c0d0de8ee7 100644--- a/backend/plugin/advisor/mysql/advisor_column_maximum_varchar_length.go+++ b/backend/plugin/advisor/mysql/advisor_column_maximum_varchar_length.go@@ -54,14 +54,6 @@ func (*ColumnMaximumVarcharLengthAdvisor) Check(ctx advisor.Context, _ string) (antlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_column_no_null.go b/backend/plugin/advisor/mysql/advisor_column_no_null.goindex 81f1d97486..040b34a0aa 100644--- a/backend/plugin/advisor/mysql/advisor_column_no_null.go+++ b/backend/plugin/advisor/mysql/advisor_column_no_null.go@@ -105,14 +105,6 @@ func (checker *columnNoNullChecker) generateAdvice() []*storepb.Advice {}}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList}diff --git a/backend/plugin/advisor/mysql/advisor_column_required.go b/backend/plugin/advisor/mysql/advisor_column_required.goindex 64b9e6212a..1d796f991a 100644--- a/backend/plugin/advisor/mysql/advisor_column_required.go+++ b/backend/plugin/advisor/mysql/advisor_column_required.go@@ -189,14 +189,6 @@ func (checker *columnRequirementChecker) generateAdviceList() []*storepb.Advice}}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList}diff --git a/backend/plugin/advisor/mysql/advisor_column_set_default_for_not_null.go b/backend/plugin/advisor/mysql/advisor_column_set_default_for_not_null.goindex 8880199413..b592f7418d 100644--- a/backend/plugin/advisor/mysql/advisor_column_set_default_for_not_null.go+++ b/backend/plugin/advisor/mysql/advisor_column_set_default_for_not_null.go@@ -50,14 +50,6 @@ func (*ColumnSetDefaultForNotNullAdvisor) Check(ctx advisor.Context, _ string) (antlr.ParseTreeWalkerDefault.Walk(checker, stmtNode.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_column_type_disallow_list.go b/backend/plugin/advisor/mysql/advisor_column_type_disallow_list.goindex 784fee7815..08ba743a01 100644--- a/backend/plugin/advisor/mysql/advisor_column_type_disallow_list.go+++ b/backend/plugin/advisor/mysql/advisor_column_type_disallow_list.go@@ -59,14 +59,6 @@ func (*ColumnTypeDisallowListAdvisor) Check(ctx advisor.Context, _ string) ([]*santlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_database_drop_empty_db.go b/backend/plugin/advisor/mysql/advisor_database_drop_empty_db.goindex e70874b56d..55a375c72f 100644--- a/backend/plugin/advisor/mysql/advisor_database_drop_empty_db.go+++ b/backend/plugin/advisor/mysql/advisor_database_drop_empty_db.go@@ -50,14 +50,6 @@ func (*DatabaseAllowDropIfEmptyAdvisor) Check(ctx advisor.Context, _ string) ([]antlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_disallow_procedure.go b/backend/plugin/advisor/mysql/advisor_disallow_procedure.goindex 755a58a7ab..24f9b1df2a 100644--- a/backend/plugin/advisor/mysql/advisor_disallow_procedure.go+++ b/backend/plugin/advisor/mysql/advisor_disallow_procedure.go@@ -46,14 +46,6 @@ func (*ProcedureDisallowCreateAdvisor) Check(ctx advisor.Context, _ string) ([]*antlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_event_disallow_create.go b/backend/plugin/advisor/mysql/advisor_event_disallow_create.goindex 581f82b81b..0b32261c03 100644--- a/backend/plugin/advisor/mysql/advisor_event_disallow_create.go+++ b/backend/plugin/advisor/mysql/advisor_event_disallow_create.go@@ -46,14 +46,6 @@ func (*EventDisallowCreateAdvisor) Check(ctx advisor.Context, _ string) ([]*storantlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_function_disallow_create.go b/backend/plugin/advisor/mysql/advisor_function_disallow_create.goindex d68b2871ce..8e965215f7 100644--- a/backend/plugin/advisor/mysql/advisor_function_disallow_create.go+++ b/backend/plugin/advisor/mysql/advisor_function_disallow_create.go@@ -46,14 +46,6 @@ func (*FunctionDisallowCreateAdvisor) Check(ctx advisor.Context, _ string) ([]*santlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_function_disallowed_list.go b/backend/plugin/advisor/mysql/advisor_function_disallowed_list.goindex 5914b512b7..4d1c63b912 100644--- a/backend/plugin/advisor/mysql/advisor_function_disallowed_list.go+++ b/backend/plugin/advisor/mysql/advisor_function_disallowed_list.go@@ -54,14 +54,6 @@ func (*FunctionDisallowedListAdvisor) Check(ctx advisor.Context, _ string) ([]*santlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_index_key_number_limit.go b/backend/plugin/advisor/mysql/advisor_index_key_number_limit.goindex 231095f4c1..41baa225a0 100644--- a/backend/plugin/advisor/mysql/advisor_index_key_number_limit.go+++ b/backend/plugin/advisor/mysql/advisor_index_key_number_limit.go@@ -55,14 +55,6 @@ func (*IndexKeyNumberLimitAdvisor) Check(ctx advisor.Context, _ string) ([]*storantlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_index_no_duplicate_column.go b/backend/plugin/advisor/mysql/advisor_index_no_duplicate_column.goindex d3a28d1ab8..0bc795e288 100644--- a/backend/plugin/advisor/mysql/advisor_index_no_duplicate_column.go+++ b/backend/plugin/advisor/mysql/advisor_index_no_duplicate_column.go@@ -50,14 +50,6 @@ func (*IndexNoDuplicateColumnAdvisor) Check(ctx advisor.Context, _ string) ([]*santlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_index_pk_type.go b/backend/plugin/advisor/mysql/advisor_index_pk_type.goindex ab9606b46e..ab2be66f47 100644--- a/backend/plugin/advisor/mysql/advisor_index_pk_type.go+++ b/backend/plugin/advisor/mysql/advisor_index_pk_type.go@@ -55,14 +55,6 @@ func (*IndexPkTypeAdvisor) Check(ctx advisor.Context, _ string) ([]*storepb.Adviantlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_index_primary_key_type_allowlist.go b/backend/plugin/advisor/mysql/advisor_index_primary_key_type_allowlist.goindex 99d70a8aeb..44a0f90739 100644--- a/backend/plugin/advisor/mysql/advisor_index_primary_key_type_allowlist.go+++ b/backend/plugin/advisor/mysql/advisor_index_primary_key_type_allowlist.go@@ -62,14 +62,6 @@ func (*IndexPrimaryKeyTypeAllowlistAdvisor) Check(ctx advisor.Context, _ string)antlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_index_total_number_limit.go b/backend/plugin/advisor/mysql/advisor_index_total_number_limit.goindex 21df49d688..74d0fc5372 100644--- a/backend/plugin/advisor/mysql/advisor_index_total_number_limit.go+++ b/backend/plugin/advisor/mysql/advisor_index_total_number_limit.go@@ -106,14 +106,6 @@ func (checker *indexTotalNumberLimitChecker) generateAdvice() []*storepb.Advice}}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList}diff --git a/backend/plugin/advisor/mysql/advisor_index_type_allow_list.go b/backend/plugin/advisor/mysql/advisor_index_type_allow_list.goindex 7952afa9ae..eb5ca62c00 100644--- a/backend/plugin/advisor/mysql/advisor_index_type_allow_list.go+++ b/backend/plugin/advisor/mysql/advisor_index_type_allow_list.go@@ -54,14 +54,6 @@ func (*IndexTypeAllowListAdvisor) Check(ctx advisor.Context, _ string) ([]*storeantlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_index_type_no_blob.go b/backend/plugin/advisor/mysql/advisor_index_type_no_blob.goindex e02b874b66..ff4666af56 100644--- a/backend/plugin/advisor/mysql/advisor_index_type_no_blob.go+++ b/backend/plugin/advisor/mysql/advisor_index_type_no_blob.go@@ -54,14 +54,6 @@ func (*IndexTypeNoBlobAdvisor) Check(ctx advisor.Context, _ string) ([]*storepb.antlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_insert_disallow_order_by_rand.go b/backend/plugin/advisor/mysql/advisor_insert_disallow_order_by_rand.goindex 694446dbd3..dd081545cf 100644--- a/backend/plugin/advisor/mysql/advisor_insert_disallow_order_by_rand.go+++ b/backend/plugin/advisor/mysql/advisor_insert_disallow_order_by_rand.go@@ -53,14 +53,6 @@ func (*InsertDisallowOrderByRandAdvisor) Check(ctx advisor.Context, _ string) ([antlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_insert_must_specify_column.go b/backend/plugin/advisor/mysql/advisor_insert_must_specify_column.goindex 1940d3f26c..c5f724e2e6 100644--- a/backend/plugin/advisor/mysql/advisor_insert_must_specify_column.go+++ b/backend/plugin/advisor/mysql/advisor_insert_must_specify_column.go@@ -50,14 +50,6 @@ func (*InsertMustSpecifyColumnAdvisor) Check(ctx advisor.Context, _ string) ([]*antlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_insert_row_limit.go b/backend/plugin/advisor/mysql/advisor_insert_row_limit.goindex cee40dc146..e8abb6c474 100644--- a/backend/plugin/advisor/mysql/advisor_insert_row_limit.go+++ b/backend/plugin/advisor/mysql/advisor_insert_row_limit.go@@ -76,14 +76,6 @@ type insertRowLimitChecker struct {}func (checker *insertRowLimitChecker) generateAdvice() ([]*storepb.Advice, error) {- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_migration_compatibility.go b/backend/plugin/advisor/mysql/advisor_migration_compatibility.goindex 468341e20a..9e1babc8de 100644--- a/backend/plugin/advisor/mysql/advisor_migration_compatibility.go+++ b/backend/plugin/advisor/mysql/advisor_migration_compatibility.go@@ -48,14 +48,6 @@ func (*CompatibilityAdvisor) Check(ctx advisor.Context, _ string) ([]*storepb.Adantlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_naming_auto_increment_column.go b/backend/plugin/advisor/mysql/advisor_naming_auto_increment_column.goindex 41e385ba08..a7ada10e35 100644--- a/backend/plugin/advisor/mysql/advisor_naming_auto_increment_column.go+++ b/backend/plugin/advisor/mysql/advisor_naming_auto_increment_column.go@@ -57,14 +57,6 @@ func (*NamingAutoIncrementColumnAdvisor) Check(ctx advisor.Context, _ string) ([antlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_naming_column.go b/backend/plugin/advisor/mysql/advisor_naming_column.goindex 1029a56446..057c983963 100644--- a/backend/plugin/advisor/mysql/advisor_naming_column.go+++ b/backend/plugin/advisor/mysql/advisor_naming_column.go@@ -53,15 +53,6 @@ func (*NamingColumnConventionAdvisor) Check(ctx advisor.Context, _ string) ([]*santlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }-return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_naming_foreign_key_convention.go b/backend/plugin/advisor/mysql/advisor_naming_foreign_key_convention.goindex 0156bd59c3..c395eee11c 100644--- a/backend/plugin/advisor/mysql/advisor_naming_foreign_key_convention.go+++ b/backend/plugin/advisor/mysql/advisor_naming_foreign_key_convention.go@@ -56,15 +56,6 @@ func (*NamingFKConventionAdvisor) Check(ctx advisor.Context, _ string) ([]*storeantlr.ParseTreeWalkerDefault.Walk(checker, stmtNode.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }-return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_naming_identifier_no_keyword.go b/backend/plugin/advisor/mysql/advisor_naming_identifier_no_keyword.goindex 567c509eca..98d098bca1 100644--- a/backend/plugin/advisor/mysql/advisor_naming_identifier_no_keyword.go+++ b/backend/plugin/advisor/mysql/advisor_naming_identifier_no_keyword.go@@ -46,14 +46,6 @@ func (*NamingIdentifierNoKeywordAdvisor) Check(ctx advisor.Context, _ string) ([antlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_naming_index_convention.go b/backend/plugin/advisor/mysql/advisor_naming_index_convention.goindex b587e54dcc..778abc056c 100644--- a/backend/plugin/advisor/mysql/advisor_naming_index_convention.go+++ b/backend/plugin/advisor/mysql/advisor_naming_index_convention.go@@ -65,15 +65,6 @@ func (*NamingIndexConventionAdvisor) Check(ctx advisor.Context, _ string) ([]*stantlr.ParseTreeWalkerDefault.Walk(checker, stmtNode.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }-return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_naming_table.go b/backend/plugin/advisor/mysql/advisor_naming_table.goindex b14b1ef1c9..314ad9d287 100644--- a/backend/plugin/advisor/mysql/advisor_naming_table.go+++ b/backend/plugin/advisor/mysql/advisor_naming_table.go@@ -70,14 +70,6 @@ type namingTableConventionChecker struct {}func (checker *namingTableConventionChecker) generateAdvice() ([]*storepb.Advice, error) {- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_naming_unique_key_convention.go b/backend/plugin/advisor/mysql/advisor_naming_unique_key_convention.goindex 492e98dc22..05aaafff64 100644--- a/backend/plugin/advisor/mysql/advisor_naming_unique_key_convention.go+++ b/backend/plugin/advisor/mysql/advisor_naming_unique_key_convention.go@@ -58,14 +58,6 @@ func (*NamingUKConventionAdvisor) Check(ctx advisor.Context, _ string) ([]*storeantlr.ParseTreeWalkerDefault.Walk(checker, stmtNode.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_online_migration.go b/backend/plugin/advisor/mysql/advisor_online_migration.goindex 1968daf6ce..d171c06c9f 100644--- a/backend/plugin/advisor/mysql/advisor_online_migration.go+++ b/backend/plugin/advisor/mysql/advisor_online_migration.go@@ -97,12 +97,7 @@ func (*OnlineMigrationAdvisor) Check(ctx advisor.Context, _ string) ([]*storepb.// Advise to enable online migration for the issue, or return OK if it's already enabled.if len(adviceList) == 1 && len(stmtList) == 1 {if ctx.ChangeType == storepb.PlanCheckRunConfig_DDL_GHOST {- return []*storepb.Advice{{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- }}, nil+ return nil, nil}adviceList[0].Code = advisor.AdviseOnlineMigration.Int32()@@ -120,21 +115,11 @@ func (*OnlineMigrationAdvisor) Check(ctx advisor.Context, _ string) ([]*storepb.Content: "Advise to disable online migration because found no statements that need online migration",}}, nil}- return []*storepb.Advice{{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- }}, nil+ return nil, nil}- // should never reach- return []*storepb.Advice{{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- }}, nil+ // Should never reach this.+ return nil, nil}type useGhostChecker struct {diff --git a/backend/plugin/advisor/mysql/advisor_statement_add_column_without_position.go b/backend/plugin/advisor/mysql/advisor_statement_add_column_without_position.goindex 03ba9c3991..effd459fdd 100644--- a/backend/plugin/advisor/mysql/advisor_statement_add_column_without_position.go+++ b/backend/plugin/advisor/mysql/advisor_statement_add_column_without_position.go@@ -48,14 +48,6 @@ func (*StatementAddColumnWithoutPositionAdvisor) Check(ctx advisor.Context, _ stantlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_statement_affected_row_limit.go b/backend/plugin/advisor/mysql/advisor_statement_affected_row_limit.goindex ca087d2ada..7102b66af3 100644--- a/backend/plugin/advisor/mysql/advisor_statement_affected_row_limit.go+++ b/backend/plugin/advisor/mysql/advisor_statement_affected_row_limit.go@@ -60,14 +60,6 @@ func (*StatementAffectedRowLimitAdvisor) Check(ctx advisor.Context, _ string) ([}}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_statement_disallow_mix_ddl_dml.go b/backend/plugin/advisor/mysql/advisor_statement_disallow_mix_ddl_dml.goindex c7d12847b4..6ec77a18e9 100644--- a/backend/plugin/advisor/mysql/advisor_statement_disallow_mix_ddl_dml.go+++ b/backend/plugin/advisor/mysql/advisor_statement_disallow_mix_ddl_dml.go@@ -84,14 +84,5 @@ func (*StatementDisallowmixDDLDMLAdvisor) Check(ctx advisor.Context, _ string) (})}- if len(adviceList) == 0 {- adviceList = append(adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }-return adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_statement_disallow_using_filesort.go b/backend/plugin/advisor/mysql/advisor_statement_disallow_using_filesort.goindex d256dab4d2..9e7874901f 100644--- a/backend/plugin/advisor/mysql/advisor_statement_disallow_using_filesort.go+++ b/backend/plugin/advisor/mysql/advisor_statement_disallow_using_filesort.go@@ -52,14 +52,6 @@ func (*StatementDisallowUsingFilesortAdvisor) Check(ctx advisor.Context, _ strin}}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_statement_disallow_using_temporary.go b/backend/plugin/advisor/mysql/advisor_statement_disallow_using_temporary.goindex c88c70757f..cb2e4ac2d1 100644--- a/backend/plugin/advisor/mysql/advisor_statement_disallow_using_temporary.go+++ b/backend/plugin/advisor/mysql/advisor_statement_disallow_using_temporary.go@@ -52,14 +52,6 @@ func (*StatementDisallowUsingTemporaryAdvisor) Check(ctx advisor.Context, _ stri}}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_statement_dml_dry_run.go b/backend/plugin/advisor/mysql/advisor_statement_dml_dry_run.goindex 2a04029e0a..dd44b1eea3 100644--- a/backend/plugin/advisor/mysql/advisor_statement_dml_dry_run.go+++ b/backend/plugin/advisor/mysql/advisor_statement_dml_dry_run.go@@ -56,14 +56,6 @@ func (*StatementDmlDryRunAdvisor) Check(ctx advisor.Context, _ string) ([]*store}}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_statement_join_strict_column_attrs.go b/backend/plugin/advisor/mysql/advisor_statement_join_strict_column_attrs.goindex 15afb51a5b..e5d2e5268d 100644--- a/backend/plugin/advisor/mysql/advisor_statement_join_strict_column_attrs.go+++ b/backend/plugin/advisor/mysql/advisor_statement_join_strict_column_attrs.go@@ -50,14 +50,6 @@ func (*StatementJoinStrictColumnAttrsAdvisor) Check(ctx advisor.Context, _ strinantlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_statement_maximum_join_table_count.go b/backend/plugin/advisor/mysql/advisor_statement_maximum_join_table_count.goindex 103f7bfe42..fb0a1dbb80 100644--- a/backend/plugin/advisor/mysql/advisor_statement_maximum_join_table_count.go+++ b/backend/plugin/advisor/mysql/advisor_statement_maximum_join_table_count.go@@ -49,14 +49,6 @@ func (*StatementMaximumJoinTableCountAdvisor) Check(ctx advisor.Context, _ strinantlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_statement_maximum_limit_value.go b/backend/plugin/advisor/mysql/advisor_statement_maximum_limit_value.goindex c1be8eed64..e0c4803ed0 100644--- a/backend/plugin/advisor/mysql/advisor_statement_maximum_limit_value.go+++ b/backend/plugin/advisor/mysql/advisor_statement_maximum_limit_value.go@@ -52,14 +52,6 @@ func (*StatementMaximumLimitValueAdvisor) Check(ctx advisor.Context, _ string) (antlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_statement_maximum_statements_in_transaction.go b/backend/plugin/advisor/mysql/advisor_statement_maximum_statements_in_transaction.goindex 7edcf36529..2c4f87b6d4 100644--- a/backend/plugin/advisor/mysql/advisor_statement_maximum_statements_in_transaction.go+++ b/backend/plugin/advisor/mysql/advisor_statement_maximum_statements_in_transaction.go@@ -47,14 +47,6 @@ func (*StatementMaximumStatementsInTransactionAdvisor) Check(ctx advisor.Contextantlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_statement_merge_alter_table.go b/backend/plugin/advisor/mysql/advisor_statement_merge_alter_table.goindex 440424cc11..2692e0632f 100644--- a/backend/plugin/advisor/mysql/advisor_statement_merge_alter_table.go+++ b/backend/plugin/advisor/mysql/advisor_statement_merge_alter_table.go@@ -137,13 +137,5 @@ func (checker *statementMergeAlterTableChecker) generateAdvice() []*storepb.Advi}}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList}diff --git a/backend/plugin/advisor/mysql/advisor_statement_prior_backup_check.go b/backend/plugin/advisor/mysql/advisor_statement_prior_backup_check.goindex e2760421af..5b64412bb1 100644--- a/backend/plugin/advisor/mysql/advisor_statement_prior_backup_check.go+++ b/backend/plugin/advisor/mysql/advisor_statement_prior_backup_check.go@@ -27,17 +27,11 @@ type StatementPriorBackupCheckAdvisor struct {}func (*StatementPriorBackupCheckAdvisor) Check(ctx advisor.Context, _ string) ([]*storepb.Advice, error) {- var adviceList []*storepb.Adviceif ctx.PreUpdateBackupDetail == nil || ctx.ChangeType != storepb.PlanCheckRunConfig_DML {- adviceList = append(adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- return adviceList, nil+ return nil, nil}+ var adviceList []*storepb.AdvicestmtList, ok := ctx.AST.([]*mysqlparser.ParseResult)if !ok {return nil, errors.Errorf("failed to convert to mysql parse result")@@ -108,14 +102,6 @@ func (*StatementPriorBackupCheckAdvisor) Check(ctx advisor.Context, _ string) ([})}}- if len(adviceList) == 0 {- adviceList = append(adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_statement_query_minumum_plan_level.go b/backend/plugin/advisor/mysql/advisor_statement_query_minumum_plan_level.goindex bf9fb5f2b7..916920abd3 100644--- a/backend/plugin/advisor/mysql/advisor_statement_query_minumum_plan_level.go+++ b/backend/plugin/advisor/mysql/advisor_statement_query_minumum_plan_level.go@@ -57,14 +57,6 @@ func (*StatementQueryMinumumPlanLevelAdvisor) Check(ctx advisor.Context, _ strin}}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_statement_where_disallow_using_function.go b/backend/plugin/advisor/mysql/advisor_statement_where_disallow_using_function.goindex d0fac9f4e6..186de02e8a 100644--- a/backend/plugin/advisor/mysql/advisor_statement_where_disallow_using_function.go+++ b/backend/plugin/advisor/mysql/advisor_statement_where_disallow_using_function.go@@ -44,14 +44,6 @@ func (*StatementWhereDisallowUsingFunctionAdvisor) Check(ctx advisor.Context, _antlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_statement_where_maximum_logical_operator_count.go b/backend/plugin/advisor/mysql/advisor_statement_where_maximum_logical_operator_count.goindex db2bc66666..43ff277ac4 100644--- a/backend/plugin/advisor/mysql/advisor_statement_where_maximum_logical_operator_count.go+++ b/backend/plugin/advisor/mysql/advisor_statement_where_maximum_logical_operator_count.go@@ -61,14 +61,6 @@ func (*StatementWhereMaximumLogicalOperatorCountAdvisor) Check(ctx advisor.Conte}}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_statement_where_no_equal_null.go b/backend/plugin/advisor/mysql/advisor_statement_where_no_equal_null.goindex c695856b60..52c5d7d9ec 100644--- a/backend/plugin/advisor/mysql/advisor_statement_where_no_equal_null.go+++ b/backend/plugin/advisor/mysql/advisor_statement_where_no_equal_null.go@@ -44,14 +44,6 @@ func (*StatementWhereNoEqualNullAdvisor) Check(ctx advisor.Context, _ string) ([antlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_stmt_disallow_commit.go b/backend/plugin/advisor/mysql/advisor_stmt_disallow_commit.goindex 5380bd882f..c56d2f31a5 100644--- a/backend/plugin/advisor/mysql/advisor_stmt_disallow_commit.go+++ b/backend/plugin/advisor/mysql/advisor_stmt_disallow_commit.go@@ -49,14 +49,6 @@ func (*StatementDisallowCommitAdvisor) Check(ctx advisor.Context, _ string) ([]*antlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_stmt_disallow_limit.go b/backend/plugin/advisor/mysql/advisor_stmt_disallow_limit.goindex 31b7d15abc..118cd5743a 100644--- a/backend/plugin/advisor/mysql/advisor_stmt_disallow_limit.go+++ b/backend/plugin/advisor/mysql/advisor_stmt_disallow_limit.go@@ -49,14 +49,6 @@ func (*StatementDisallowLimitAdvisor) Check(ctx advisor.Context, _ string) ([]*santlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_stmt_disallow_order_by.go b/backend/plugin/advisor/mysql/advisor_stmt_disallow_order_by.goindex 7de3b80f43..da3976dfd3 100644--- a/backend/plugin/advisor/mysql/advisor_stmt_disallow_order_by.go+++ b/backend/plugin/advisor/mysql/advisor_stmt_disallow_order_by.go@@ -50,14 +50,6 @@ func (*DisallowOrderByAdvisor) Check(ctx advisor.Context, _ string) ([]*storepb.antlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_stmt_no_leading_wildcard_like.go b/backend/plugin/advisor/mysql/advisor_stmt_no_leading_wildcard_like.goindex 681967a7c8..c940f5069c 100644--- a/backend/plugin/advisor/mysql/advisor_stmt_no_leading_wildcard_like.go+++ b/backend/plugin/advisor/mysql/advisor_stmt_no_leading_wildcard_like.go@@ -49,14 +49,6 @@ func (*NoLeadingWildcardLikeAdvisor) Check(ctx advisor.Context, _ string) ([]*stantlr.ParseTreeWalkerDefault.Walk(checker, stmtNode.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_stmt_no_select_all.go b/backend/plugin/advisor/mysql/advisor_stmt_no_select_all.goindex 8a3fe546a7..d05f21e7b5 100644--- a/backend/plugin/advisor/mysql/advisor_stmt_no_select_all.go+++ b/backend/plugin/advisor/mysql/advisor_stmt_no_select_all.go@@ -46,14 +46,6 @@ func (*NoSelectAllAdvisor) Check(ctx advisor.Context, _ string) ([]*storepb.Adviantlr.ParseTreeWalkerDefault.Walk(checker, stmtNode.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_stmt_where_required.go b/backend/plugin/advisor/mysql/advisor_stmt_where_required.goindex b57356ec9d..d7310c553f 100644--- a/backend/plugin/advisor/mysql/advisor_stmt_where_required.go+++ b/backend/plugin/advisor/mysql/advisor_stmt_where_required.go@@ -46,14 +46,6 @@ func (*WhereRequirementAdvisor) Check(ctx advisor.Context, _ string) ([]*storepbantlr.ParseTreeWalkerDefault.Walk(checker, stmtNode.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_table_comment_convention.go b/backend/plugin/advisor/mysql/advisor_table_comment_convention.goindex a8e5a0bdf9..2e40507483 100644--- a/backend/plugin/advisor/mysql/advisor_table_comment_convention.go+++ b/backend/plugin/advisor/mysql/advisor_table_comment_convention.go@@ -54,14 +54,6 @@ func (*TableCommentConventionAdvisor) Check(ctx advisor.Context, _ string) ([]*santlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_table_disallow_partition.go b/backend/plugin/advisor/mysql/advisor_table_disallow_partition.goindex e72882e72a..5047d5f9f0 100644--- a/backend/plugin/advisor/mysql/advisor_table_disallow_partition.go+++ b/backend/plugin/advisor/mysql/advisor_table_disallow_partition.go@@ -48,14 +48,6 @@ func (*TableDisallowPartitionAdvisor) Check(ctx advisor.Context, _ string) ([]*santlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_table_disallow_set_charset.go b/backend/plugin/advisor/mysql/advisor_table_disallow_set_charset.goindex 198ac8b435..20b34ef579 100644--- a/backend/plugin/advisor/mysql/advisor_table_disallow_set_charset.go+++ b/backend/plugin/advisor/mysql/advisor_table_disallow_set_charset.go@@ -44,14 +44,6 @@ func (*TableDisallowSetCharsetAdvisor) Check(ctx advisor.Context, _ string) ([]*antlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_table_disallow_trigger.go b/backend/plugin/advisor/mysql/advisor_table_disallow_trigger.goindex bc3d5b6878..1ff89b9f49 100644--- a/backend/plugin/advisor/mysql/advisor_table_disallow_trigger.go+++ b/backend/plugin/advisor/mysql/advisor_table_disallow_trigger.go@@ -46,14 +46,6 @@ func (*TableDisallowTriggerAdvisor) Check(ctx advisor.Context, _ string) ([]*stoantlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_table_drop_naming_convention.go b/backend/plugin/advisor/mysql/advisor_table_drop_naming_convention.goindex 84224ee07b..52554c583b 100644--- a/backend/plugin/advisor/mysql/advisor_table_drop_naming_convention.go+++ b/backend/plugin/advisor/mysql/advisor_table_drop_naming_convention.go@@ -53,14 +53,6 @@ func (*TableDropNamingConventionAdvisor) Check(ctx advisor.Context, _ string) ([antlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_table_limit_size.go b/backend/plugin/advisor/mysql/advisor_table_limit_size.goindex d8beb21bf3..fe03f15ac0 100644--- a/backend/plugin/advisor/mysql/advisor_table_limit_size.go+++ b/backend/plugin/advisor/mysql/advisor_table_limit_size.go@@ -35,15 +35,6 @@ var (func (*MaximumTableSizeAdvisor) Check(ctx advisor.Context, _ string) ([]*storepb.Advice, error) {var adviceList []*storepb.Advice- if ctx.ChangeType != storepb.PlanCheckRunConfig_DDL && ctx.ChangeType != storepb.PlanCheckRunConfig_CHANGE_DATABASE_TYPE_UNSPECIFIED {- return []*storepb.Advice{{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- }}, nil- }-payload, err := advisor.UnmarshalNumberTypeRulePayload(ctx.Rule.Payload)if err != nil {return nil, err@@ -89,14 +80,6 @@ func (*MaximumTableSizeAdvisor) Check(ctx advisor.Context, _ string) ([]*storepb}}- if len(adviceList) == 0 {- return []*storepb.Advice{{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- }}, nil- }return adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_table_no_duplicate_index.go b/backend/plugin/advisor/mysql/advisor_table_no_duplicate_index.goindex ea4f08d378..e1ef6efbe6 100644--- a/backend/plugin/advisor/mysql/advisor_table_no_duplicate_index.go+++ b/backend/plugin/advisor/mysql/advisor_table_no_duplicate_index.go@@ -50,14 +50,6 @@ func (*TableNoDuplicateIndexAdvisor) Check(ctx advisor.Context, _ string) ([]*stantlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_table_no_fk.go b/backend/plugin/advisor/mysql/advisor_table_no_fk.goindex cdefb671a5..34e221369a 100644--- a/backend/plugin/advisor/mysql/advisor_table_no_fk.go+++ b/backend/plugin/advisor/mysql/advisor_table_no_fk.go@@ -48,15 +48,6 @@ func (*TableNoFKAdvisor) Check(ctx advisor.Context, _ string) ([]*storepb.Adviceantlr.ParseTreeWalkerDefault.Walk(checker, stmtNode.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }-return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_table_require_pk.go b/backend/plugin/advisor/mysql/advisor_table_require_pk.goindex 74afd3e7b4..887f83ccc6 100644--- a/backend/plugin/advisor/mysql/advisor_table_require_pk.go+++ b/backend/plugin/advisor/mysql/advisor_table_require_pk.go@@ -212,14 +212,6 @@ func (checker *tableRequirePKChecker) generateAdviceList() []*storepb.Advice {}}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList}diff --git a/backend/plugin/advisor/mysql/advisor_table_text_fields_total_length.go b/backend/plugin/advisor/mysql/advisor_table_text_fields_total_length.goindex 07131ee452..6307d4ba4b 100644--- a/backend/plugin/advisor/mysql/advisor_table_text_fields_total_length.go+++ b/backend/plugin/advisor/mysql/advisor_table_text_fields_total_length.go@@ -54,14 +54,6 @@ func (*TableMaximumVarcharLengthAdvisor) Check(ctx advisor.Context, _ string) ([antlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_use_innodb.go b/backend/plugin/advisor/mysql/advisor_use_innodb.goindex 286e579336..0bf9a7049a 100644--- a/backend/plugin/advisor/mysql/advisor_use_innodb.go+++ b/backend/plugin/advisor/mysql/advisor_use_innodb.go@@ -52,14 +52,6 @@ func (*UseInnoDBAdvisor) Check(ctx advisor.Context, _ string) ([]*storepb.Adviceantlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/advisor_view_disallow_create.go b/backend/plugin/advisor/mysql/advisor_view_disallow_create.goindex 94885d31ca..bc3d7d6341 100644--- a/backend/plugin/advisor/mysql/advisor_view_disallow_create.go+++ b/backend/plugin/advisor/mysql/advisor_view_disallow_create.go@@ -46,14 +46,6 @@ func (*ViewDisallowCreateAdvisor) Check(ctx advisor.Context, _ string) ([]*storeantlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/mysql/test/column_auto_increment_initial_value.yaml b/backend/plugin/advisor/mysql/test/column_auto_increment_initial_value.yamlindex 12b583acd6..891c17d14e 100644--- a/backend/plugin/advisor/mysql/test/column_auto_increment_initial_value.yaml+++ b/backend/plugin/advisor/mysql/test/column_auto_increment_initial_value.yaml@@ -1,22 +1,11 @@- statement: CREATE TABLE t(a int);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(a int auto_increment) auto_increment = 20;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t1(a int auto_increment) auto_increment = 20;CREATE TABLE t2(a int auto_increment) auto_increment = 2;+ changeType: 0want:- status: 2code: 416@@ -26,11 +15,13 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int auto_increment) auto_increment = 20;ALTER TABLE t COMMENT 'table t';ALTER TABLE t AUTO_INCREMENT = 20;ALTER TABLE t AUTO_INCREMENT = 100;+ changeType: 0want:- status: 2code: 416@@ -40,3 +31,4 @@startposition:line: 4column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/column_auto_increment_must_integer.yaml b/backend/plugin/advisor/mysql/test/column_auto_increment_must_integer.yamlindex f1d093da8a..f15439e95c 100644--- a/backend/plugin/advisor/mysql/test/column_auto_increment_must_integer.yaml+++ b/backend/plugin/advisor/mysql/test/column_auto_increment_must_integer.yaml@@ -9,16 +9,11 @@CREATE TABLE t8(a MEDIUMINT AUTO_INCREMENT);CREATE TABLE t9(a bigint AUTO_INCREMENT);CREATE TABLE t10(a BIGINT AUTO_INCREMENT);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t1(a INT AUTO_INCREMENT);CREATE TABLE t2(a varchar(255) AUTO_INCREMENT);+ changeType: 0want:- status: 2code: 410@@ -28,9 +23,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(b int);ALTER TABLE t ADD COLUMN a varchar(255) AUTO_INCREMENT;+ changeType: 0want:- status: 2code: 410@@ -40,9 +37,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(b int);ALTER TABLE t ADD COLUMN a varchar(255) AUTO_INCREMENT, ADD COLUMN c INT;+ changeType: 0want:- status: 2code: 410@@ -52,9 +51,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(b int);ALTER TABLE t ADD COLUMN (a varchar(255) AUTO_INCREMENT, c INT);+ changeType: 0want:- status: 2code: 410@@ -64,10 +65,12 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int, b int);ALTER TABLE t MODIFY COLUMN a varchar(255) AUTO_INCREMENT;ALTER TABLE t MODIFY COLUMN b varchar(255);+ changeType: 0want:- status: 2code: 410@@ -77,9 +80,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(b int);ALTER TABLE t CHANGE COLUMN b a varchar(255) AUTO_INCREMENT;+ changeType: 0want:- status: 2code: 410@@ -89,3 +94,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/column_auto_increment_must_unsigned.yaml b/backend/plugin/advisor/mysql/test/column_auto_increment_must_unsigned.yamlindex 49286f54bc..4d00468643 100644--- a/backend/plugin/advisor/mysql/test/column_auto_increment_must_unsigned.yaml+++ b/backend/plugin/advisor/mysql/test/column_auto_increment_must_unsigned.yaml@@ -1,12 +1,7 @@- statement: CREATE TABLE t(a INT UNSIGNED AUTO_INCREMENT);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(a INT AUTO_INCREMENT);+ changeType: 0want:- status: 2code: 417@@ -16,7 +11,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(a INT SIGNED AUTO_INCREMENT);+ changeType: 0want:- status: 2code: 417@@ -26,17 +23,13 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(a INT ZEROFILL AUTO_INCREMENT);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(b int);ALTER TABLE t ADD COLUMN a INT AUTO_INCREMENT, ADD COLUMN c INT ZEROFILL AUTO_INCREMENT, ADD COLUMN d INT UNSIGNED AUTO_INCREMENT;+ changeType: 0want:- status: 2code: 417@@ -46,10 +39,12 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int, b int);ALTER TABLE t MODIFY COLUMN a INT AUTO_INCREMENT;ALTER TABLE t MODIFY COLUMN a INT UNSIGNED AUTO_INCREMENT;+ changeType: 0want:- status: 2code: 417@@ -59,10 +54,12 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(b int);ALTER TABLE t CHANGE COLUMN b a INT AUTO_INCREMENT;ALTER TABLE t CHANGE COLUMN a c INT UNSIGNED AUTO_INCREMENT;+ changeType: 0want:- status: 2code: 417@@ -72,3 +69,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/column_comment.yaml b/backend/plugin/advisor/mysql/test/column_comment.yamlindex 6a582f03cd..8c98341177 100644--- a/backend/plugin/advisor/mysql/test/column_comment.yaml+++ b/backend/plugin/advisor/mysql/test/column_comment.yaml@@ -11,6 +11,7 @@UNIQUE KEY uk1(id, name),FOREIGN KEY fk1(roomId) REFERENCES room(id),INDEX idx_userTable_content(content)) ENGINE = CSV COLLATE latin1_bin;+ changeType: 0want:- status: 2code: 408@@ -20,6 +21,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 408title: column.comment@@ -28,6 +30,7 @@startposition:line: 3column: 0+ endposition: null- status: 2code: 408title: column.comment@@ -36,6 +39,7 @@startposition:line: 4column: 0+ endposition: null- statement: |CREATE TABLE user(id INT PRIMARY KEY COMMENT 'comment',@@ -48,27 +52,16 @@INDEX idx_user_name(name),UNIQUE KEY uk_user_id_name(id, name)) ENGINE = INNODB COMMENT 'comment';- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(a int COMMENT 'comments');- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a int COMMENT 'some comments',b int,c int);+ changeType: 0want:- status: 2code: 409@@ -78,6 +71,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 408title: column.comment@@ -86,6 +80,7 @@startposition:line: 3column: 0+ endposition: null- status: 2code: 408title: column.comment@@ -94,9 +89,11 @@startposition:line: 4column: 0+ endposition: null- statement: |-CREATE TABLE t(a int COMMENT 'comment');ALTER TABLE t ADD COLUMN b int;+ changeType: 0want:- status: 2code: 408@@ -106,9 +103,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int COMMENT 'comment');ALTER TABLE t ADD COLUMN (b int, c int);+ changeType: 0want:- status: 2code: 408@@ -118,6 +117,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 408title: column.comment@@ -126,9 +126,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int COMMENT 'this is comment');ALTER TABLE t CHANGE COLUMN a b int;+ changeType: 0want:- status: 2code: 409@@ -138,6 +140,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 408title: column.comment@@ -146,9 +149,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(b int COMMENT 'It is comment');ALTER TABLE t MODIFY COLUMN b int;+ changeType: 0want:- status: 2code: 409@@ -158,6 +163,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 408title: column.comment@@ -166,9 +172,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(b int COMMENT 'It is COMMENT');ALTER TABLE t MODIFY COLUMN b int COMMENT 'abcdefghiakljhakljdsfalugelkhnabsdguelkadf';+ changeType: 0want:- status: 2code: 409@@ -178,6 +186,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 409title: column.comment@@ -186,3 +195,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/column_current_time_count_limit.yaml b/backend/plugin/advisor/mysql/test/column_current_time_count_limit.yamlindex 4e23a85da9..597813e2bd 100644--- a/backend/plugin/advisor/mysql/test/column_current_time_count_limit.yaml+++ b/backend/plugin/advisor/mysql/test/column_current_time_count_limit.yaml@@ -11,6 +11,7 @@UNIQUE KEY uk1(id, name),FOREIGN KEY fk1(roomId) REFERENCES room(id),INDEX idx_userTable_content(content)) ENGINE = CSV COLLATE latin1_bin;+ changeType: 0want:- status: 2code: 419@@ -20,6 +21,7 @@startposition:line: 6column: 0+ endposition: null- statement: |CREATE TABLE user(id INT PRIMARY KEY COMMENT 'comment',@@ -32,27 +34,16 @@INDEX idx_user_name(name),UNIQUE KEY uk_user_id_name(id, name)) ENGINE = INNODB COMMENT 'comment';- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(a timestamp, b timestamp)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a timestamp default now(),b timestamp default current_timestamp(),c timestamp default localtime);+ changeType: 0want:- status: 2code: 418@@ -62,11 +53,13 @@startposition:line: 4column: 0+ endposition: null- statement: |-CREATE TABLE t(a timestamp default now() on update localtime,b timestamp default current_timestamp() on update localtimestamp());+ changeType: 0want:- status: 2code: 419@@ -76,9 +69,11 @@startposition:line: 3column: 0+ endposition: null- statement: |-ALTER TABLE tech_book ADD COLUMN a timestamp default now() on update localtime;ALTER TABLE tech_book ADD COLUMN b timestamp default current_timestamp() on update localtimestamp();+ changeType: 0want:- status: 2code: 419@@ -88,3 +83,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/column_disallow_change.yaml b/backend/plugin/advisor/mysql/test/column_disallow_change.yamlindex 2a19e3b299..4d0fd92649 100644--- a/backend/plugin/advisor/mysql/test/column_disallow_change.yaml+++ b/backend/plugin/advisor/mysql/test/column_disallow_change.yaml@@ -1,16 +1,11 @@- statement: |-CREATE TABLE t(b int);ALTER TABLE t ADD COLUMN a int;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(b int);ALTER TABLE t CHANGE COLUMN b a int;+ changeType: 0want:- status: 2code: 406@@ -20,3 +15,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/column_disallow_change_type.yaml b/backend/plugin/advisor/mysql/test/column_disallow_change_type.yamlindex bde0c6079c..4081dd9ae6 100644--- a/backend/plugin/advisor/mysql/test/column_disallow_change_type.yaml+++ b/backend/plugin/advisor/mysql/test/column_disallow_change_type.yaml@@ -3,6 +3,7 @@ALTER TABLE tech_book MODIFY id INT;ALTER TABLE tech_book MODIFY id INTEGER;ALTER TABLE tech_book MODIFY id INTEGER UNSIGNED;+ changeType: 0want:- status: 2code: 403@@ -12,6 +13,7 @@startposition:line: 3column: 0+ endposition: null- status: 2code: 403title: column.disallow-change-type@@ -20,9 +22,11 @@startposition:line: 4column: 0+ endposition: null- statement: |-ALTER TABLE tech_book MODIFY id int;ALTER TABLE tech_book MODIFY id int(4);+ changeType: 0want:- status: 2code: 403@@ -32,9 +36,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-ALTER TABLE tech_book MODIFY id bigint;ALTER TABLE tech_book MODIFY id smallint;+ changeType: 0want:- status: 2code: 403@@ -44,6 +50,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 403title: column.disallow-change-type@@ -52,7 +59,9 @@startposition:line: 2column: 0+ endposition: null- statement: ALTER TABLE tech_book CHANGE name uname varchar(20);+ changeType: 0want:- status: 2code: 403@@ -62,3 +71,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/column_disallow_changing_order.yaml b/backend/plugin/advisor/mysql/test/column_disallow_changing_order.yamlindex 381febe053..38df94b43a 100644--- a/backend/plugin/advisor/mysql/test/column_disallow_changing_order.yaml+++ b/backend/plugin/advisor/mysql/test/column_disallow_changing_order.yaml@@ -1,16 +1,11 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t MODIFY COLUMN a int;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a int);ALTER TABLE t MODIFY COLUMN a int FIRST;+ changeType: 0want:- status: 2code: 407@@ -20,9 +15,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(b int, a1 int);ALTER TABLE t CHANGE COLUMN a1 a int FIRST;+ changeType: 0want:- status: 2code: 407@@ -32,9 +29,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int, b int);ALTER TABLE t MODIFY COLUMN a int AFTER b;+ changeType: 0want:- status: 2code: 407@@ -44,9 +43,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a1 int, b int);ALTER TABLE t CHANGE COLUMN a1 a int AFTER b;+ changeType: 0want:- status: 2code: 407@@ -56,3 +57,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/column_disallow_drop_in_index.yaml b/backend/plugin/advisor/mysql/test/column_disallow_drop_in_index.yamlindex e53ec71d60..33130658a7 100644--- a/backend/plugin/advisor/mysql/test/column_disallow_drop_in_index.yaml+++ b/backend/plugin/advisor/mysql/test/column_disallow_drop_in_index.yaml@@ -11,13 +11,7 @@UNIQUE KEY uk1(id, name),FOREIGN KEY fk1(roomId) REFERENCES room(id),INDEX idx_userTable_content(content)) ENGINE = CSV COLLATE latin1_bin;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |CREATE TABLE user(id INT PRIMARY KEY COMMENT 'comment',@@ -30,26 +24,15 @@INDEX idx_user_name(name),UNIQUE KEY uk_user_id_name(id, name)) ENGINE = INNODB COMMENT 'comment';- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a int, b int, INDEX idx_a(a));ALTER TABLE t DROP COLUMN b;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a int, b int, INDEX idx_b(b));ALTER TABLE t DROP COLUMN b;+ changeType: 0want:- status: 2code: 424@@ -59,9 +42,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int, c int, INDEX idx_ac(a,c));ALTER TABLE t DROP COLUMN c;+ changeType: 0want:- status: 2code: 424@@ -71,21 +56,17 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int, b int, INDEX idx_a(a));CREATE TABLE y(a int, b int);ALTER TABLE y DROP COLUMN a;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a int,b int, c int, INDEX idx_ac(a,c));ALTER TABLE t DROP COLUMN a;ALTER TABLE t DROP COLUMN c;+ changeType: 0want:- status: 2code: 424@@ -95,6 +76,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 424title: column.disallow-drop-in-index@@ -103,3 +85,4 @@startposition:line: 3column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/column_disallow_set_charset.yaml b/backend/plugin/advisor/mysql/test/column_disallow_set_charset.yamlindex 6996eb338a..795562352b 100644--- a/backend/plugin/advisor/mysql/test/column_disallow_set_charset.yaml+++ b/backend/plugin/advisor/mysql/test/column_disallow_set_charset.yaml@@ -1,24 +1,13 @@- statement: |-CREATE TABLE dt_relation_temp(objto int);ALTER TABLE dt_relation_temp ADD COLUMN infos json null comment'关系信息点'AFTER`objto`;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(a varchar(20));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t1(a varchar(20) CHARSET ascii);CREATE TABLE t2(a varchar(20) CHARSET ascii);+ changeType: 0want:- status: 2code: 414@@ -28,6 +17,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 414title: column.disallow-set-charset@@ -36,9 +26,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-ALTER TABLE tech_book ADD COLUMN a varchar(20);ALTER TABLE tech_book ADD COLUMN b varchar(20) CHARSET ascii;+ changeType: 0want:- status: 2code: 414@@ -48,10 +40,12 @@startposition:line: 2column: 0+ endposition: null- statement: |-ALTER TABLE tech_book ADD COLUMN a varchar(20), ADD COLUMN b varchar(20);ALTER TABLE tech_book ADD COLUMN (c varchar(20) CHARSET ascii, d varchar(20) CHARSET ascii);ALTER TABLE tech_book ADD COLUMN e varchar(20) CHARSET ascii;+ changeType: 0want:- status: 2code: 414@@ -61,6 +55,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 414title: column.disallow-set-charset@@ -69,6 +64,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 414title: column.disallow-set-charset@@ -77,9 +73,11 @@startposition:line: 3column: 0+ endposition: null- statement: |-ALTER TABLE tech_book MODIFY COLUMN id int;ALTER TABLE tech_book MODIFY COLUMN id varchar(20) CHARSET ascii;+ changeType: 0want:- status: 2code: 414@@ -89,9 +87,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-ALTER TABLE tech_book CHANGE COLUMN name name int;ALTER TABLE tech_book CHANGE COLUMN name name varchar(20) CHARSET ascii;+ changeType: 0want:- status: 2code: 414@@ -101,3 +101,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/column_maximum_character_length.yaml b/backend/plugin/advisor/mysql/test/column_maximum_character_length.yamlindex 236c28bab3..3cd2c98b34 100644--- a/backend/plugin/advisor/mysql/test/column_maximum_character_length.yaml+++ b/backend/plugin/advisor/mysql/test/column_maximum_character_length.yaml@@ -1,30 +1,13 @@- statement: CREATE TABLE t1(name char);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(name char(20));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(name varchar(225));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t1(name char(20));CREATE TABLE t2(name char(225));+ changeType: 0want:- status: 2code: 415@@ -34,9 +17,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-ALTER TABLE tech_book ADD COLUMN name_1 char(20);ALTER TABLE tech_book ADD COLUMN name_2 char(225);+ changeType: 0want:- status: 2code: 415@@ -46,9 +31,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-ALTER TABLE tech_book CHANGE COLUMN name name char(20);ALTER TABLE tech_book CHANGE COLUMN name name char(225);+ changeType: 0want:- status: 2code: 415@@ -58,9 +45,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-ALTER TABLE tech_book MODIFY COLUMN name char(20);ALTER TABLE tech_book MODIFY COLUMN name char(225);+ changeType: 0want:- status: 2code: 415@@ -70,3 +59,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/column_maximum_varchar_length.yaml b/backend/plugin/advisor/mysql/test/column_maximum_varchar_length.yamlindex 7a3611356d..d93dd37de6 100644--- a/backend/plugin/advisor/mysql/test/column_maximum_varchar_length.yaml+++ b/backend/plugin/advisor/mysql/test/column_maximum_varchar_length.yaml@@ -1,12 +1,7 @@- statement: CREATE TABLE t(name varchar(225));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t1(name varchar(3000));+ changeType: 0want:- status: 2code: 422@@ -16,9 +11,11 @@startposition:line: 1column: 0+ endposition: null- statement: |-ALTER TABLE tech_book ADD COLUMN name_1 char(20);ALTER TABLE tech_book ADD COLUMN name_2 varchar(3000);+ changeType: 0want:- status: 2code: 422@@ -28,3 +25,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/column_no_null.yaml b/backend/plugin/advisor/mysql/test/column_no_null.yamlindex f202213cad..46c7366f86 100644--- a/backend/plugin/advisor/mysql/test/column_no_null.yaml+++ b/backend/plugin/advisor/mysql/test/column_no_null.yaml@@ -3,6 +3,7 @@id int,name varchar(255));+ changeType: 0want:- status: 2code: 402@@ -12,6 +13,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 402title: column.no-null@@ -20,7 +22,9 @@startposition:line: 3column: 0+ endposition: null- statement: CREATE TABLE book(id int PRIMARY KEY, name varchar(255));+ changeType: 0want:- status: 2code: 402@@ -30,7 +34,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE book(id int NOT NULL, name varchar(255));+ changeType: 0want:- status: 2code: 402@@ -40,17 +46,13 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE book(id int PRIMARY KEY, name varchar(255) NOT NULL);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(a int NOT NULL);ALTER TABLE book ADD COLUMN (id int, name varchar(255) NOT NULL);+ changeType: 0want:- status: 2code: 402@@ -60,9 +62,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE book(a int NOT NULL);ALTER TABLE book ADD COLUMN id int, ADD COLUMN name varchar(255) NOT NULL;+ changeType: 0want:- status: 2code: 402@@ -72,29 +76,19 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE book(a int NOT NULL);ALTER TABLE book ADD COLUMN (id int PRIMARY KEY, name varchar(255) NOT NULL);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(a int NOT NULL);ALTER TABLE book ADD COLUMN id int PRIMARY KEY, ADD COLUMN name varchar(255) NOT NULL;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(id int NOT NULL);ALTER TABLE book CHANGE COLUMN id name varchar(255);+ changeType: 0want:- status: 2code: 402@@ -104,13 +98,8 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE book(id int NOT NULL);ALTER TABLE book CHANGE COLUMN id name varchar(255) NOT NULL;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/mysql/test/column_require_default.yaml b/backend/plugin/advisor/mysql/test/column_require_default.yamlindex 3a7b72c43f..b6adb0ddee 100644--- a/backend/plugin/advisor/mysql/test/column_require_default.yaml+++ b/backend/plugin/advisor/mysql/test/column_require_default.yaml@@ -7,13 +7,7 @@e json,f geometry);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a geometry,@@ -25,13 +19,7 @@g multipolygon,h geometrycollection);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t1(a int primary key@@ -39,18 +27,13 @@CREATE TABLE t2(a int auto_increment primary key);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a int,b int default 1)+ changeType: 0want:- status: 2code: 420@@ -60,10 +43,12 @@startposition:line: 2column: 0+ endposition: null- statement: |-ALTER TABLE tech_book ADD COLUMN a BLOB;ALTER TABLE tech_book ADD COLUMN b timestamp;ALTER TABLE tech_book MODIFY COLUMN a varchar(220);+ changeType: 0want:- status: 2code: 420@@ -73,6 +58,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 420title: column.require-default@@ -81,7 +67,9 @@startposition:line: 3column: 0+ endposition: null- statement: ALTER TABLE tech_book ADD COLUMN (a BLOB, b timestamp);+ changeType: 0want:- status: 2code: 420@@ -91,10 +79,12 @@startposition:line: 1column: 0+ endposition: null- statement: |-ALTER TABLE tech_book ADD COLUMN a VARCHAR(255) DEFAULT 'default value';ALTER TABLE tech_book MODIFY COLUMN a char(25) DEFAULT 'default';ALTER TABLE tech_book CHANGE COLUMN a b int;+ changeType: 0want:- status: 2code: 420@@ -104,15 +94,10 @@startposition:line: 3column: 0+ endposition: null- statement: |-CREATE TABLE t(id int,PRIMARY KEY (id))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/mysql/test/column_required.yaml b/backend/plugin/advisor/mysql/test/column_required.yamlindex b0531150f6..976ae0a463 100644--- a/backend/plugin/advisor/mysql/test/column_required.yaml+++ b/backend/plugin/advisor/mysql/test/column_required.yaml@@ -5,6 +5,7 @@CREATE TABLE t3(id INT, creator_id INT, created_ts timestamp);CREATE TABLE t4(id INT, creator_id INT, created_ts timestamp, updater_id INT);CREATE TABLE t5(id INT, creator_id INT, created_ts timestamp, updater_id INT, updated_ts timestamp);+ changeType: 0want:- status: 2code: 401@@ -14,6 +15,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 401title: column.required@@ -22,6 +24,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 401title: column.required@@ -30,6 +33,7 @@startposition:line: 3column: 0+ endposition: null- status: 2code: 401title: column.required@@ -38,6 +42,7 @@startposition:line: 4column: 0+ endposition: null- status: 2code: 401title: column.required@@ -46,6 +51,7 @@startposition:line: 5column: 0+ endposition: null- statement: |-CREATE TABLE book(id int,@@ -54,13 +60,7 @@updater_id int,updated_ts timestamp);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(id int,@@ -70,6 +70,7 @@updated_ts timestamp);ALTER TABLE book RENAME COLUMN creator_id TO creator;+ changeType: 0want:- status: 2code: 401@@ -79,6 +80,7 @@startposition:line: 8column: 0+ endposition: null- statement: |-CREATE TABLE book(id int,@@ -88,13 +90,7 @@updated_ts timestamp);ALTER TABLE book RENAME COLUMN creator TO creator_id;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(id int,@@ -104,6 +100,7 @@updated_ts timestamp);ALTER TABLE book CHANGE COLUMN creator_id creator int;+ changeType: 0want:- status: 2code: 401@@ -113,6 +110,7 @@startposition:line: 8column: 0+ endposition: null- statement: |-CREATE TABLE book(id int,@@ -122,13 +120,7 @@updated_ts timestamp);ALTER TABLE book CHANGE COLUMN creator creator_id int;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(id int,@@ -138,6 +130,7 @@updated_ts timestamp);ALTER TABLE book DROP COLUMN creator_id;+ changeType: 0want:- status: 2code: 401@@ -147,6 +140,7 @@startposition:line: 8column: 0+ endposition: null- statement: |-CREATE TABLE book(id int,@@ -157,13 +151,7 @@content varchar(255));ALTER TABLE book DROP COLUMN content;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(id int,@@ -172,6 +160,7 @@updated_ts timestamp);ALTER TABLE book ADD COLUMN content varchar(255);+ changeType: 0want:- status: 2code: 401@@ -181,6 +170,7 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE book(id int,@@ -190,13 +180,7 @@updated_ts timestamp);ALTER TABLE book ADD COLUMN creator_id int;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(id int,@@ -209,6 +193,7 @@created_ts timestamp,updated_ts timestamp);+ changeType: 0want:- status: 2code: 401@@ -218,6 +203,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 401title: column.required@@ -226,6 +212,7 @@startposition:line: 7column: 0+ endposition: null- statement: |-CREATE TABLE book(id int,@@ -235,13 +222,7 @@updated_ts timestamp);DROP TABLE book;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(id int@@ -252,10 +233,4 @@updater_id int,updated_ts timestamp);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/mysql/test/column_set_default_for_not_null.yaml b/backend/plugin/advisor/mysql/test/column_set_default_for_not_null.yamlindex c54ece6f35..3e7d95545c 100644--- a/backend/plugin/advisor/mysql/test/column_set_default_for_not_null.yaml+++ b/backend/plugin/advisor/mysql/test/column_set_default_for_not_null.yaml@@ -2,28 +2,17 @@CREATE TABLE book(id int PRIMARY KEY DEFAULT 0);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(id int PRIMARY KEY);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(id int NOT NULL);+ changeType: 0want:- status: 2code: 404@@ -33,31 +22,21 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE book(id int,PRIMARY KEY (id));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(a int);ALTER TABLE book ADD COLUMN id int PRIMARY KEY;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(a int);ALTER TABLE book ADD COLUMN id int NOT NULL;+ changeType: 0want:- status: 2code: 404@@ -67,9 +46,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE book(a int);ALTER TABLE book ADD COLUMN (b int NOT NULL, c int NOT NULL);+ changeType: 0want:- status: 2code: 404@@ -79,6 +60,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 404title: column.set-default-for-not-null@@ -87,9 +69,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE book(id int);ALTER TABLE book MODIFY COLUMN id int NOT NULL;+ changeType: 0want:- status: 2code: 404@@ -99,29 +83,19 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE book(id int);ALTER TABLE book MODIFY COLUMN id int PRIMARY KEY;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(uid int);ALTER TABLE book CHANGE COLUMN uid id int PRIMARY KEY;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(uid int);ALTER TABLE book CHANGE COLUMN uid id int NOT NULL;+ changeType: 0want:- status: 2code: 404@@ -131,13 +105,8 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE book(uid int, id int);ALTER TABLE book CHANGE COLUMN uid uid int NOT NULL DEFAULT 0, MODIFY COLUMN id int PRIMARY KEY DEFAULT 0, ADD COLUMN name varchar(20) NOT NULL DEFAULT '';- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/mysql/test/column_type_disallow_list.yaml b/backend/plugin/advisor/mysql/test/column_type_disallow_list.yamlindex bc6384e69e..ff944d162c 100644--- a/backend/plugin/advisor/mysql/test/column_type_disallow_list.yaml+++ b/backend/plugin/advisor/mysql/test/column_type_disallow_list.yaml@@ -1,12 +1,7 @@- statement: CREATE TABLE t(a int);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(a JSON, b BLOB, c TEXT);+ changeType: 0want:- status: 2code: 411@@ -16,9 +11,11 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE t(d int);ALTER TABLE t add COLUMN (a JSON, b BLOB, c TEXT);+ changeType: 0want:- status: 2code: 411@@ -28,9 +25,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(d int);ALTER TABLE t ADD COLUMN (a JSON, b JSON);+ changeType: 0want:- status: 2code: 411@@ -40,6 +39,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 411title: column.type-disallow-list@@ -48,9 +48,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(c int, b int);ALTER TABLE t CHANGE COLUMN c a JSON, MODIFY b BLOB;+ changeType: 0want:- status: 2code: 411@@ -60,9 +62,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(c int, b int);ALTER TABLE t MODIFY COLUMN c JSON;+ changeType: 0want:- status: 2code: 411@@ -72,3 +76,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/database_drop_empty_database.yaml b/backend/plugin/advisor/mysql/test/database_drop_empty_database.yamlindex fb773f2b28..8ed8638145 100644--- a/backend/plugin/advisor/mysql/test/database_drop_empty_database.yaml+++ b/backend/plugin/advisor/mysql/test/database_drop_empty_database.yaml@@ -1,4 +1,5 @@- statement: DROP DATABASE IF EXISTS test;+ changeType: 0want:- status: 2code: 701@@ -8,3 +9,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/engine_mysql_use_innodb.yaml b/backend/plugin/advisor/mysql/test/engine_mysql_use_innodb.yamlindex 90c0f31119..9e2a2f608d 100644--- a/backend/plugin/advisor/mysql/test/engine_mysql_use_innodb.yaml+++ b/backend/plugin/advisor/mysql/test/engine_mysql_use_innodb.yaml@@ -11,6 +11,7 @@UNIQUE KEY uk1(id, name),FOREIGN KEY fk1(roomId) REFERENCES room(id),INDEX idx_userTable_content(content)) ENGINE = CSV COLLATE latin1_bin;+ changeType: 0want:- status: 2code: 501@@ -32,6 +33,7 @@startposition:line: 12column: 0+ endposition: null- statement: |CREATE TABLE user(id INT PRIMARY KEY COMMENT 'comment',@@ -44,34 +46,17 @@INDEX idx_user_name(name),UNIQUE KEY uk_user_id_name(id, name)) ENGINE = INNODB COMMENT 'comment';- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE book(id int) ENGINE = INNODB;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE book(id int);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |CREATE TABLE book(id INT,price INT) ENGINE = CSV;+ changeType: 0want:- status: 2code: 501@@ -85,12 +70,14 @@startposition:line: 4column: 0+ endposition: null- statement: |CREATE TABLE teck_book(a INT);CREATE TABLE book(id INT,price INT) ENGINE = CSV;+ changeType: 0want:- status: 2code: 501@@ -104,18 +91,14 @@startposition:line: 5column: 0+ endposition: null- statement: ALTER TABLE tech_book ENGINE = INNODB;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |CREATE TABLE teck_book(a INT);CREATE TABLE book(a INT);ALTER TABLE tech_book ENGINE = CSV;+ changeType: 0want:- status: 2code: 501@@ -125,17 +108,13 @@startposition:line: 3column: 0+ endposition: null- statement: SET default_storage_engine=INNODB;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |CREATE TABLE book(a INT);SET default_storage_engine=CSV;+ changeType: 0want:- status: 2code: 501@@ -145,12 +124,7 @@startposition:line: 2column: 0+ endposition: null- statement: |SET foreign_key_checks=0;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/mysql/test/index_key_number_limit.yaml b/backend/plugin/advisor/mysql/test/index_key_number_limit.yamlindex 48d0488c69..b8ec5172aa 100644--- a/backend/plugin/advisor/mysql/test/index_key_number_limit.yaml+++ b/backend/plugin/advisor/mysql/test/index_key_number_limit.yaml@@ -1,11 +1,5 @@- statement: CREATE TABLE t(a int, b int, primary key (a, b));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a int,@@ -14,6 +8,7 @@unique key uk (a, b, b, b, b, b, b),foreign key fk (a, b, b, b, b, b) references t1(a, b, b, b, b, b));+ changeType: 0want:- status: 2code: 802@@ -23,6 +18,7 @@startposition:line: 4column: 0+ endposition: null- status: 2code: 802title: index.key-number-limit@@ -31,6 +27,7 @@startposition:line: 5column: 0+ endposition: null- status: 2code: 802title: index.key-number-limit@@ -39,10 +36,12 @@startposition:line: 6column: 0+ endposition: null- statement: |-CREATE TABLE t(a int, b int, c int, d int, e int, f int, g int);CREATE INDEX idx ON t(a, b, c, d, e, f, g);CREATE UNIQUE INDEX uk ON t(a, b, c, d, e, f, g);+ changeType: 0want:- status: 2code: 802@@ -52,6 +51,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 802title: index.key-number-limit@@ -60,10 +60,12 @@startposition:line: 3column: 0+ endposition: null- statement: |-CREATE TABLE t(a int, b int, c int, d int, e int, f int, g int);ALTER TABLE t ADD PRIMARY KEY pk (a, b, c, d, e, f, g);ALTER TABLE t ADD UNIQUE KEY uk (a, b, c, d, e, f, g);+ changeType: 0want:- status: 2code: 802@@ -73,6 +75,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 802title: index.key-number-limit@@ -81,9 +84,11 @@startposition:line: 3column: 0+ endposition: null- statement: |-CREATE TABLE t(a int, b int, c int, d int, e int, f int, g int);ALTER TABLE t ADD FOREIGN KEY uk (a, b, c, d, e, f, g) REFERENCES t1(a, b, c, d, e, f, g)+ changeType: 0want:- status: 2code: 802@@ -93,13 +98,8 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int, b varchar(255));CREATE FULLTEXT INDEX idx ON t(b, b, b, b, b, b);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/mysql/test/index_no_duplicate_column.yaml b/backend/plugin/advisor/mysql/test/index_no_duplicate_column.yamlindex 6b45e08aea..764e56dc13 100644--- a/backend/plugin/advisor/mysql/test/index_no_duplicate_column.yaml+++ b/backend/plugin/advisor/mysql/test/index_no_duplicate_column.yaml@@ -1,16 +1,11 @@- statement: CREATE TABLE t (a int, PRIMARY KEY (a));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t (a int,PRIMARY KEY (a, a));+ changeType: 0want:- status: 2code: 812@@ -20,6 +15,7 @@startposition:line: 3column: 0+ endposition: null- statement: |-CREATE TABLE t1 (a int,@@ -33,6 +29,7 @@a int,FOREIGN KEY fk1 (a, a) REFERENCES t1(a, a));+ changeType: 0want:- status: 2code: 812@@ -42,11 +39,13 @@startposition:line: 11column: 0+ endposition: null- statement: |-CREATE TABLE t (a int,INDEX idx_a (a, a));+ changeType: 0want:- status: 2code: 812@@ -56,10 +55,12 @@startposition:line: 3column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);CREATE INDEX idx ON t(a);CREATE INDEX idx_a ON t(a, a);+ changeType: 0want:- status: 2code: 812@@ -69,10 +70,12 @@startposition:line: 3column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);CREATE UNIQUE INDEX idx ON t(a);CREATE UNIQUE INDEX idx_a ON t(a, a);+ changeType: 0want:- status: 2code: 812@@ -82,10 +85,12 @@startposition:line: 3column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD INDEX idx (a);ALTER TABLE t ADD INDEX idx_a (a, a);+ changeType: 0want:- status: 2code: 812@@ -95,9 +100,11 @@startposition:line: 3column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD PRIMARY KEY pk_a (a, a);+ changeType: 0want:- status: 2code: 812@@ -107,20 +114,16 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD PRIMARY KEY pk_a (a);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD UNIQUE KEY uk (a);ALTER TABLE t ADD UNIQUE KEY uk_a (a, a);+ changeType: 0want:- status: 2code: 812@@ -130,10 +133,12 @@startposition:line: 3column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD FOREIGN KEY fk (a) REFERENCES t1(a);ALTER TABLE t ADD FOREIGN KEY fk_a (a, a) REFERENCES t1(a, b);+ changeType: 0want:- status: 2code: 812@@ -143,3 +148,4 @@startposition:line: 3column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/index_pk_type_limit.yaml b/backend/plugin/advisor/mysql/test/index_pk_type_limit.yamlindex 7e0ea39ff1..35fd1c4b68 100644--- a/backend/plugin/advisor/mysql/test/index_pk_type_limit.yaml+++ b/backend/plugin/advisor/mysql/test/index_pk_type_limit.yaml@@ -1,4 +1,5 @@- statement: CREATE TABLE t(id VARCHAR(5) PRIMARY KEY);+ changeType: 0want:- status: 2code: 803@@ -8,15 +9,11 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(id INT PRIMARY KEY);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(id VARCHAR(5), PRIMARY KEY(id));+ changeType: 0want:- status: 2code: 803@@ -26,7 +23,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(id INT, id2 VARCHAR(5), id3 VARCHAR(5), PRIMARY KEY(id, id2, id3));+ changeType: 0want:- status: 2code: 803@@ -36,6 +35,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 803title: index.pk-type-limit@@ -44,25 +44,15 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(id INT, id2 BIGINT, PRIMARY KEY(id, id2));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(id INT, PRIMARY KEY(id));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id VARCHAR(5) PRIMARY KEY;+ changeType: 0want:- status: 2code: 803@@ -72,19 +62,15 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id INT PRIMARY KEY;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id VARCHAR(5), ADD PRIMARY KEY (id);+ changeType: 0want:- status: 2code: 803@@ -94,9 +80,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id INT, ADD COLUMN id2 VARCHAR(5), ADD COLUMN id3 VARCHAR(5), ADD PRIMARY KEY (id, id2, id3);+ changeType: 0want:- status: 2code: 803@@ -106,6 +94,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 803title: index.pk-type-limit@@ -114,29 +103,19 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id INT, ADD COLUMN id2 BIGINT, ADD PRIMARY KEY (id, id2);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id BIGINT, ADD PRIMARY KEY (id);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(id VARCHAR(5));ALTER TABLE t ADD PRIMARY KEY(id);+ changeType: 0want:- status: 2code: 803@@ -146,9 +125,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(id INT, id2 VARCHAR(5), id3 VARCHAR(5));ALTER TABLE t ADD PRIMARY KEY(id, id2, id3);+ changeType: 0want:- status: 2code: 803@@ -158,6 +139,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 803title: index.pk-type-limit@@ -166,29 +148,19 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(id INT, id2 BIGINT);ALTER TABLE t ADD PRIMARY KEY(id, id2);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(id BIGINT);ALTER TABLE t ADD PRIMARY KEY(id);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(id int);ALTER TABLE t MODIFY COLUMN id VARCHAR(5) PRIMARY KEY;+ changeType: 0want:- status: 2code: 803@@ -198,19 +170,15 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(id int);ALTER TABLE t MODIFY COLUMN id INT(5) PRIMARY KEY;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(id int);ALTER TABLE t CHANGE COLUMN id id2 VARCHAR(5) PRIMARY KEY;+ changeType: 0want:- status: 2code: 803@@ -220,13 +188,8 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(id int);ALTER TABLE t CHANGE COLUMN id id2 INT(5) PRIMARY KEY;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/mysql/test/index_primary_key_type_allowlist.yaml b/backend/plugin/advisor/mysql/test/index_primary_key_type_allowlist.yamlindex 1350ccc071..6785ec5ff0 100644--- a/backend/plugin/advisor/mysql/test/index_primary_key_type_allowlist.yaml+++ b/backend/plugin/advisor/mysql/test/index_primary_key_type_allowlist.yaml@@ -1,4 +1,5 @@- statement: CREATE TABLE t(id VARCHAR(5) PRIMARY KEY);+ changeType: 0want:- status: 2code: 803@@ -8,15 +9,11 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(id INT PRIMARY KEY);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(id VARCHAR(5), PRIMARY KEY(id));+ changeType: 0want:- status: 2code: 803@@ -26,7 +23,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(id INT, id2 VARCHAR(5), id3 VARCHAR(5), PRIMARY KEY(id, id2, id3));+ changeType: 0want:- status: 2code: 803@@ -36,6 +35,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 803title: index.primary-key-type-allowlist@@ -44,25 +44,15 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(id INT, id2 BIGINT, PRIMARY KEY(id, id2));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(id INT, PRIMARY KEY(id));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id VARCHAR(5) PRIMARY KEY;+ changeType: 0want:- status: 2code: 803@@ -72,19 +62,15 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id INT PRIMARY KEY;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id VARCHAR(5), ADD PRIMARY KEY (id);+ changeType: 0want:- status: 2code: 803@@ -94,9 +80,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id INT, ADD COLUMN id2 VARCHAR(5), ADD COLUMN id3 VARCHAR(5), ADD PRIMARY KEY (id, id2, id3);+ changeType: 0want:- status: 2code: 803@@ -106,6 +94,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 803title: index.primary-key-type-allowlist@@ -114,29 +103,19 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id INT, ADD COLUMN id2 BIGINT, ADD PRIMARY KEY (id, id2);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id BIGINT, ADD PRIMARY KEY (id);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(id VARCHAR(5));ALTER TABLE t ADD PRIMARY KEY(id);+ changeType: 0want:- status: 2code: 803@@ -146,9 +125,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(id INT, id2 VARCHAR(5), id3 VARCHAR(5));ALTER TABLE t ADD PRIMARY KEY(id, id2, id3);+ changeType: 0want:- status: 2code: 803@@ -158,6 +139,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 803title: index.primary-key-type-allowlist@@ -166,29 +148,19 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(id INT, id2 BIGINT);ALTER TABLE t ADD PRIMARY KEY(id, id2);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(id BIGINT);ALTER TABLE t ADD PRIMARY KEY(id);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(id int);ALTER TABLE t MODIFY COLUMN id VARCHAR(5) PRIMARY KEY;+ changeType: 0want:- status: 2code: 803@@ -198,19 +170,15 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(id int);ALTER TABLE t MODIFY COLUMN id INT(5) PRIMARY KEY;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(id int);ALTER TABLE t CHANGE COLUMN id id2 VARCHAR(5) PRIMARY KEY;+ changeType: 0want:- status: 2code: 803@@ -220,13 +188,8 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(id int);ALTER TABLE t CHANGE COLUMN id id2 INT(5) PRIMARY KEY;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/mysql/test/index_total_number_limit.yaml b/backend/plugin/advisor/mysql/test/index_total_number_limit.yamlindex 6090d19451..7239cc0d68 100644--- a/backend/plugin/advisor/mysql/test/index_total_number_limit.yaml+++ b/backend/plugin/advisor/mysql/test/index_total_number_limit.yaml@@ -1,25 +1,14 @@- statement: CREATE TABLE t(a int, b int, c int, unique key(a, b, c));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE INDEX idx_id_name on tech_book(id, name);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE INDEX idx_id_name_1 on tech_book(id, name);CREATE INDEX idx_id_name_2 on tech_book(id, name);CREATE INDEX idx_id_name_3 on tech_book(id, name);CREATE INDEX idx_id_name_4 on tech_book(id, name);CREATE INDEX idx_id_name_5 on tech_book(id, name);+ changeType: 0want:- status: 2code: 813@@ -29,6 +18,7 @@startposition:line: 5column: 0+ endposition: null- statement: |-CREATE TABLE t(a int PRIMARY KEY, b int, c int);CREATE INDEX idx_a_b_1 on t(a, b);@@ -36,6 +26,7 @@CREATE INDEX idx_a_b_3 on t(a, b);CREATE INDEX idx_a_b_4 on t(a, b);CREATE INDEX idx_a_b_5 on t(a, b);+ changeType: 0want:- status: 2code: 813@@ -45,6 +36,7 @@startposition:line: 6column: 0+ endposition: null- statement: |-CREATE TABLE t(a int PRIMARY KEY,@@ -55,6 +47,7 @@INDEX idx_a_b_3 (a, b),INDEX idx_a_b_4 (a, b),INDEX idx_a_b_5 (a, b));+ changeType: 0want:- status: 2code: 813@@ -64,6 +57,7 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE t (a int PRIMARY KEY,@@ -75,6 +69,7 @@ALTER TABLE t ADD INDEX idx_a_b_3 (a, b);ALTER TABLE t ADD INDEX idx_a_b_4 (a, b);ALTER TABLE t ADD INDEX idx_a_b_5 (a, b);+ changeType: 0want:- status: 2code: 813@@ -84,3 +79,4 @@startposition:line: 10column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/index_type_allow_list.yaml b/backend/plugin/advisor/mysql/test/index_type_allow_list.yamlindex 9b57159bb2..28509b0c84 100644--- a/backend/plugin/advisor/mysql/test/index_type_allow_list.yaml+++ b/backend/plugin/advisor/mysql/test/index_type_allow_list.yaml@@ -4,13 +4,7 @@email VARCHAR(100),INDEX idx_email (email));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE orders (id INT PRIMARY KEY,@@ -19,19 +13,14 @@);CREATE INDEX idx_customer ON orders (customer, (order_number * 2));CREATE INDEX idx_customer_duplicate ON orders (customer, (order_number * 2));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE locations (id INT AUTO_INCREMENT PRIMARY KEY,geom GEOMETRY NOT NULL);CREATE SPATIAL INDEX spatial_index_name ON locations(geom);+ changeType: 0want:- status: 2code: 816@@ -41,12 +30,14 @@startposition:line: 5column: 0+ endposition: null- statement: |-CREATE TABLE locations (id INT AUTO_INCREMENT PRIMARY KEY,description TEXT NOT NULL);CREATE FULLTEXT INDEX fulltext_index_name ON locations(description);+ changeType: 0want:- status: 2code: 816@@ -56,3 +47,4 @@startposition:line: 5column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/index_type_no_blob.yaml b/backend/plugin/advisor/mysql/test/index_type_no_blob.yamlindex 7e0b1bec84..91e4323b24 100644--- a/backend/plugin/advisor/mysql/test/index_type_no_blob.yaml+++ b/backend/plugin/advisor/mysql/test/index_type_no_blob.yaml@@ -11,6 +11,7 @@UNIQUE KEY uk1(id, name),FOREIGN KEY fk1(roomId) REFERENCES room(id),INDEX idx_userTable_content(content)) ENGINE = CSV COLLATE latin1_bin;+ changeType: 0want:- status: 2code: 804@@ -20,6 +21,7 @@startposition:line: 12column: 0+ endposition: null- statement: |CREATE TABLE user(id INT PRIMARY KEY COMMENT 'comment',@@ -32,14 +34,9 @@INDEX idx_user_name(name),UNIQUE KEY uk_user_id_name(id, name)) ENGINE = INNODB COMMENT 'comment';- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(b BLOB, PRIMARY KEY(b(10)));+ changeType: 0want:- status: 2code: 804@@ -49,7 +46,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(b BLOB, mb MEDIUMBLOB, lb LONGBLOB, id INT, PRIMARY KEY(b(1), mb(2), lb(3), id));+ changeType: 0want:- status: 2code: 804@@ -59,6 +58,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 804title: index.type-no-blob@@ -67,6 +67,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 804title: index.type-no-blob@@ -75,7 +76,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(b BLOB, mb MEDIUMBLOB, lb LONGBLOB, id INT, UNIQUE INDEX(b(1), mb(2), lb(3), id))+ changeType: 0want:- status: 2code: 804@@ -85,6 +88,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 804title: index.type-no-blob@@ -93,6 +97,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 804title: index.type-no-blob@@ -101,7 +106,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(b BLOB, mb MEDIUMBLOB, lb LONGBLOB, id iNT, INDEX(b(1), mb(2), lb(3), id))+ changeType: 0want:- status: 2code: 804@@ -111,6 +118,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 804title: index.type-no-blob@@ -119,6 +127,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 804title: index.type-no-blob@@ -127,17 +136,13 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(id INT, PRIMARY KEY(id))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN b BLOB, ADD COLUMN id INT, ADD PRIMARY KEY(b(1), id);+ changeType: 0want:- status: 2code: 804@@ -147,9 +152,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN b BLOB, ADD COLUMN mb MEDIUMBLOB, ADD COLUMN lb LONGBLOB, ADD COLUMN id INT, ADD UNIQUE INDEX(b(1), mb(2), lb(3), id)+ changeType: 0want:- status: 2code: 804@@ -159,6 +166,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 804title: index.type-no-blob@@ -167,6 +175,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 804title: index.type-no-blob@@ -175,9 +184,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN b BLOB, ADD COLUMN mb MEDIUMBLOB, ADD COLUMN lb LONGBLOB, ADD COLUMN id INT, ADD INDEX(b(1), mb(2), lb(3), id)+ changeType: 0want:- status: 2code: 804@@ -187,6 +198,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 804title: index.type-no-blob@@ -195,6 +207,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 804title: index.type-no-blob@@ -203,22 +216,18 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN b BLOB, ADD COLUMN mb MEDIUMBLOB, ADD COLUMN lb LONGBLOB, ADD COLUMN id INT, ADD INDEX(id);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(b blob, mb mediumblob, lb longblob, id int);CREATE INDEX idx_b ON t(b(5));CREATE INDEX idx_mb ON t(mb(5));CREATE INDEX idx_lb ON t(lb(5));CREATE INDEX idx_id ON t(id);+ changeType: 0want:- status: 2code: 804@@ -228,6 +237,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 804title: index.type-no-blob@@ -236,6 +246,7 @@startposition:line: 3column: 0+ endposition: null- status: 2code: 804title: index.type-no-blob@@ -244,20 +255,16 @@startposition:line: 4column: 0+ endposition: null- statement: |-CREATE TABLE t(b blob, mb mediumblob, lb longblob, id int);CREATE INDEX idx_id ON t(id);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(b int, mb mediumblob, lb longblob, id int);ALTER TABLE t MODIFY COLUMN b blob;ALTER TABLE t ADD PRIMARY KEY(b);+ changeType: 0want:- status: 2code: 804@@ -267,10 +274,12 @@startposition:line: 3column: 0+ endposition: null- statement: |-CREATE TABLE t(b int, mb mediumblob, lb longblob, id int);ALTER TABLE t CHANGE COLUMN b d blob;ALTER TABLE t ADD PRIMARY KEY(d);+ changeType: 0want:- status: 2code: 804@@ -280,3 +289,4 @@startposition:line: 3column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/naming_column.yaml b/backend/plugin/advisor/mysql/test/naming_column.yamlindex f5f2723e00..5bf8e9ff6a 100644--- a/backend/plugin/advisor/mysql/test/naming_column.yaml+++ b/backend/plugin/advisor/mysql/test/naming_column.yaml@@ -1,4 +1,5 @@- statement: CREATE TABLE book(id int, creatorId int);+ changeType: 0want:- status: 2code: 302@@ -8,7 +9,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE book(id int, gbhzmtchhsjzyrhdroxmyouwloxqezowdvhcbqalqcgqhfbjnvmhwrbggezmzeusx int);+ changeType: 0want:- status: 2code: 302@@ -18,18 +21,14 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE book(id int, creator_id int);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(id int, creator_id int);ALTER TABLE book RENAME COLUMN creator_id TO creatorId;ALTER TABLE book CHANGE COLUMN creatorId gbhzmtchhsjzyrhdroxmyouwloxqezowdvhcbqalqcgqhfbjnvmhwrbggezmzeusx int;+ changeType: 0want:- status: 2code: 302@@ -39,6 +38,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 302title: naming.column@@ -47,9 +47,11 @@startposition:line: 3column: 0+ endposition: null- statement: |ALTER TABLE tech_book RENAME COLUMN id TO creator_id;ALTER TABLE tech_book RENAME COLUMN creator_id TO gbhzmtchhsjzyrhdroxmyouwloxqezowdvhcbqalqcgqhfbjnvmhwrbggezmzeusx;+ changeType: 0want:- status: 2code: 302@@ -59,6 +61,7 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE book(id int,@@ -67,6 +70,7 @@updater_id int,updated_ts timestamp);ALTER TABLE book CHANGE COLUMN creator_id creatorId int;+ changeType: 0want:- status: 2code: 302@@ -76,24 +80,13 @@startposition:line: 7column: 0+ endposition: null- statement: |-CREATE TABLE book (id INT);ALTER TABLE book CHANGE COLUMN id creator_id int;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book DROP COLUMN id;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(id int,@@ -101,6 +94,7 @@created_ts timestamp,updated_ts timestamp);ALTER TABLE book ADD COLUMN contentString varchar(255);+ changeType: 0want:- status: 2code: 302@@ -110,6 +104,7 @@startposition:line: 6column: 0+ endposition: null- statement: |-CREATE TABLE book(id int,@@ -117,6 +112,7 @@created_ts timestamp,updated_ts timestamp);ALTER TABLE book ADD COLUMN (personAge INT, contentString varchar(255));+ changeType: 0want:- status: 2code: 302@@ -126,6 +122,7 @@startposition:line: 6column: 0+ endposition: null- status: 2code: 302title: naming.column@@ -134,6 +131,7 @@startposition:line: 6column: 0+ endposition: null- statement: |-CREATE TABLE book(id int,@@ -144,6 +142,7 @@id int,createdTs timestamp,updatedTs timestamp);+ changeType: 0want:- status: 2code: 302@@ -153,6 +152,7 @@startposition:line: 3column: 0+ endposition: null- status: 2code: 302title: naming.column@@ -161,6 +161,7 @@startposition:line: 4column: 0+ endposition: null- status: 2code: 302title: naming.column@@ -169,6 +170,7 @@startposition:line: 8column: 0+ endposition: null- status: 2code: 302title: naming.column@@ -177,3 +179,4 @@startposition:line: 9column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/naming_column_auto_increment.yaml b/backend/plugin/advisor/mysql/test/naming_column_auto_increment.yamlindex 16558fdcb3..b1b90a9eff 100644--- a/backend/plugin/advisor/mysql/test/naming_column_auto_increment.yaml+++ b/backend/plugin/advisor/mysql/test/naming_column_auto_increment.yaml@@ -1,12 +1,7 @@- statement: CREATE TABLE book(id int AUTO_INCREMENT);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE book(a int AUTO_INCREMENT);+ changeType: 0want:- status: 2code: 307@@ -16,7 +11,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book ADD COLUMN a int AUTO_INCREMENT;+ changeType: 0want:- status: 2code: 307@@ -26,7 +23,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book CHANGE COLUMN id a int AUTO_INCREMENT;+ changeType: 0want:- status: 2code: 307@@ -36,7 +35,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book MODIFY COLUMN name int AUTO_INCREMENT;+ changeType: 0want:- status: 2code: 307@@ -46,43 +47,20 @@startposition:line: 1column: 0+ endposition: null- statement: |CREATE TABLE book(id int);ALTER TABLE tech_book MODIFY COLUMN id int AUTO_INCREMENT;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |CREATE TABLE book(name VARCHAR(255));ALTER TABLE book ADD COLUMN id int AUTO_INCREMENT;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |CREATE TABLE book(a INT, name VARCHAR(255));ALTER TABLE book CHANGE COLUMN a id int AUTO_INCREMENT;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |CREATE TABLE book(name VARCHAR(255));ALTER TABLE book ADD COLUMN (id int AUTO_INCREMENT, a int, b int, c int, d int);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/mysql/test/naming_identifier_no_keyword.yaml b/backend/plugin/advisor/mysql/test/naming_identifier_no_keyword.yamlindex 721c0d00d0..26854605b2 100644--- a/backend/plugin/advisor/mysql/test/naming_identifier_no_keyword.yaml+++ b/backend/plugin/advisor/mysql/test/naming_identifier_no_keyword.yaml@@ -1,12 +1,7 @@- statement: CREATE TABLE `t`(a int);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE interval(id int);+ changeType: 0want:- status: 3code: 201@@ -16,7 +11,9 @@startposition:line: 1column: 13+ endposition: null- statement: CREATE TABLE execute(id int)+ changeType: 0want:- status: 2code: 308@@ -26,7 +23,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE `execute`(id int)+ changeType: 0want:- status: 2code: 308@@ -36,7 +35,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE `interval`(id int);+ changeType: 0want:- status: 2code: 308@@ -46,7 +47,9 @@startposition:line: 1column: 0+ endposition: null- statement: "CREATE TABLE t(\n id int, \n `current_timestamp` int\n);\n"+ changeType: 0want:- status: 2code: 308@@ -56,7 +59,9 @@startposition:line: 3column: 0+ endposition: null- statement: CREATE TABLE `test`.`interval`(id int);+ changeType: 0want:- status: 2code: 308@@ -66,3 +71,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/naming_index_fk.yaml b/backend/plugin/advisor/mysql/test/naming_index_fk.yamlindex e5be9b4026..9fdeb37fe1 100644--- a/backend/plugin/advisor/mysql/test/naming_index_fk.yaml+++ b/backend/plugin/advisor/mysql/test/naming_index_fk.yaml@@ -1,4 +1,5 @@- statement: CREATE TABLE userTable(id INT NOT NULL,name VARCHAR(255) CHARSET ascii,roomId INT,time_created TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW() COMMENT 'comment',time_updated TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW() COMMENT 'comment',content BLOB NOT NULL COMMENT 'comment',json_content JSON NOT NULL COMMENT 'comment',INDEX idx1(name),UNIQUE KEY uk1(id, name),FOREIGN KEY fk1(roomId) REFERENCES room(id),INDEX idx_userTable_content(content)) ENGINE = CSV COLLATE latin1_bin;+ changeType: 0want:- status: 2code: 305@@ -8,15 +9,11 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book ADD CONSTRAINT fk_tech_book_author_id_author_id FOREIGN KEY (author_id) REFERENCES author (id);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book ADD CONSTRAINT fk_author_id FOREIGN KEY (author_id) REFERENCES author (id);+ changeType: 0want:- status: 2code: 305@@ -26,7 +23,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book ADD CONSTRAINT rvemempmcmmhutaskvcidmwaldtfjdgmcpkhmibtadfydtkexpuzczrrneucthfwk FOREIGN KEY (author_id) REFERENCES author (id);+ changeType: 0want:- status: 2code: 305@@ -36,6 +35,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 305title: naming.index.fk@@ -44,38 +44,28 @@startposition:line: 1column: 0+ endposition: null- statement: |CREATE TABLE book(id INT,author_id INT,FOREIGN KEY fk_book_author_id_author_id (author_id) REFERENCES author (id));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |CREATE TABLE book(id INT,author_id INT,FOREIGN KEY (author_id) REFERENCES author (id));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |CREATE TABLE book(id INT,author_id INT,FOREIGN KEY fk_book_author_id (author_id) REFERENCES author (id));+ changeType: 0want:- status: 2code: 305@@ -85,3 +75,4 @@startposition:line: 4column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/naming_index_idx.yaml b/backend/plugin/advisor/mysql/test/naming_index_idx.yamlindex e3cdf22ee3..d0f12c0925 100644--- a/backend/plugin/advisor/mysql/test/naming_index_idx.yaml+++ b/backend/plugin/advisor/mysql/test/naming_index_idx.yaml@@ -1,12 +1,7 @@- statement: CREATE INDEX idx_tech_book_id_name ON tech_book(id, name);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE INDEX tech_book_id_name ON tech_book(id, name);+ changeType: 0want:- status: 2code: 303@@ -16,7 +11,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE INDEX afvjwsgrbgqzjfrkmbcoxzstznuypasijbbcdykoboredqovetzfcmmqliaelyavw ON tech_book(id, name);+ changeType: 0want:- status: 2code: 303@@ -26,6 +23,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 303title: naming.index.idx@@ -34,15 +32,11 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book RENAME INDEX old_index TO idx_tech_book_id_name;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book RENAME INDEX old_index TO idx_tech_book;+ changeType: 0want:- status: 2code: 303@@ -52,15 +46,11 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book ADD INDEX idx_tech_book_id_name (id, name);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book ADD INDEX tech_book_id_name (id, name);+ changeType: 0want:- status: 2code: 303@@ -70,43 +60,14 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE tech_book_copy(id INT PRIMARY KEY, name VARCHAR(20), INDEX idx_tech_book_copy_name (name));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE tech_book_copy(id INT PRIMARY KEY, name VARCHAR(20), INDEX (name));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE tech_book_copy(id INT PRIMARY KEY, name VARCHAR(20), UNIQUE INDEX (name));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE tech_book_copy(id INT PRIMARY KEY, name VARCHAR(20), FULLTEXT INDEX (name));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE tech_book_copy(id INT PRIMARY KEY, name VARCHAR(20), SPATIAL INDEX (name));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/mysql/test/naming_index_uk.yaml b/backend/plugin/advisor/mysql/test/naming_index_uk.yamlindex a07c7a55b1..0a18a5c4e6 100644--- a/backend/plugin/advisor/mysql/test/naming_index_uk.yaml+++ b/backend/plugin/advisor/mysql/test/naming_index_uk.yaml@@ -1,14 +1,9 @@- statement: CREATE UNIQUE INDEX uk_tech_book_id_name ON tech_book(id, name);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |CREATE UNIQUE INDEX uk_tech_book_id_name ON tech_book(id, name);CREATE UNIQUE INDEX tech_book_id_name ON tech_book(id, name);+ changeType: 0want:- status: 2code: 304@@ -18,9 +13,11 @@startposition:line: 2column: 0+ endposition: null- statement: |CREATE UNIQUE INDEX uk_tech_book_id_name ON tech_book(id, name);CREATE UNIQUE INDEX qtzmquwvlnttctfluoouxelxeliltcfzzstrtyocogwwyiyrflmrkbhbfasynlacy ON tech_book(id, name)+ changeType: 0want:- status: 2code: 304@@ -30,6 +27,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 304title: naming.index.uk@@ -38,17 +36,13 @@startposition:line: 2column: 0+ endposition: null- statement: ALTER TABLE tech_book ADD UNIQUE uk_tech_book_id_name (id, name);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |CREATE TABLE t1(a INT);ALTER TABLE tech_book ADD UNIQUE tech_book_id_name (id, name);+ changeType: 0want:- status: 2code: 304@@ -58,17 +52,13 @@startposition:line: 2column: 0+ endposition: null- statement: ALTER TABLE tech_book RENAME INDEX old_uk TO uk_tech_book_id_name;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |CREATE TABLE t1(a INT);ALTER TABLE tech_book RENAME INDEX old_uk TO uk_tech_book;+ changeType: 0want:- status: 2code: 304@@ -78,37 +68,20 @@startposition:line: 2column: 0+ endposition: null- statement: CREATE TABLE book(id INT PRIMARY KEY, name VARCHAR(20), UNIQUE INDEX uk_book_name (name));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |CREATE TABLE book(id INT PRIMARY KEY,name VARCHAR(20),UNIQUE KEY (name));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |CREATE TABLE book(id INT PRIMARY KEY,name VARCHAR(20),UNIQUE INDEX (name));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/mysql/test/naming_table.yaml b/backend/plugin/advisor/mysql/test/naming_table.yamlindex d82f259735..6dc0a9fc0d 100644--- a/backend/plugin/advisor/mysql/test/naming_table.yaml+++ b/backend/plugin/advisor/mysql/test/naming_table.yaml@@ -1,4 +1,5 @@- statement: CREATE TABLE techBook(id int, name varchar(255));+ changeType: 0want:- status: 2code: 301@@ -8,15 +9,11 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE tech_book_copy(id int, name varchar(255));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE cjnubexocfhqoogdmihudyahmmghviqkzvpixnwvxtxumvuannpwdcbtsgwrvzpde(id int, name varchar(255));+ changeType: 0want:- status: 2code: 301@@ -26,9 +23,11 @@startposition:line: 1column: 0+ endposition: null- statement: |CREATE TABLE book(a INT);ALTER TABLE book RENAME TO TechBook;+ changeType: 0want:- status: 2code: 301@@ -38,19 +37,15 @@startposition:line: 2column: 0+ endposition: null- statement: |CREATE TABLE book(a INT);ALTER TABLE book RENAME TO tech_book_copy;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |CREATE TABLE book (a INT);RENAME TABLE book TO tech_book_copy, tech_book_copy TO LiteraryBook;+ changeType: 0want:- status: 2code: 301@@ -60,10 +55,12 @@startposition:line: 2column: 0+ endposition: null- statement: |CREATE TABLE literary_book(a int);CREATE TABLE book(a int);RENAME TABLE book TO TechBook, literary_book TO LiteraryBook;+ changeType: 0want:- status: 2code: 301@@ -73,6 +70,7 @@startposition:line: 3column: 0+ endposition: null- status: 2code: 301title: naming.table@@ -81,14 +79,9 @@startposition:line: 3column: 0+ endposition: null- statement: |CREATE TABLE literary_book(a int);CREATE TABLE book(a int);RENAME TABLE book TO tech_book_copy, literary_book TO literary_book_copy;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/mysql/test/schema_backward_compatibility.yaml b/backend/plugin/advisor/mysql/test/schema_backward_compatibility.yamlindex dcdc7a3ffe..8d1e4e206d 100644--- a/backend/plugin/advisor/mysql/test/schema_backward_compatibility.yaml+++ b/backend/plugin/advisor/mysql/test/schema_backward_compatibility.yaml@@ -1,4 +1,5 @@- statement: ALTER TABLE tech_book CHANGE name f2 TEXT;+ changeType: 0want:- status: 2code: 111@@ -8,7 +9,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book MODIFY name TEXT;+ changeType: 0want:- status: 2code: 111@@ -18,7 +21,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book MODIFY name TEXT NULL;+ changeType: 0want:- status: 2code: 111@@ -28,7 +33,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book MODIFY name TEXT NOT NULL;+ changeType: 0want:- status: 2code: 111@@ -38,7 +45,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book MODIFY name TEXT COMMENT 'bla';+ changeType: 0want:- status: 2code: 111@@ -48,3 +57,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/statement_affected_row_limit.yaml b/backend/plugin/advisor/mysql/test/statement_affected_row_limit.yamlindex 72034d69d6..ab25046473 100644--- a/backend/plugin/advisor/mysql/test/statement_affected_row_limit.yaml+++ b/backend/plugin/advisor/mysql/test/statement_affected_row_limit.yaml@@ -1,16 +1,4 @@- statement: DELETE FROM tech_book WHERE a > 1;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: UPDATE tech_book SET id = 1;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/mysql/test/statement_disallow_commit.yaml b/backend/plugin/advisor/mysql/test/statement_disallow_commit.yamlindex 00970f21b7..806ff53e06 100644--- a/backend/plugin/advisor/mysql/test/statement_disallow_commit.yaml+++ b/backend/plugin/advisor/mysql/test/statement_disallow_commit.yaml@@ -2,6 +2,7 @@START TRANSACTION;CREATE TABLE techBook(id int, name varchar(255));COMMIT;+ changeType: 0want:- status: 2code: 206@@ -11,6 +12,7 @@startposition:line: 3column: 0+ endposition: null- statement: |-START TRANSACTION;CREATE TABLE techBook(id int, name varchar(255));@@ -19,6 +21,7 @@START TRANSACTION;INSERT INTO techBook(id, name) VALUES(1, "book");COMMIT;+ changeType: 0want:- status: 2code: 206@@ -28,6 +31,7 @@startposition:line: 3column: 0+ endposition: null- status: 2code: 206title: statement.disallow-commit@@ -36,3 +40,4 @@startposition:line: 7column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/statement_disallow_limit.yaml b/backend/plugin/advisor/mysql/test/statement_disallow_limit.yamlindex f8cdc0d720..2bf925ec71 100644--- a/backend/plugin/advisor/mysql/test/statement_disallow_limit.yaml+++ b/backend/plugin/advisor/mysql/test/statement_disallow_limit.yaml@@ -1,14 +1,9 @@- statement: INSERT INTO tech_book SELECT * FROM tech_book;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |INSERT INTO tech_book SELECT * FROM tech_book;INSERT INTO tech_book SELECT * FROM tech_book LIMIT 1;+ changeType: 0want:- status: 2code: 1103@@ -18,9 +13,11 @@startposition:line: 2column: 0+ endposition: null- statement: |INSERT INTO tech_book SELECT * FROM tech_book;INSERT INTO tech_book SELECT * FROM tech_book UNION SELECT * FROM tech_book LIMIT 1;+ changeType: 0want:- status: 2code: 1103@@ -30,9 +27,11 @@startposition:line: 2column: 0+ endposition: null- statement: |INSERT INTO tech_book SELECT * FROM tech_book;INSERT INTO tech_book SELECT * FROM tech_book UNION SELECT * FROM tech_book LIMIT 1;+ changeType: 0want:- status: 2code: 1103@@ -42,9 +41,11 @@startposition:line: 2column: 0+ endposition: null- statement: |UPDATE tech_book SET name = 'my name';UPDATE tech_book SET name = 'my name' LIMIT 10;+ changeType: 0want:- status: 2code: 1102@@ -54,9 +55,11 @@startposition:line: 2column: 0+ endposition: null- statement: |DELETE FROM tech_book;DELETE FROM tech_book LIMIT 10;+ changeType: 0want:- status: 2code: 1106@@ -66,3 +69,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/statement_disallow_mix_ddl_dml.yaml b/backend/plugin/advisor/mysql/test/statement_disallow_mix_ddl_dml.yamlindex 581f21d722..70e4e3af0e 100644--- a/backend/plugin/advisor/mysql/test/statement_disallow_mix_ddl_dml.yaml+++ b/backend/plugin/advisor/mysql/test/statement_disallow_mix_ddl_dml.yaml@@ -1,20 +1,9 @@- statement: DELETE FROM tech_book WHERE a > 1;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: UPDATE tech_book SET id = 1;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book ADD COLUMN author TEXT; UPDATE tech_book SET id = 1;DELETE FROM tech_book WHERE a > 1;+ changeType: 0want:- status: 2code: 227@@ -22,3 +11,4 @@content: Mixing DDL with DML is not alloweddetail: ""startposition: null+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/statement_disallow_order_by.yaml b/backend/plugin/advisor/mysql/test/statement_disallow_order_by.yamlindex 6493907c8a..ebe5ce321f 100644--- a/backend/plugin/advisor/mysql/test/statement_disallow_order_by.yaml+++ b/backend/plugin/advisor/mysql/test/statement_disallow_order_by.yaml@@ -1,14 +1,9 @@- statement: INSERT INTO tech_book values(1, 'a');- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-UPDATE tech_book SET name = 'my name';UPDATE tech_book SET name = 'my name' ORDER BY id;+ changeType: 0want:- status: 2code: 1104@@ -18,9 +13,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-DELETE FROM tech_book;DELETE FROM tech_book ORDER BY id;+ changeType: 0want:- status: 2code: 1105@@ -30,3 +27,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/statement_dml_dry_run.yaml b/backend/plugin/advisor/mysql/test/statement_dml_dry_run.yamlindex b7f60bc458..f7d9ebe59b 100644--- a/backend/plugin/advisor/mysql/test/statement_dml_dry_run.yaml+++ b/backend/plugin/advisor/mysql/test/statement_dml_dry_run.yaml@@ -1,24 +1,6 @@- statement: INSERT INTO tech_book values(1, 'zp');- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: DELETE FROM tech_book;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: UPDATE tech_book SET name = 'xz' WHERE id = 1;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/mysql/test/statement_insert_disallow_order_by_rand.yaml b/backend/plugin/advisor/mysql/test/statement_insert_disallow_order_by_rand.yamlindex 86eaf5869a..6420e96bca 100644--- a/backend/plugin/advisor/mysql/test/statement_insert_disallow_order_by_rand.yaml+++ b/backend/plugin/advisor/mysql/test/statement_insert_disallow_order_by_rand.yaml@@ -1,14 +1,9 @@- statement: INSERT INTO tech_book VALUES(1, "a");- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-INSERT INTO tech_book VALUES(1, "a");INSERT INTO tech_book SELECT * FROM tech_book ORDER BY rand();+ changeType: 0want:- status: 2code: 1108@@ -18,9 +13,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-INSERT INTO tech_book VALUES(1, "a");INSERT INTO tech_book SELECT * FROM tech_book ORDER BY RAND() LIMIT 1;+ changeType: 0want:- status: 2code: 1108@@ -30,3 +27,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/statement_insert_must_specify_column.yaml b/backend/plugin/advisor/mysql/test/statement_insert_must_specify_column.yamlindex 9da2ba77ff..5994ade7c9 100644--- a/backend/plugin/advisor/mysql/test/statement_insert_must_specify_column.yaml+++ b/backend/plugin/advisor/mysql/test/statement_insert_must_specify_column.yaml@@ -1,4 +1,5 @@- statement: INSERT INTO t_copy SELECT * FROM t;+ changeType: 0want:- status: 2code: 1107@@ -8,15 +9,11 @@startposition:line: 1column: 0+ endposition: null- statement: INSERT INTO tech_book(id, name) VALUES (1, '1');- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: "INSERT INTO tech_book(id, name) VALUES (1, '1'); \nINSERT INTO tech_book VALUES (1, '1');"+ changeType: 0want:- status: 2code: 1107@@ -26,3 +23,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/statement_insert_row_limit.yaml b/backend/plugin/advisor/mysql/test/statement_insert_row_limit.yamlindex 8937b92ce1..2d9a409d63 100644--- a/backend/plugin/advisor/mysql/test/statement_insert_row_limit.yaml+++ b/backend/plugin/advisor/mysql/test/statement_insert_row_limit.yaml@@ -1,14 +1,9 @@- statement: INSERT INTO tech_book values(1, 'a');- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |INSERT INTO tech_book values(1, 'a');INSERT INTO tech_book values(1, 'a'), (2, 'b'), (3, 'c'), (4, 'd'), (5, 'e'), (6, 'f');+ changeType: 0want:- status: 2code: 1101@@ -18,11 +13,6 @@startposition:line: 2column: 0+ endposition: null- statement: INSERT INTO tech_book SELECT * FROM tech_book;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/mysql/test/statement_maximum_join_table_count.yaml b/backend/plugin/advisor/mysql/test/statement_maximum_join_table_count.yamlindex 468538309d..53366055a8 100644--- a/backend/plugin/advisor/mysql/test/statement_maximum_join_table_count.yaml+++ b/backend/plugin/advisor/mysql/test/statement_maximum_join_table_count.yaml@@ -1,12 +1,7 @@- statement: SELECT * FROM t;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: select name from hello join world on hello.id = world.id join baby on world.id = baby.id;+ changeType: 0want:- status: 2code: 223@@ -16,3 +11,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/statement_maximum_limit_value.yaml b/backend/plugin/advisor/mysql/test/statement_maximum_limit_value.yamlindex 92506c1406..341261a746 100644--- a/backend/plugin/advisor/mysql/test/statement_maximum_limit_value.yaml+++ b/backend/plugin/advisor/mysql/test/statement_maximum_limit_value.yaml@@ -1,5 +1,6 @@- statement: |SELECT * FROM employee LIMIT 1000000;+ changeType: 0want:- status: 2code: 222@@ -9,3 +10,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/statement_merge_alter_table.yaml b/backend/plugin/advisor/mysql/test/statement_merge_alter_table.yamlindex b42968d1ab..7a26d00b46 100644--- a/backend/plugin/advisor/mysql/test/statement_merge_alter_table.yaml+++ b/backend/plugin/advisor/mysql/test/statement_merge_alter_table.yaml@@ -1,14 +1,9 @@- statement: ALTER TABLE tech_book ADD COLUMN a int;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-ALTER TABLE tech_book ADD COLUMN a int;ALTER TABLE tech_book CHANGE COLUMN a c int;+ changeType: 0want:- status: 2code: 207@@ -18,11 +13,13 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE tech_book ADD COLUMN b int;ALTER TABLE t ADD COLUMN b int;ALTER TABLE tech_book MODIFY COLUMN b varchar(255);+ changeType: 0want:- status: 2code: 207@@ -32,6 +29,7 @@startposition:line: 3column: 0+ endposition: null- status: 2code: 207title: statement.merge-alter-table@@ -40,11 +38,13 @@startposition:line: 4column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE tech_book ADD COLUMN a int;ALTER TABLE tech_book ADD COLUMN b int;ALTER TABLE t ADD COLUMN b int;+ changeType: 0want:- status: 2code: 207@@ -54,6 +54,7 @@startposition:line: 3column: 0+ endposition: null- status: 2code: 207title: statement.merge-alter-table@@ -62,3 +63,4 @@startposition:line: 4column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/statement_select_no_select_all.yaml b/backend/plugin/advisor/mysql/test/statement_select_no_select_all.yamlindex 22e7e2965e..366ba12614 100644--- a/backend/plugin/advisor/mysql/test/statement_select_no_select_all.yaml+++ b/backend/plugin/advisor/mysql/test/statement_select_no_select_all.yaml@@ -1,4 +1,5 @@- statement: SELECT * FROM t;+ changeType: 0want:- status: 2code: 203@@ -8,18 +9,14 @@startposition:line: 1column: 0+ endposition: null- statement: SELECT a, b FROM t;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |SELECT a, b FROM t;SELECT * FROM t;SELECT a, b FROM (SELECT * from t1 JOIN t2) t;+ changeType: 0want:- status: 2code: 203@@ -29,6 +26,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 203title: statement.select.no-select-all@@ -37,11 +35,13 @@startposition:line: 3column: 0+ endposition: null- statement: |-SELECT a, b FROM t;SELECT * FROM t1UNIONSELECT * FROM t2;+ changeType: 0want:- status: 2code: 203@@ -54,6 +54,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 203title: statement.select.no-select-all@@ -65,11 +66,13 @@startposition:line: 4column: 0+ endposition: null- statement: |-SELECT a, b FROM t;WITH cte AS (SELECT * FROM a) SELECT * FROM cte;+ changeType: 0want:- status: 2code: 203@@ -82,6 +85,7 @@startposition:line: 3column: 0+ endposition: null- status: 2code: 203title: statement.select.no-select-all@@ -93,11 +97,13 @@startposition:line: 4column: 0+ endposition: null- statement: |-SELECT a, b FROM t;SELECT *FROM aINNER JOIN b USING(id);+ changeType: 0want:- status: 2code: 203@@ -110,3 +116,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/statement_where_disallow_functions_and_calculations.yaml b/backend/plugin/advisor/mysql/test/statement_where_disallow_functions_and_calculations.yamlindex a81724727b..159bdcb1ef 100644--- a/backend/plugin/advisor/mysql/test/statement_where_disallow_functions_and_calculations.yaml+++ b/backend/plugin/advisor/mysql/test/statement_where_disallow_functions_and_calculations.yaml@@ -1,4 +1,5 @@- statement: SELECT * FROM employee WHERE id = RAND();+ changeType: 0want:- status: 2code: 1702@@ -8,3 +9,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/statement_where_maximum_logical_operator_count.yaml b/backend/plugin/advisor/mysql/test/statement_where_maximum_logical_operator_count.yamlindex 6c6b819b00..6d15fd681d 100644--- a/backend/plugin/advisor/mysql/test/statement_where_maximum_logical_operator_count.yaml+++ b/backend/plugin/advisor/mysql/test/statement_where_maximum_logical_operator_count.yaml@@ -1,4 +1,5 @@- statement: SELECT * FROM employee WHERE id IN (1, 2, 3, 4, 5);+ changeType: 0want:- status: 2code: 225@@ -8,7 +9,9 @@startposition:line: 1column: 0+ endposition: null- statement: SELECT * FROM employee WHERE id = 1 OR id = 2 OR id = 3 OR id = 4 OR id = 5;+ changeType: 0want:- status: 2code: 225@@ -18,3 +21,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/statement_where_no_equal_null.yaml b/backend/plugin/advisor/mysql/test/statement_where_no_equal_null.yamlindex 6bfb9c87f2..bc819eb5b0 100644--- a/backend/plugin/advisor/mysql/test/statement_where_no_equal_null.yaml+++ b/backend/plugin/advisor/mysql/test/statement_where_no_equal_null.yaml@@ -1,23 +1,12 @@- statement: |SELECT * FROM employee WHERE name = 'Jack' AND id IS NULL;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |UPDATE employee SET name = NULL;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |SELECT * FROM t WHERE name = 'test' AND id = NULL;+ changeType: 0want:- status: 2code: 221@@ -27,3 +16,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/statement_where_no_leading_wildcard_like.yaml b/backend/plugin/advisor/mysql/test/statement_where_no_leading_wildcard_like.yamlindex 235903a1d3..a6caf98225 100644--- a/backend/plugin/advisor/mysql/test/statement_where_no_leading_wildcard_like.yaml+++ b/backend/plugin/advisor/mysql/test/statement_where_no_leading_wildcard_like.yaml@@ -1,5 +1,6 @@- statement: |DELETE FROM tech_book WHERE name like "%abc";+ changeType: 0want:- status: 2code: 204@@ -9,19 +10,15 @@startposition:line: 1column: 0+ endposition: null- statement: |CREATE TABLE t (id INT);SELECT * FROM t WHERE a LIKE 'abc%';- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |CREATE TABLE t (id INT);SELECT * FROM t WHERE a LIKE '%abc';+ changeType: 0want:- status: 2code: 204@@ -31,9 +28,11 @@startposition:line: 2column: 0+ endposition: null- statement: |CREATE TABLE t (id INT);SELECT * FROM t WHERE a LIKE 'abc' OR a LIKE '%abc';+ changeType: 0want:- status: 2code: 204@@ -43,12 +42,14 @@startposition:line: 2column: 0+ endposition: null- statement: |CREATE TABLE t (id INT, a VARCHAR(255));SELECT *FROM tWHERE a LIKE '%acc'OR a LIKE '%abc';+ changeType: 0want:- status: 2code: 204@@ -62,6 +63,7 @@startposition:line: 4column: 0+ endposition: null- status: 2code: 204title: statement.where.no-leading-wildcard-like@@ -74,6 +76,7 @@startposition:line: 5column: 0+ endposition: null- statement: |CREATE TABLE t (id INT, a VARCHAR(255));SELECT * FROM@@ -82,6 +85,7 @@WHERE a LIKE '%acc'OR a LIKE '%abc') t1;+ changeType: 0want:- status: 2code: 204@@ -97,6 +101,7 @@startposition:line: 5column: 0+ endposition: null- status: 2code: 204title: statement.where.no-leading-wildcard-like@@ -111,3 +116,4 @@startposition:line: 6column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/statement_where_require.yaml b/backend/plugin/advisor/mysql/test/statement_where_require.yamlindex 0a671e3c3d..1432b2a67c 100644--- a/backend/plugin/advisor/mysql/test/statement_where_require.yaml+++ b/backend/plugin/advisor/mysql/test/statement_where_require.yaml@@ -1,16 +1,11 @@- statement: |CREATE TABLE book(id INT);INSERT INTO book(id) values (1);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |CREATE TABLE book(id INT);DELETE FROM book;+ changeType: 0want:- status: 2code: 202@@ -20,9 +15,11 @@startposition:line: 2column: 0+ endposition: null- statement: |CREATE TABLE book(id INT);UPDATE book SET id = 1;+ changeType: 0want:- status: 2code: 202@@ -32,29 +29,19 @@startposition:line: 2column: 0+ endposition: null- statement: |CREATE TABLE book(id INT);DELETE FROM book WHERE id > 0;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |CREATE TABLE book(id INT);UPDATE book SET id = 1 WHERE id > 10;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |CREATE TABLE book(id INT);SELECT id FROM book;+ changeType: 0want:- status: 2code: 202@@ -64,16 +51,11 @@startposition:line: 2column: 0+ endposition: null- statement: |CREATE TABLE book(id INT);SELECT id FROM book WHERE id > 0;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |CREATE TABLE book(id INT);SELECT id@@ -82,6 +64,7 @@SELECT max(id)FROM book);+ changeType: 0want:- status: 2code: 202@@ -97,12 +80,7 @@startposition:line: 5column: 0+ endposition: null- statement: |SELECT CURDATE();- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/mysql/test/system_charset_allowlist.yaml b/backend/plugin/advisor/mysql/test/system_charset_allowlist.yamlindex 2ba9c3d098..f655fe2ea0 100644--- a/backend/plugin/advisor/mysql/test/system_charset_allowlist.yaml+++ b/backend/plugin/advisor/mysql/test/system_charset_allowlist.yaml@@ -1,20 +1,9 @@- statement: CREATE TABLE t(a int) CHARSET utf8mb4;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(a varchar(255));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(a int) CHARSET ascii;+ changeType: 0want:- status: 2code: 1001@@ -24,9 +13,11 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t CHARSET ascii;+ changeType: 0want:- status: 2code: 1001@@ -36,7 +27,9 @@startposition:line: 2column: 0+ endposition: null- statement: ALTER DATABASE test CHARSET ascii;+ changeType: 0want:- status: 2code: 1001@@ -46,7 +39,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(a varchar(255) CHARSET ascii);+ changeType: 0want:- status: 2code: 1001@@ -56,9 +51,11 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE t(b int);ALTER TABLE t ADD COLUMN a varchar(255) CHARSET ascii;+ changeType: 0want:- status: 2code: 1001@@ -68,9 +65,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t MODIFY COLUMN a varchar(255) CHARSET ascii;+ changeType: 0want:- status: 2code: 1001@@ -80,9 +79,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t CHANGE COLUMN a a varchar(255) CHARSET ascii;+ changeType: 0want:- status: 2code: 1001@@ -92,11 +93,6 @@startposition:line: 2column: 0+ endposition: null- statement: /* this is a comment */- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/mysql/test/system_collation_allowlist.yaml b/backend/plugin/advisor/mysql/test/system_collation_allowlist.yamlindex 2699e2094d..d0d59ca175 100644--- a/backend/plugin/advisor/mysql/test/system_collation_allowlist.yaml+++ b/backend/plugin/advisor/mysql/test/system_collation_allowlist.yaml@@ -1,11 +1,5 @@- statement: CREATE TABLE test(id INT PRIMARY KEY COMMENT 'comment',name VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'comment',room_id INT NOT NULL DEFAULT 0 COMMENT 'comment',creator_id INT NOT NULL DEFAULT 0 COMMENT 'comment',created_ts TIMESTAMP NOT NULL DEFAULT NOW() COMMENT 'comment',updater_id INT NOT NULL DEFAULT 0 COMMENT 'comment',updated_ts TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW() COMMENT 'comment',INDEX idx_test_name(name),UNIQUE KEY uk_test_id_name(id, name)) ENGINE = INNODB COMMENT 'comment'- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |CREATE TABLE userTable(id INT NOT NULL,@@ -19,6 +13,7 @@UNIQUE KEY uk1(id, name),FOREIGN KEY fk1(roomId) REFERENCES room(id),INDEX idx_userTable_content(content)) ENGINE = CSV COLLATE latin1_bin;+ changeType: 0want:- status: 2code: 1201@@ -40,6 +35,7 @@startposition:line: 12column: 0+ endposition: null- statement: |CREATE TABLE user(id INT PRIMARY KEY COMMENT 'comment',@@ -52,14 +48,9 @@INDEX idx_user_name(name),UNIQUE KEY uk_user_id_name(id, name)) ENGINE = INNODB COMMENT 'comment';- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(a int) COLLATE utf8mb4_polish_ci;+ changeType: 0want:- status: 2code: 1201@@ -69,15 +60,11 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(a varchar(255));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(a int) COLLATE latin1_bin;+ changeType: 0want:- status: 2code: 1201@@ -87,9 +74,11 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t COLLATE latin1_bin;+ changeType: 0want:- status: 2code: 1201@@ -99,7 +88,9 @@startposition:line: 2column: 0+ endposition: null- statement: ALTER DATABASE test COLLATE latin1_bin;+ changeType: 0want:- status: 2code: 1201@@ -109,7 +100,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(a varchar(255) CHARACTER SET latin1 COLLATE latin1_bin);+ changeType: 0want:- status: 2code: 1201@@ -119,9 +112,11 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE t(b int);ALTER TABLE t ADD COLUMN a varchar(255) CHARACTER SET latin1 COLLATE latin1_bin;+ changeType: 0want:- status: 2code: 1201@@ -131,9 +126,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t MODIFY COLUMN a varchar(255) CHARACTER SET latin1 COLLATE latin1_bin;+ changeType: 0want:- status: 2code: 1201@@ -143,9 +140,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t CHANGE COLUMN a a varchar(255) CHARACTER SET latin1 COLLATE latin1_bin;+ changeType: 0want:- status: 2code: 1201@@ -155,3 +154,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/system_event_disallow_create.yaml b/backend/plugin/advisor/mysql/test/system_event_disallow_create.yamlindex 6b0133f9d9..dbee7403a5 100644--- a/backend/plugin/advisor/mysql/test/system_event_disallow_create.yaml+++ b/backend/plugin/advisor/mysql/test/system_event_disallow_create.yaml@@ -1,11 +1,5 @@- statement: CREATE TABLE t(a int);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE EVENT daily_backupON SCHEDULE@@ -15,6 +9,7 @@INSERT INTO backup_table (backup_date, data)SELECT NOW(), dataFROM main_table;+ changeType: 0want:- status: 2code: 1501@@ -32,3 +27,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/system_function_disallow_create.yaml b/backend/plugin/advisor/mysql/test/system_function_disallow_create.yamlindex 5efd3ea708..6390ac705b 100644--- a/backend/plugin/advisor/mysql/test/system_function_disallow_create.yaml+++ b/backend/plugin/advisor/mysql/test/system_function_disallow_create.yaml@@ -1,11 +1,5 @@- statement: CREATE TABLE t(a int);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE FUNCTION add_two_numbers(a INT, b INT)RETURNS INT@@ -14,6 +8,7 @@SET result = a + b;RETURN result;END;+ changeType: 0want:- status: 2code: 1701@@ -30,3 +25,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/system_function_disallowed_list.yaml b/backend/plugin/advisor/mysql/test/system_function_disallowed_list.yamlindex 3e1522bf57..f2a5583b2d 100644--- a/backend/plugin/advisor/mysql/test/system_function_disallowed_list.yaml+++ b/backend/plugin/advisor/mysql/test/system_function_disallowed_list.yaml@@ -1,12 +1,7 @@- statement: CREATE TABLE t(a int);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: SELECT RAND();+ changeType: 0want:- status: 2code: 1702@@ -16,12 +11,14 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE employee (id VARCHAR(36) DEFAULT (UUID()) PRIMARY KEY,name VARCHAR(255),age INT);+ changeType: 0want:- status: 2code: 1702@@ -36,7 +33,9 @@startposition:line: 2column: 0+ endposition: null- statement: SELECT SLEEP(5);+ changeType: 0want:- status: 2code: 1702@@ -46,3 +45,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/system_procedure_disallow_create.yaml b/backend/plugin/advisor/mysql/test/system_procedure_disallow_create.yamlindex 55b1cf7810..2a6f5bf0d2 100644--- a/backend/plugin/advisor/mysql/test/system_procedure_disallow_create.yaml+++ b/backend/plugin/advisor/mysql/test/system_procedure_disallow_create.yaml@@ -1,16 +1,11 @@- statement: CREATE TABLE t(a int);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE PROCEDURE simpleProcedure()BEGINSELECT 'Hello, World!' AS Message;END;+ changeType: 0want:- status: 2code: 1401@@ -24,3 +19,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/system_view_disallow_create.yaml b/backend/plugin/advisor/mysql/test/system_view_disallow_create.yamlindex 5e47781c10..42c7893918 100644--- a/backend/plugin/advisor/mysql/test/system_view_disallow_create.yaml+++ b/backend/plugin/advisor/mysql/test/system_view_disallow_create.yaml@@ -1,12 +1,7 @@- statement: CREATE TABLE t(a int);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE VIEW get_one AS SELECT 1;+ changeType: 0want:- status: 2code: 1601@@ -16,3 +11,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/table_comment.yaml b/backend/plugin/advisor/mysql/test/table_comment.yamlindex 930792b251..e7b5e603f1 100644--- a/backend/plugin/advisor/mysql/test/table_comment.yaml+++ b/backend/plugin/advisor/mysql/test/table_comment.yaml@@ -1,6 +1,7 @@- statement: |-CREATE TABLE a(b INT) COMMENT 'table';CREATE TABLE t(a int) COMMENT 'some comments';+ changeType: 0want:- status: 2code: 606@@ -10,9 +11,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE a(b INT) COMMENT 'table';CREATE TABLE t(a int);+ changeType: 0want:- status: 2code: 605@@ -22,9 +25,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE a(b INT) COMMENT 'table';CREATE TABLE t(a int) COMMENT 'sdlfkjalkseblkjduafelbnlsdfkljayue';+ changeType: 0want:- status: 2code: 606@@ -34,3 +39,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/table_disallow_partition.yaml b/backend/plugin/advisor/mysql/test/table_disallow_partition.yamlindex 790dee3e67..ca8ac66078 100644--- a/backend/plugin/advisor/mysql/test/table_disallow_partition.yaml+++ b/backend/plugin/advisor/mysql/test/table_disallow_partition.yaml@@ -1,17 +1,12 @@- statement: CREATE TABLE t(a int);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE b(a INT);CREATE TABLE t(a int) PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (6),PARTITION p1 VALUES LESS THAN (11));+ changeType: 0want:- status: 2code: 608@@ -25,11 +20,13 @@startposition:line: 2column: 0+ endposition: null- statement: |-ALTER TABLE tech_book PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (6),PARTITION p1 VALUES LESS THAN (11));+ changeType: 0want:- status: 2code: 608@@ -43,6 +40,7 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE t(a int) PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (6),@@ -52,6 +50,7 @@PARTITION p0 VALUES LESS THAN (6),PARTITION p1 VALUES LESS THAN (11));+ changeType: 0want:- status: 2code: 608@@ -65,6 +64,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 608title: table.disallow-partition@@ -77,3 +77,4 @@startposition:line: 5column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/table_disallow_set_charset.yaml b/backend/plugin/advisor/mysql/test/table_disallow_set_charset.yamlindex 056d6dd4b1..5dab5b7278 100644--- a/backend/plugin/advisor/mysql/test/table_disallow_set_charset.yaml+++ b/backend/plugin/advisor/mysql/test/table_disallow_set_charset.yaml@@ -3,6 +3,7 @@id INT PRIMARY KEY,name VARCHAR(50)) CHARSET=utf8;+ changeType: 0want:- status: 2code: 612@@ -16,12 +17,14 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE employee (id INT PRIMARY KEY,name VARCHAR(50));ALTER TABLE employee CONVERT TO CHARACTER SET utf8;+ changeType: 0want:- status: 2code: 612@@ -31,3 +34,4 @@startposition:line: 5column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/table_disallow_trigger.yaml b/backend/plugin/advisor/mysql/test/table_disallow_trigger.yamlindex de3c896144..1c304e6f32 100644--- a/backend/plugin/advisor/mysql/test/table_disallow_trigger.yaml+++ b/backend/plugin/advisor/mysql/test/table_disallow_trigger.yaml@@ -1,15 +1,10 @@- statement: CREATE TABLE t(a int);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE account (acct_num INT, amount DECIMAL(10,2));CREATE TRIGGER ins_sum BEFORE INSERT ON accountFOR EACH ROW SET @sum = @sum + NEW.amount;+ changeType: 0want:- status: 2code: 610@@ -21,3 +16,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/table_drop_naming_convention.yaml b/backend/plugin/advisor/mysql/test/table_drop_naming_convention.yamlindex 55cfd7a66c..fe65f00c92 100644--- a/backend/plugin/advisor/mysql/test/table_drop_naming_convention.yaml+++ b/backend/plugin/advisor/mysql/test/table_drop_naming_convention.yaml@@ -2,16 +2,11 @@CREATE TABLE foo(a INT);RENAME TABLE foo to foo_delete;DROP TABLE IF EXISTS foo_delete;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE foo(a INT);DROP TABLE IF EXISTS foo;+ changeType: 0want:- status: 2code: 603@@ -21,11 +16,13 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE foo(a INT);RENAME TABLE foo to foo_delete;CREATE TABLE bar(a INT);DROP TABLE IF EXISTS foo_delete, bar;+ changeType: 0want:- status: 2code: 603@@ -35,3 +32,4 @@startposition:line: 4column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/table_no_duplicate_index.yaml b/backend/plugin/advisor/mysql/test/table_no_duplicate_index.yamlindex b88eb07889..125daff966 100644--- a/backend/plugin/advisor/mysql/test/table_no_duplicate_index.yaml+++ b/backend/plugin/advisor/mysql/test/table_no_duplicate_index.yaml@@ -7,13 +7,7 @@INDEX idx_email (email),INDEX idx_name (last_name, first_name));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE orders (id INT PRIMARY KEY,@@ -23,13 +17,7 @@INDEX (order_number),UNIQUE (customer_id));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE users (id INT PRIMARY KEY,@@ -39,6 +27,7 @@INDEX idx_email (email),INDEX idx_username_duplicate (username));+ changeType: 0want:- status: 2code: 815@@ -48,6 +37,7 @@startposition:line: 7column: 0+ endposition: null- statement: |-CREATE TABLE orders (id INT PRIMARY KEY,@@ -57,6 +47,7 @@INDEX (order_number),INDEX (customer_id));+ changeType: 0want:- status: 2code: 815@@ -66,6 +57,7 @@startposition:line: 7column: 0+ endposition: null- statement: |-CREATE TABLE orders (id INT PRIMARY KEY,@@ -76,6 +68,7 @@FOREIGN KEY (customer_id) REFERENCES customers(id));ALTER TABLE orders ADD INDEX idx_duplicate (customer_id);+ changeType: 0want:- status: 2code: 815@@ -85,6 +78,7 @@startposition:line: 9column: 0+ endposition: null- statement: |-CREATE TABLE orders (id INT PRIMARY KEY,@@ -93,6 +87,7 @@);CREATE INDEX idx_customer_id ON orders (customer_id);CREATE INDEX idx_customer_id_duplicate ON orders (customer_id);+ changeType: 0want:- status: 2code: 815@@ -102,6 +97,7 @@startposition:line: 7column: 0+ endposition: null- statement: |-CREATE TABLE orders (id INT PRIMARY KEY,@@ -110,6 +106,7 @@);CREATE INDEX idx_customer ON orders (customer, (order_number * 2));CREATE INDEX idx_customer_duplicate ON orders (customer, (order_number * 2));+ changeType: 0want:- status: 2code: 815@@ -119,6 +116,7 @@startposition:line: 7column: 0+ endposition: null- statement: |-CREATE TABLE orders (id INT PRIMARY KEY,@@ -127,13 +125,7 @@);CREATE INDEX idx_customer_btree USING BTREE ON orders (customer);CREATE INDEX idx_customer_hash USING HASH ON orders (customer);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE orders_sh (id INT PRIMARY KEY,@@ -147,10 +139,4 @@customer VARCHAR(50));CREATE INDEX idx_customer_bj ON orders_bj (customer);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/mysql/test/table_no_foreign_key.yaml b/backend/plugin/advisor/mysql/test/table_no_foreign_key.yamlindex dcf0fbc8c3..3604783977 100644--- a/backend/plugin/advisor/mysql/test/table_no_foreign_key.yaml+++ b/backend/plugin/advisor/mysql/test/table_no_foreign_key.yaml@@ -1,6 +1,7 @@- statement: |-CREATE TABLE book(id INT);ALTER TABLE tech_book ADD CONSTRAINT fk_tech_book_author_id_author_id FOREIGN KEY (author_id) REFERENCES author (id);+ changeType: 0want:- status: 2code: 602@@ -10,9 +11,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t1 (id INT);CREATE TABLE book(id INT, author_id INT, FOREIGN KEY fk_book_author_id_author_id (author_id) REFERENCES author (id));+ changeType: 0want:- status: 2code: 602@@ -22,3 +25,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/mysql/test/table_require_pk.yaml b/backend/plugin/advisor/mysql/test/table_require_pk.yamlindex 7260ff5255..1a7199e263 100644--- a/backend/plugin/advisor/mysql/test/table_require_pk.yaml+++ b/backend/plugin/advisor/mysql/test/table_require_pk.yaml@@ -11,6 +11,7 @@UNIQUE KEY uk1(id, name),FOREIGN KEY fk1(roomId) REFERENCES room(id),INDEX idx_userTable_content(content)) ENGINE = CSV COLLATE latin1_bin;+ changeType: 0want:- status: 2code: 601@@ -20,6 +21,7 @@startposition:line: 1column: 0+ endposition: null- statement: |CREATE TABLE user(id INT PRIMARY KEY COMMENT 'comment',@@ -32,17 +34,12 @@INDEX idx_user_name(name),UNIQUE KEY uk_user_id_name(id, name)) ENGINE = INNODB COMMENT 'comment';- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |CREATE TABLE t1(id INT PRIMARY KEY);CREATE TABLE t2(id INT);ALTER TABLE t2 ADD UNIQUE INDEX uk (id);+ changeType: 0want:- status: 2code: 601@@ -52,10 +49,12 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t1(id INT, PRIMARY KEY (id));CREATE TABLE t2(id INT);ALTER TABLE t2 ADD COLUMN uid INT UNIQUE KEY;+ changeType: 0want:- status: 2code: 601@@ -65,20 +64,16 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t1(id INT PRIMARY KEY);CREATE TABLE t2(id INT, PRIMARY KEY (id));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t1(id INT PRIMARY KEY);CREATE TABLE t2(id INT);DROP TABLE t1;+ changeType: 0want:- status: 2code: 601@@ -88,31 +83,21 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t1(id INT PRIMARY KEY);CREATE TABLE t2(id INT);DROP TABLE t1;DROP TABLE t2;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(id INT);ALTER TABLE t ADD CONSTRAINT PRIMARY KEY (id);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(id INT PRIMARY KEY);ALTER TABLE t DROP PRIMARY KEY;+ changeType: 0want:- status: 2code: 601@@ -122,9 +107,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(id INT PRIMARY KEY);ALTER TABLE t DROP INDEX `PRIMARY`;+ changeType: 0want:- status: 2code: 601@@ -134,66 +121,32 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(id INT);ALTER TABLE t ADD COLUMN name varchar(30) PRIMARY KEY;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(id INT);ALTER TABLE t CHANGE COLUMN id id INT PRIMARY KEY;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book CHANGE COLUMN id uid INT;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(id INT);ALTER TABLE t MODIFY COLUMN id INT PRIMARY KEY;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book MODIFY COLUMN id INT;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(id INT, name varchar(30), PRIMARY KEY(id, name));ALTER TABLE t DROP COLUMN id;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(id INT, name varchar(30), comment varchar(255), PRIMARY KEY(id, name));ALTER TABLE t ADD COLUMN age INT;ALTER TABLE t DROP COLUMN id, DROP COLUMN name;+ changeType: 0want:- status: 2code: 601@@ -203,9 +156,11 @@startposition:line: 3column: 0+ endposition: null- statement: |-ALTER TABLE tech_book ADD COLUMN c INT;ALTER TABLE tech_book ADD COLUMN a int, DROP COLUMN id, DROP COLUMN name;+ changeType: 0want:- status: 2code: 601@@ -215,17 +170,13 @@startposition:line: 2column: 0+ endposition: null- statement: ALTER TABLE tech_book DROP COLUMN name;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-ALTER TABLE tech_book ADD COLUMN c INT;ALTER TABLE tech_book DROP COLUMN name, DROP COLUMN id;+ changeType: 0want:- status: 2code: 601@@ -235,9 +186,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-ALTER TABLE tech_book CHANGE COLUMN id uid int;ALTER TABLE tech_book ADD COLUMN a int, DROP COLUMN uid, DROP COLUMN name;+ changeType: 0want:- status: 2code: 601@@ -247,3 +200,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/oceanbase/advisor_disallow_offline_ddl.go b/backend/plugin/advisor/oceanbase/advisor_disallow_offline_ddl.goindex b443b2e1f9..76fad60f0a 100644--- a/backend/plugin/advisor/oceanbase/advisor_disallow_offline_ddl.go+++ b/backend/plugin/advisor/oceanbase/advisor_disallow_offline_ddl.go@@ -54,14 +54,6 @@ func (*DisallowOfflineDdlAdvisor) Check(ctx advisor.Context, _ string) ([]*storeantlr.ParseTreeWalkerDefault.Walk(checker, stmtNode.Tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/oracle/advisor_column_add_not_null_column_require_default.go b/backend/plugin/advisor/oracle/advisor_column_add_not_null_column_require_default.goindex 937e02d237..e4b0b95825 100644--- a/backend/plugin/advisor/oracle/advisor_column_add_not_null_column_require_default.go+++ b/backend/plugin/advisor/oracle/advisor_column_add_not_null_column_require_default.go@@ -62,14 +62,6 @@ type columnAddNotNullColumnRequireDefaultListener struct {}func (l *columnAddNotNullColumnRequireDefaultListener) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/oracle/advisor_column_maximum_character_length.go b/backend/plugin/advisor/oracle/advisor_column_maximum_character_length.goindex 30b24e872f..c091aaca10 100644--- a/backend/plugin/advisor/oracle/advisor_column_maximum_character_length.go+++ b/backend/plugin/advisor/oracle/advisor_column_maximum_character_length.go@@ -67,14 +67,6 @@ type columnMaximumCharacterLengthListener struct {}func (l *columnMaximumCharacterLengthListener) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/oracle/advisor_column_maximum_varchar_length.go b/backend/plugin/advisor/oracle/advisor_column_maximum_varchar_length.goindex 274f89bee2..2d42a2ab9a 100644--- a/backend/plugin/advisor/oracle/advisor_column_maximum_varchar_length.go+++ b/backend/plugin/advisor/oracle/advisor_column_maximum_varchar_length.go@@ -67,14 +67,6 @@ type columnMaximumVarcharLengthListener struct {}func (l *columnMaximumVarcharLengthListener) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/oracle/advisor_column_no_null.go b/backend/plugin/advisor/oracle/advisor_column_no_null.goindex a5556cb857..2c61c9a56a 100644--- a/backend/plugin/advisor/oracle/advisor_column_no_null.go+++ b/backend/plugin/advisor/oracle/advisor_column_no_null.go@@ -86,14 +86,6 @@ func (l *columnNoNullListener) generateAdvice() ([]*storepb.Advice, error) {})}- if len(advice) == 0 {- advice = append(advice, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return advice, nil}diff --git a/backend/plugin/advisor/oracle/advisor_column_require.go b/backend/plugin/advisor/oracle/advisor_column_require.goindex 773d5c5b88..b19f91a12b 100644--- a/backend/plugin/advisor/oracle/advisor_column_require.go+++ b/backend/plugin/advisor/oracle/advisor_column_require.go@@ -75,14 +75,6 @@ type columnRequireListener struct {}func (l *columnRequireListener) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/oracle/advisor_column_require_default.go b/backend/plugin/advisor/oracle/advisor_column_require_default.goindex ff0b298bec..c3525afded 100644--- a/backend/plugin/advisor/oracle/advisor_column_require_default.go+++ b/backend/plugin/advisor/oracle/advisor_column_require_default.go@@ -83,14 +83,6 @@ func (l *columnRequireDefaultListener) generateAdvice() ([]*storepb.Advice, erro})}- if len(advice) == 0 {- advice = append(advice, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return advice, nil}diff --git a/backend/plugin/advisor/oracle/advisor_column_type_disallow_list.go b/backend/plugin/advisor/oracle/advisor_column_type_disallow_list.goindex d5376304e4..38759de5e8 100644--- a/backend/plugin/advisor/oracle/advisor_column_type_disallow_list.go+++ b/backend/plugin/advisor/oracle/advisor_column_type_disallow_list.go@@ -67,14 +67,6 @@ type columnTypeDisallowListListener struct {}func (l *columnTypeDisallowListListener) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/oracle/advisor_index_key_number_limit.go b/backend/plugin/advisor/oracle/advisor_index_key_number_limit.goindex 5d6a844316..be3d2ad992 100644--- a/backend/plugin/advisor/oracle/advisor_index_key_number_limit.go+++ b/backend/plugin/advisor/oracle/advisor_index_key_number_limit.go@@ -68,14 +68,6 @@ type indexKeyNumberLimitListener struct {}func (l *indexKeyNumberLimitListener) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/oracle/advisor_insert_must_specify_column.go b/backend/plugin/advisor/oracle/advisor_insert_must_specify_column.goindex 9ddb6a02e6..9f96da8148 100644--- a/backend/plugin/advisor/oracle/advisor_insert_must_specify_column.go+++ b/backend/plugin/advisor/oracle/advisor_insert_must_specify_column.go@@ -58,14 +58,6 @@ type insertMustSpecifyColumnListener struct {}func (l *insertMustSpecifyColumnListener) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/oracle/advisor_naming_identifier_case.go b/backend/plugin/advisor/oracle/advisor_naming_identifier_case.goindex 891486809f..a130731638 100644--- a/backend/plugin/advisor/oracle/advisor_naming_identifier_case.go+++ b/backend/plugin/advisor/oracle/advisor_naming_identifier_case.go@@ -67,14 +67,6 @@ type namingIdentifierCaseListener struct {}func (l *namingIdentifierCaseListener) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/oracle/advisor_naming_identifier_no_keyword.go b/backend/plugin/advisor/oracle/advisor_naming_identifier_no_keyword.goindex e60fc33665..e34870892e 100644--- a/backend/plugin/advisor/oracle/advisor_naming_identifier_no_keyword.go+++ b/backend/plugin/advisor/oracle/advisor_naming_identifier_no_keyword.go@@ -61,14 +61,6 @@ type namingIdentifierNoKeywordListener struct {}func (l *namingIdentifierNoKeywordListener) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/oracle/advisor_naming_table.go b/backend/plugin/advisor/oracle/advisor_naming_table.goindex 237bb8d7f8..03b45be038 100644--- a/backend/plugin/advisor/oracle/advisor_naming_table.go+++ b/backend/plugin/advisor/oracle/advisor_naming_table.go@@ -70,14 +70,6 @@ type namingTableListener struct {}func (l *namingTableListener) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/oracle/advisor_naming_table_no_keyword.go b/backend/plugin/advisor/oracle/advisor_naming_table_no_keyword.goindex de9928bb6f..5b390cac66 100644--- a/backend/plugin/advisor/oracle/advisor_naming_table_no_keyword.go+++ b/backend/plugin/advisor/oracle/advisor_naming_table_no_keyword.go@@ -61,14 +61,6 @@ type namingTableNoKeywordListener struct {}func (l *namingTableNoKeywordListener) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/oracle/advisor_select_no_select_all.go b/backend/plugin/advisor/oracle/advisor_select_no_select_all.goindex 4e54bdd499..d1efae60a6 100644--- a/backend/plugin/advisor/oracle/advisor_select_no_select_all.go+++ b/backend/plugin/advisor/oracle/advisor_select_no_select_all.go@@ -58,14 +58,6 @@ type selectNoSelectAllListener struct {}func (l *selectNoSelectAllListener) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/oracle/advisor_statement_dml_dry_run.go b/backend/plugin/advisor/oracle/advisor_statement_dml_dry_run.goindex d71caedb66..965e140b92 100644--- a/backend/plugin/advisor/oracle/advisor_statement_dml_dry_run.go+++ b/backend/plugin/advisor/oracle/advisor_statement_dml_dry_run.go@@ -48,14 +48,6 @@ func (*StatementDmlDryRunAdvisor) Check(ctx advisor.Context, _ string) ([]*storeantlr.ParseTreeWalkerDefault.Walk(checker, tree)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/oracle/advisor_table_no_foreign_key.go b/backend/plugin/advisor/oracle/advisor_table_no_foreign_key.goindex bd9a798da9..12451f4b57 100644--- a/backend/plugin/advisor/oracle/advisor_table_no_foreign_key.go+++ b/backend/plugin/advisor/oracle/advisor_table_no_foreign_key.go@@ -79,14 +79,6 @@ func (l *tableNoForeignKeyListener) generateAdvice() ([]*storepb.Advice, error)}}- if len(advice) == 0 {- advice = append(advice, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return advice, nil}diff --git a/backend/plugin/advisor/oracle/advisor_table_require_pk.go b/backend/plugin/advisor/oracle/advisor_table_require_pk.goindex 69e1146203..e0f5c3fd7f 100644--- a/backend/plugin/advisor/oracle/advisor_table_require_pk.go+++ b/backend/plugin/advisor/oracle/advisor_table_require_pk.go@@ -79,14 +79,6 @@ func (l *TableRequirePKListener) generateAdvice() ([]*storepb.Advice, error) {}}- if len(advice) == 0 {- advice = append(advice, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return advice, nil}diff --git a/backend/plugin/advisor/oracle/advisor_where_no_leading_wildcard_like.go b/backend/plugin/advisor/oracle/advisor_where_no_leading_wildcard_like.goindex 0a2f2d0df2..6a88a9b33a 100644--- a/backend/plugin/advisor/oracle/advisor_where_no_leading_wildcard_like.go+++ b/backend/plugin/advisor/oracle/advisor_where_no_leading_wildcard_like.go@@ -60,14 +60,6 @@ type whereNoLeadingWildcardLikeListener struct {}func (l *whereNoLeadingWildcardLikeListener) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/oracle/advisor_where_require.go b/backend/plugin/advisor/oracle/advisor_where_require.goindex 6e9bf9e749..44be6e45b8 100644--- a/backend/plugin/advisor/oracle/advisor_where_require.go+++ b/backend/plugin/advisor/oracle/advisor_where_require.go@@ -60,14 +60,6 @@ type whereRequireListener struct {}func (l *whereRequireListener) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/oracle/test/column_add_not_null_require_default.yaml b/backend/plugin/advisor/oracle/test/column_add_not_null_require_default.yamlindex 58adeaa201..ae39bd0bdf 100644--- a/backend/plugin/advisor/oracle/test/column_add_not_null_require_default.yaml+++ b/backend/plugin/advisor/oracle/test/column_add_not_null_require_default.yaml@@ -1,4 +1,5 @@- statement: ALTER TABLE tech_book ADD reader int NOT NULL+ changeType: 0want:- status: 2code: 404@@ -8,11 +9,6 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book ADD reader int DEFAULT 0 NOT NULL- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/oracle/test/column_maximum_character_length.yaml b/backend/plugin/advisor/oracle/test/column_maximum_character_length.yamlindex 16b3de3b39..e1ee40b3fe 100644--- a/backend/plugin/advisor/oracle/test/column_maximum_character_length.yaml+++ b/backend/plugin/advisor/oracle/test/column_maximum_character_length.yaml@@ -1,20 +1,9 @@- statement: CREATE TABLE t(name char(20));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(name varchar(225));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(name char(225));+ changeType: 0want:- status: 2code: 415@@ -24,7 +13,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE public.tech_book ADD name_2 char(225)+ changeType: 0want:- status: 2code: 415@@ -34,7 +25,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book MODIFY name char(225)+ changeType: 0want:- status: 2code: 415@@ -44,3 +37,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/oracle/test/column_maximum_varchar_length.yaml b/backend/plugin/advisor/oracle/test/column_maximum_varchar_length.yamlindex ac34840709..9e48ff611e 100644--- a/backend/plugin/advisor/oracle/test/column_maximum_varchar_length.yaml+++ b/backend/plugin/advisor/oracle/test/column_maximum_varchar_length.yaml@@ -1,12 +1,7 @@- statement: CREATE TABLE t(name varchar(20));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(name varchar(3000));+ changeType: 0want:- status: 2code: 422@@ -16,15 +11,11 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(name varchar(225));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE public.tech_book ADD name_2 varchar(22225)+ changeType: 0want:- status: 2code: 422@@ -34,7 +25,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book MODIFY name varchar(22225)+ changeType: 0want:- status: 2code: 422@@ -44,3 +37,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/oracle/test/column_no_null.yaml b/backend/plugin/advisor/oracle/test/column_no_null.yamlindex 7d6b295e6a..4cca81a174 100644--- a/backend/plugin/advisor/oracle/test/column_no_null.yaml+++ b/backend/plugin/advisor/oracle/test/column_no_null.yaml@@ -3,6 +3,7 @@id int,name varchar(255))+ changeType: 0want:- status: 2code: 402@@ -12,6 +13,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 402title: column.no-null@@ -20,7 +22,9 @@startposition:line: 3column: 0+ endposition: null- statement: CREATE TABLE book(id int, name varchar(255), PRIMARY KEY (id))+ changeType: 0want:- status: 2code: 402@@ -30,7 +34,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE book(id int PRIMARY KEY, name varchar(255))+ changeType: 0want:- status: 2code: 402@@ -40,7 +46,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE book(id int NOT NULL, name varchar(255))+ changeType: 0want:- status: 2code: 402@@ -50,15 +58,11 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE book(id int PRIMARY KEY, name varchar(255) NOT NULL)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book ADD reader int+ changeType: 0want:- status: 2code: 402@@ -68,27 +72,17 @@startposition:line: 1column: 0+ endposition: null- statement: |-ALTER TABLE tech_book DROP COLUMN id;ALTER TABLE tech_book DROP COLUMN name;ALTER TABLE tech_book ADD id int PRIMARY KEY;ALTER TABLE tech_book ADD name varchar(255) NOT NULL;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book MODIFY id NOT NULL- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book MODIFY name NULL+ changeType: 0want:- status: 2code: 402@@ -98,11 +92,6 @@startposition:line: 1column: 0+ endposition: null- statement: -- this is a comment- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/oracle/test/column_require_default.yaml b/backend/plugin/advisor/oracle/test/column_require_default.yamlindex 9b0b5c8bc1..c1c3bbb591 100644--- a/backend/plugin/advisor/oracle/test/column_require_default.yaml+++ b/backend/plugin/advisor/oracle/test/column_require_default.yaml@@ -1,4 +1,5 @@- statement: CREATE TABLE t(a int primary key, b int default 1)+ changeType: 0want:- status: 2code: 420@@ -8,11 +9,13 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE t(a int,b int default 1)+ changeType: 0want:- status: 2code: 420@@ -22,3 +25,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/oracle/test/column_required.yaml b/backend/plugin/advisor/oracle/test/column_required.yamlindex ed34f7b1cc..4a4f95aab2 100644--- a/backend/plugin/advisor/oracle/test/column_required.yaml+++ b/backend/plugin/advisor/oracle/test/column_required.yaml@@ -1,4 +1,5 @@- statement: CREATE TABLE book("id" int)+ changeType: 0want:- status: 2code: 401@@ -8,6 +9,7 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE book("id" int,@@ -15,16 +17,11 @@"created_ts" timestamp,"updater_id" int,"updated_ts" timestamp)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-ALTER TABLE tech_book ADD "creator_id" int;ALTER TABLE tech_book RENAME COLUMN "creator_id" TO creator;+ changeType: 0want:- status: 2code: 401@@ -34,9 +31,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-ALTER TABLE tech_book ADD "creator_id" int;ALTER TABLE tech_book DROP COLUMN "creator_id";+ changeType: 0want:- status: 2code: 401@@ -46,3 +45,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/oracle/test/column_type_disallow_list.yaml b/backend/plugin/advisor/oracle/test/column_type_disallow_list.yamlindex 604ad3db13..b4501ebce4 100644--- a/backend/plugin/advisor/oracle/test/column_type_disallow_list.yaml+++ b/backend/plugin/advisor/oracle/test/column_type_disallow_list.yaml@@ -1,12 +1,7 @@- statement: CREATE TABLE t(a char(5));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(a int, b JSON);+ changeType: 0want:- status: 2code: 411@@ -16,9 +11,11 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE t(d char(5));ALTER TABLE t add a JSON;+ changeType: 0want:- status: 2code: 411@@ -28,9 +25,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(d char(5));ALTER TABLE t MODIFY d BINARY_FLOAT;+ changeType: 0want:- status: 2code: 411@@ -40,7 +39,9 @@startposition:line: 2column: 0+ endposition: null- statement: CREATE TABLE t(a int, b BINARY_FLOAT);+ changeType: 0want:- status: 2code: 411@@ -50,9 +51,11 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE t(d char(5));ALTER TABLE t add a BINARY_FLOAT;+ changeType: 0want:- status: 2code: 411@@ -62,3 +65,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/oracle/test/index_key_number_limit.yaml b/backend/plugin/advisor/oracle/test/index_key_number_limit.yamlindex 1ed6160eb5..e552d39e84 100644--- a/backend/plugin/advisor/oracle/test/index_key_number_limit.yaml+++ b/backend/plugin/advisor/oracle/test/index_key_number_limit.yaml@@ -1,28 +1,11 @@- statement: CREATE TABLE t(name char(20));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(name varchar(225));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(name char(225), PRIMARY KEY (name));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(id int, name char(225), c1 int, c2 int, c3 int, c4 int, CONSTRAINT t_id_name PRIMARY KEY (id, name, c1, c2, c3, c4));+ changeType: 0want:- status: 2code: 802@@ -32,7 +15,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(id int, name char(225), c1 int, c2 int, c3 int, c4 int, CONSTRAINT t_id_name UNIQUE (id, name, c1, c2, c3, c4));+ changeType: 0want:- status: 2code: 802@@ -42,9 +27,11 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE address(id int, phone varchar(225), c1 int, c2 int, c3 int, c4 int);CREATE INDEX idx_address_phone ON address(id, phone, c1, c2, c3, c4);+ changeType: 0want:- status: 2code: 802@@ -54,9 +41,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE address(id int, phone varchar(225), c1 int, c2 int, c3 int, c4 int);CREATE UNIQUE INDEX idx_address_phone ON address(id, phone, c2, c1, c3, c4);+ changeType: 0want:- status: 2code: 802@@ -66,9 +55,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE address(id int, phone varchar(225), c1 int, c2 int, c3 int, c4 int);ALTER TABLE address ADD CONSTRAINT address_id_name UNIQUE (id, phone, c1, c2, c3, c4);+ changeType: 0want:- status: 2code: 802@@ -78,3 +69,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/oracle/test/naming_identifier_case.yaml b/backend/plugin/advisor/oracle/test/naming_identifier_case.yamlindex 9e4f58688b..9f0ce69711 100644--- a/backend/plugin/advisor/oracle/test/naming_identifier_case.yaml+++ b/backend/plugin/advisor/oracle/test/naming_identifier_case.yaml@@ -1,4 +1,5 @@- statement: CREATE TABLE "table"(id int, name varchar(255))+ changeType: 0want:- status: 2code: 309@@ -8,15 +9,11 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE tt(id int, name varchar(255))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE "Tt"(id int, name varchar(255))+ changeType: 0want:- status: 2code: 309@@ -26,21 +23,10 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book RENAME TO analyze- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-create table techBook(id int);ALTER TABLE techBook RENAME TO tech_book_tmp;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/oracle/test/naming_identifier_no_keyword.yaml b/backend/plugin/advisor/oracle/test/naming_identifier_no_keyword.yamlindex ac6a5e7f0d..c5000aefb2 100644--- a/backend/plugin/advisor/oracle/test/naming_identifier_no_keyword.yaml+++ b/backend/plugin/advisor/oracle/test/naming_identifier_no_keyword.yaml@@ -1,4 +1,5 @@- statement: CREATE TABLE "table"(id int, name varchar(255))+ changeType: 0want:- status: 2code: 308@@ -8,6 +9,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 308title: naming.identifier.no-keyword@@ -16,7 +18,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE "rlcmidzlevbivwvcntihenpoibtsdfasdfasdfiutqeb"(id int, name varchar(255))+ changeType: 0want:- status: 2code: 308@@ -26,7 +30,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE analyze(id int, name varchar(255))+ changeType: 0want:- status: 2code: 308@@ -36,21 +42,10 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book RENAME TO analyze- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-create table techBook(id int);ALTER TABLE techBook RENAME TO tech_book_tmp;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/oracle/test/naming_table.yaml b/backend/plugin/advisor/oracle/test/naming_table.yamlindex 80db49292f..88476e1977 100644--- a/backend/plugin/advisor/oracle/test/naming_table.yaml+++ b/backend/plugin/advisor/oracle/test/naming_table.yaml@@ -1,4 +1,5 @@- statement: CREATE TABLE "techBook"(id int, name varchar(255))+ changeType: 0want:- status: 2code: 301@@ -8,15 +9,11 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE "rlcmidzlevbivwvcntihenpoibtsdfasdfasdfiutqeb"(id int, name varchar(255))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE tech_Book(id int, name varchar(255))+ changeType: 0want:- status: 2code: 301@@ -26,7 +23,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE techBook(id int, name varchar(255))+ changeType: 0want:- status: 2code: 301@@ -36,7 +35,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE book(id int, name varchar(255))+ changeType: 0want:- status: 2code: 301@@ -46,7 +47,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book RENAME TO "TechBook"+ changeType: 0want:- status: 2code: 301@@ -56,9 +59,11 @@startposition:line: 1column: 0+ endposition: null- statement: |-create table techBook(id int);ALTER TABLE techBook RENAME TO tech_book_tmp;+ changeType: 0want:- status: 2code: 301@@ -68,6 +73,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 301title: naming.table@@ -76,9 +82,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE tech_Book(id int, name varchar(255));ALTER TABLE tech_book RENAME TO "tech_book";+ changeType: 0want:- status: 2code: 301@@ -88,3 +96,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/oracle/test/naming_table_no_keyword.yaml b/backend/plugin/advisor/oracle/test/naming_table_no_keyword.yamlindex f9aab2cec4..3a4dc4e2e3 100644--- a/backend/plugin/advisor/oracle/test/naming_table_no_keyword.yaml+++ b/backend/plugin/advisor/oracle/test/naming_table_no_keyword.yaml@@ -1,4 +1,5 @@- statement: CREATE TABLE "table"(id int, name varchar(255))+ changeType: 0want:- status: 2code: 308@@ -8,15 +9,11 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE "rlcmidzlevbivwvcntihenpoibtsdfasdfasdfiutqeb"(id int, name varchar(255))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE avg(id int, name varchar(255))+ changeType: 0want:- status: 2code: 308@@ -26,7 +23,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book RENAME TO avg+ changeType: 0want:- status: 2code: 308@@ -36,13 +35,8 @@startposition:line: 1column: 0+ endposition: null- statement: |-create table techBook(id int);ALTER TABLE techBook RENAME TO tech_book_tmp;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/oracle/test/statement_insert_must_specify_column.yaml b/backend/plugin/advisor/oracle/test/statement_insert_must_specify_column.yamlindex 2ea68aec16..d9000bc8ef 100644--- a/backend/plugin/advisor/oracle/test/statement_insert_must_specify_column.yaml+++ b/backend/plugin/advisor/oracle/test/statement_insert_must_specify_column.yaml@@ -1,12 +1,7 @@- statement: INSERT INTO tech_book(id, name) VALUES (1, '1')- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: INSERT INTO tech_book VALUES (1, '1')+ changeType: 0want:- status: 2code: 1107@@ -16,3 +11,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/oracle/test/statement_select_no_select_all.yaml b/backend/plugin/advisor/oracle/test/statement_select_no_select_all.yamlindex da283d21ee..0548a580f9 100644--- a/backend/plugin/advisor/oracle/test/statement_select_no_select_all.yaml+++ b/backend/plugin/advisor/oracle/test/statement_select_no_select_all.yaml@@ -1,4 +1,5 @@- statement: SELECT * FROM t+ changeType: 0want:- status: 2code: 203@@ -8,15 +9,11 @@startposition:line: 1column: 0+ endposition: null- statement: SELECT a, b FROM t- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: SELECT a, b FROM (SELECT * from t1, t2) t+ changeType: 0want:- status: 2code: 203@@ -26,7 +23,9 @@startposition:line: 1column: 0+ endposition: null- statement: INSERT INTO t SELECT * FROM t1+ changeType: 0want:- status: 2code: 203@@ -36,3 +35,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/oracle/test/statement_where_no_leading_wildcard_like.yaml b/backend/plugin/advisor/oracle/test/statement_where_no_leading_wildcard_like.yamlindex f6d02b7b43..8a449b9cec 100644--- a/backend/plugin/advisor/oracle/test/statement_where_no_leading_wildcard_like.yaml+++ b/backend/plugin/advisor/oracle/test/statement_where_no_leading_wildcard_like.yaml@@ -1,12 +1,7 @@- statement: SELECT * FROM t WHERE a LIKE 'abc%'- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: SELECT * FROM t WHERE a LIKE '%abc'+ changeType: 0want:- status: 2code: 204@@ -16,7 +11,9 @@startposition:line: 1column: 0+ endposition: null- statement: SELECT * FROM t WHERE a LIKE 'abc' OR a LIKE '%abc'+ changeType: 0want:- status: 2code: 204@@ -26,7 +23,9 @@startposition:line: 1column: 0+ endposition: null- statement: SELECT * FROM t WHERE a LIKE '%acc' OR a LIKE '%abc'+ changeType: 0want:- status: 2code: 204@@ -36,6 +35,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 204title: statement.where.no-leading-wildcard-like@@ -44,7 +44,9 @@startposition:line: 1column: 0+ endposition: null- statement: SELECT * FROM (SELECT * FROM t WHERE a LIKE '%acc' OR a LIKE '%abc') t1+ changeType: 0want:- status: 2code: 204@@ -54,6 +56,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 204title: statement.where.no-leading-wildcard-like@@ -62,3 +65,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/oracle/test/statement_where_require.yaml b/backend/plugin/advisor/oracle/test/statement_where_require.yamlindex 8c6bd8755d..3b2689aa40 100644--- a/backend/plugin/advisor/oracle/test/statement_where_require.yaml+++ b/backend/plugin/advisor/oracle/test/statement_where_require.yaml@@ -1,12 +1,7 @@- statement: INSERT INTO t VALUES(1)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: DELETE FROM t1+ changeType: 0want:- status: 2code: 202@@ -16,7 +11,9 @@startposition:line: 1column: 0+ endposition: null- statement: UPDATE t1 SET a = 1+ changeType: 0want:- status: 2code: 202@@ -26,23 +23,13 @@startposition:line: 1column: 0+ endposition: null- statement: DELETE FROM t1 WHERE a > 0- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: UPDATE t1 SET a = 1 WHERE a > 10- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: SELECT a FROM t+ changeType: 0want:- status: 2code: 202@@ -52,15 +39,11 @@startposition:line: 1column: 0+ endposition: null- statement: SELECT a FROM t WHERE a > 0- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: SELECT a FROM t WHERE a > (SELECT max(id) FROM user)+ changeType: 0want:- status: 2code: 202@@ -70,11 +53,6 @@startposition:line: 1column: 0+ endposition: null- statement: SELECT 1 FROM dual- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/oracle/test/table_no_foreign_key.yaml b/backend/plugin/advisor/oracle/test/table_no_foreign_key.yamlindex 0ea787295b..b7c575561b 100644--- a/backend/plugin/advisor/oracle/test/table_no_foreign_key.yaml+++ b/backend/plugin/advisor/oracle/test/table_no_foreign_key.yaml@@ -1,4 +1,5 @@- statement: ALTER TABLE tech_book ADD CONSTRAINT fk_tech_book_author_id_author_id FOREIGN KEY (author_id) REFERENCES author (id)+ changeType: 0want:- status: 2code: 602@@ -8,7 +9,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE book(id INT, author_id INT, CONSTRAINT fk_book_author_id_author_id FOREIGN KEY (author_id) REFERENCES author (id))+ changeType: 0want:- status: 2code: 602@@ -18,3 +21,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/oracle/test/table_require_pk.yaml b/backend/plugin/advisor/oracle/test/table_require_pk.yamlindex 73786d0ada..aaf8b6db78 100644--- a/backend/plugin/advisor/oracle/test/table_require_pk.yaml+++ b/backend/plugin/advisor/oracle/test/table_require_pk.yaml@@ -1,20 +1,9 @@- statement: CREATE TABLE abc.t(id INT PRIMARY KEY);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(id INT, PRIMARY KEY (id))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE "TEST_DB".t(id INT)+ changeType: 0want:- status: 2code: 601@@ -24,29 +13,19 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE t(id INT);DROP TABLE t- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(id INT);ALTER TABLE t ADD CONSTRAINT tpk PRIMARY KEY (id)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(id INT PRIMARY KEY);ALTER TABLE t DROP PRIMARY KEY+ changeType: 0want:- status: 2code: 601@@ -56,3 +35,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/pg/advisor_collation_allowlist.go b/backend/plugin/advisor/pg/advisor_collation_allowlist.goindex e7fde67274..410daa1774 100644--- a/backend/plugin/advisor/pg/advisor_collation_allowlist.go+++ b/backend/plugin/advisor/pg/advisor_collation_allowlist.go@@ -54,14 +54,6 @@ func (*CollationAllowlistAdvisor) Check(ctx advisor.Context, _ string) ([]*storeast.Walk(checker, stmt)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_column_disallow_changing_type.go b/backend/plugin/advisor/pg/advisor_column_disallow_changing_type.goindex dcd4d922cf..a3a0421121 100644--- a/backend/plugin/advisor/pg/advisor_column_disallow_changing_type.go+++ b/backend/plugin/advisor/pg/advisor_column_disallow_changing_type.go@@ -47,14 +47,6 @@ func (*ColumnDisallowChangingTypeAdvisor) Check(ctx advisor.Context, _ string) (ast.Walk(checker, stmt)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_column_maximum_character_length.go b/backend/plugin/advisor/pg/advisor_column_maximum_character_length.goindex 2af1add036..628fad232c 100644--- a/backend/plugin/advisor/pg/advisor_column_maximum_character_length.go+++ b/backend/plugin/advisor/pg/advisor_column_maximum_character_length.go@@ -52,14 +52,6 @@ func (*ColumnMaximumCharacterLengthAdvisor) Check(ctx advisor.Context, _ string)}}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_column_no_null.go b/backend/plugin/advisor/pg/advisor_column_no_null.goindex 10098a5ebb..383b6adc1e 100644--- a/backend/plugin/advisor/pg/advisor_column_no_null.go+++ b/backend/plugin/advisor/pg/advisor_column_no_null.go@@ -88,14 +88,6 @@ func (checker *columnNoNullChecker) generateAdviceList() []*storepb.Advice {})}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList}diff --git a/backend/plugin/advisor/pg/advisor_column_require_default.go b/backend/plugin/advisor/pg/advisor_column_require_default.goindex d59230d9fc..8eb2cf5fd9 100644--- a/backend/plugin/advisor/pg/advisor_column_require_default.go+++ b/backend/plugin/advisor/pg/advisor_column_require_default.go@@ -97,14 +97,6 @@ func (checker *columnRequireDefaultChecker) generateAdvice() []*storepb.Advice {}}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList}diff --git a/backend/plugin/advisor/pg/advisor_column_required.go b/backend/plugin/advisor/pg/advisor_column_required.goindex 57d5b5e148..01bdb466f8 100644--- a/backend/plugin/advisor/pg/advisor_column_required.go+++ b/backend/plugin/advisor/pg/advisor_column_required.go@@ -57,14 +57,6 @@ func (*ColumnRequirementAdvisor) Check(ctx advisor.Context, _ string) ([]*storepast.Walk(checker, stmt)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_column_type_disallow_list.go b/backend/plugin/advisor/pg/advisor_column_type_disallow_list.goindex f550c45735..e64270d5c5 100644--- a/backend/plugin/advisor/pg/advisor_column_type_disallow_list.go+++ b/backend/plugin/advisor/pg/advisor_column_type_disallow_list.go@@ -50,14 +50,6 @@ func (*ColumnTypeDisallowListAdvisor) Check(ctx advisor.Context, _ string) ([]*sast.Walk(checker, stmt)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_comment_convention.go b/backend/plugin/advisor/pg/advisor_comment_convention.goindex a7ed310fac..ab7eea4f6b 100644--- a/backend/plugin/advisor/pg/advisor_comment_convention.go+++ b/backend/plugin/advisor/pg/advisor_comment_convention.go@@ -50,14 +50,6 @@ func (*CommentConventionAdvisor) Check(ctx advisor.Context, _ string) ([]*storepast.Walk(checker, stmt)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_encoding_allowlist.go b/backend/plugin/advisor/pg/advisor_encoding_allowlist.goindex a3e8f96a85..7a64d21bd3 100644--- a/backend/plugin/advisor/pg/advisor_encoding_allowlist.go+++ b/backend/plugin/advisor/pg/advisor_encoding_allowlist.go@@ -55,14 +55,6 @@ func (*EncodingAllowlistAdvisor) Check(ctx advisor.Context, _ string) ([]*storepast.Walk(checker, stmt)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_index_create_concurrently.go b/backend/plugin/advisor/pg/advisor_index_create_concurrently.goindex ab76f1b0a9..d9001799d8 100644--- a/backend/plugin/advisor/pg/advisor_index_create_concurrently.go+++ b/backend/plugin/advisor/pg/advisor_index_create_concurrently.go@@ -43,14 +43,6 @@ func (*IndexCreateConcurrentlyAdvisor) Check(ctx advisor.Context, _ string) ([]*ast.Walk(checker, stmt)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_index_key_number_limit.go b/backend/plugin/advisor/pg/advisor_index_key_number_limit.goindex 83f267e53e..21362f505a 100644--- a/backend/plugin/advisor/pg/advisor_index_key_number_limit.go+++ b/backend/plugin/advisor/pg/advisor_index_key_number_limit.go@@ -49,14 +49,6 @@ func (*IndexKeyNumberLimitAdvisor) Check(ctx advisor.Context, _ string) ([]*storast.Walk(checker, stmt)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_index_no_duplicate_column.go b/backend/plugin/advisor/pg/advisor_index_no_duplicate_column.goindex fc71850e8f..e6759c72e9 100644--- a/backend/plugin/advisor/pg/advisor_index_no_duplicate_column.go+++ b/backend/plugin/advisor/pg/advisor_index_no_duplicate_column.go@@ -40,15 +40,6 @@ func (*IndexNoDuplicateColumnAdvisor) Check(ctx advisor.Context, _ string) ([]*sast.Walk(checker, stmt)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }-return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_index_primary_key_type_allowlist.go b/backend/plugin/advisor/pg/advisor_index_primary_key_type_allowlist.goindex c6ebacda19..8e6745e43c 100644--- a/backend/plugin/advisor/pg/advisor_index_primary_key_type_allowlist.go+++ b/backend/plugin/advisor/pg/advisor_index_primary_key_type_allowlist.go@@ -52,14 +52,6 @@ func (*IndexPrimaryKeyTypeAllowlistAdvisor) Check(ctx advisor.Context, _ string)ast.Walk(checker, stmt)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_index_total_number_limit.go b/backend/plugin/advisor/pg/advisor_index_total_number_limit.goindex e3a6a03e51..307d67a9a4 100644--- a/backend/plugin/advisor/pg/advisor_index_total_number_limit.go+++ b/backend/plugin/advisor/pg/advisor_index_total_number_limit.go@@ -114,14 +114,6 @@ func (checker *indexTotalNumberLimitChecker) generateAdvice() []*storepb.Advice}}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList}diff --git a/backend/plugin/advisor/pg/advisor_insert_disallow_order_by_rand.go b/backend/plugin/advisor/pg/advisor_insert_disallow_order_by_rand.goindex d65a86c027..ea446e8487 100644--- a/backend/plugin/advisor/pg/advisor_insert_disallow_order_by_rand.go+++ b/backend/plugin/advisor/pg/advisor_insert_disallow_order_by_rand.go@@ -47,14 +47,6 @@ func (*InsertDisallowOrderByRandAdvisor) Check(ctx advisor.Context, _ string) ([ast.Walk(checker, stmt)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_insert_must_specify_column.go b/backend/plugin/advisor/pg/advisor_insert_must_specify_column.goindex b6a89b6004..06715913d4 100644--- a/backend/plugin/advisor/pg/advisor_insert_must_specify_column.go+++ b/backend/plugin/advisor/pg/advisor_insert_must_specify_column.go@@ -46,14 +46,6 @@ func (*InsertMustSpecifyColumnAdvisor) Check(ctx advisor.Context, _ string) ([]*ast.Walk(checker, stmt)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_insert_row_limit.go b/backend/plugin/advisor/pg/advisor_insert_row_limit.goindex 791cc62e6c..09f4217630 100644--- a/backend/plugin/advisor/pg/advisor_insert_row_limit.go+++ b/backend/plugin/advisor/pg/advisor_insert_row_limit.go@@ -58,14 +58,6 @@ func (*InsertRowLimitAdvisor) Check(ctx advisor.Context, _ string) ([]*storepb.A}}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_migration_compatibility.go b/backend/plugin/advisor/pg/advisor_migration_compatibility.goindex 843568a6d9..b7100c0c90 100644--- a/backend/plugin/advisor/pg/advisor_migration_compatibility.go+++ b/backend/plugin/advisor/pg/advisor_migration_compatibility.go@@ -44,14 +44,6 @@ func (*CompatibilityAdvisor) Check(ctx advisor.Context, _ string) ([]*storepb.Adast.Walk(checker, stmt)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_naming_column.go b/backend/plugin/advisor/pg/advisor_naming_column.goindex c878889624..8289e624df 100644--- a/backend/plugin/advisor/pg/advisor_naming_column.go+++ b/backend/plugin/advisor/pg/advisor_naming_column.go@@ -51,14 +51,6 @@ func (*NamingColumnConventionAdvisor) Check(ctx advisor.Context, _ string) ([]*sast.Walk(checker, stmt)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_naming_foreign_key_convention.go b/backend/plugin/advisor/pg/advisor_naming_foreign_key_convention.goindex 997695faaf..522bb6fffb 100644--- a/backend/plugin/advisor/pg/advisor_naming_foreign_key_convention.go+++ b/backend/plugin/advisor/pg/advisor_naming_foreign_key_convention.go@@ -54,15 +54,6 @@ func (*NamingFKConventionAdvisor) Check(ctx advisor.Context, _ string) ([]*storeast.Walk(checker, stmtNode)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }-return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_naming_fully_qualified.go b/backend/plugin/advisor/pg/advisor_naming_fully_qualified.goindex f7f08a20aa..4775314fc7 100644--- a/backend/plugin/advisor/pg/advisor_naming_fully_qualified.go+++ b/backend/plugin/advisor/pg/advisor_naming_fully_qualified.go@@ -154,15 +154,6 @@ func (*FullyQualifiedObjectNameAdvisor) Check(ctx advisor.Context, _ string) ([]}}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }-return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_naming_index_convention.go b/backend/plugin/advisor/pg/advisor_naming_index_convention.goindex 388c3eacd7..9844a5e82a 100644--- a/backend/plugin/advisor/pg/advisor_naming_index_convention.go+++ b/backend/plugin/advisor/pg/advisor_naming_index_convention.go@@ -54,15 +54,6 @@ func (*NamingIndexConventionAdvisor) Check(ctx advisor.Context, _ string) ([]*stast.Walk(checker, stmt)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }-return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_naming_primary_key_convention.go b/backend/plugin/advisor/pg/advisor_naming_primary_key_convention.goindex d5efdec840..3cd0291655 100644--- a/backend/plugin/advisor/pg/advisor_naming_primary_key_convention.go+++ b/backend/plugin/advisor/pg/advisor_naming_primary_key_convention.go@@ -55,15 +55,6 @@ func (*NamingPKConventionAdvisor) Check(ctx advisor.Context, _ string) ([]*storeast.Walk(checker, stmtNode)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }-return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_naming_table.go b/backend/plugin/advisor/pg/advisor_naming_table.goindex 4087988931..8e2b5e7269 100644--- a/backend/plugin/advisor/pg/advisor_naming_table.go+++ b/backend/plugin/advisor/pg/advisor_naming_table.go@@ -51,14 +51,6 @@ func (*NamingTableConventionAdvisor) Check(ctx advisor.Context, _ string) ([]*stast.Walk(checker, stmt)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_naming_unique_key_convention.go b/backend/plugin/advisor/pg/advisor_naming_unique_key_convention.goindex caecfd8b94..7a372c6dad 100644--- a/backend/plugin/advisor/pg/advisor_naming_unique_key_convention.go+++ b/backend/plugin/advisor/pg/advisor_naming_unique_key_convention.go@@ -55,15 +55,6 @@ func (*NamingUKConventionAdvisor) Check(ctx advisor.Context, _ string) ([]*storeast.Walk(checker, stmtNode)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }-return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_statement_add_check_not_valid.go b/backend/plugin/advisor/pg/advisor_statement_add_check_not_valid.goindex a24bbff7ee..3191323afa 100644--- a/backend/plugin/advisor/pg/advisor_statement_add_check_not_valid.go+++ b/backend/plugin/advisor/pg/advisor_statement_add_check_not_valid.go@@ -44,14 +44,6 @@ func (*StatementAddCheckNotValidAdvisor) Check(ctx advisor.Context, _ string) ([ast.Walk(checker, stmt)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_statement_add_fk_not_valid.go b/backend/plugin/advisor/pg/advisor_statement_add_fk_not_valid.goindex d51ecf6139..eca89d681c 100644--- a/backend/plugin/advisor/pg/advisor_statement_add_fk_not_valid.go+++ b/backend/plugin/advisor/pg/advisor_statement_add_fk_not_valid.go@@ -44,14 +44,6 @@ func (*StatementAddFKNotValidAdvisor) Check(ctx advisor.Context, _ string) ([]*sast.Walk(checker, stmt)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_statement_affected_row_limit.go b/backend/plugin/advisor/pg/advisor_statement_affected_row_limit.goindex 26d1070cec..6d33090c2e 100644--- a/backend/plugin/advisor/pg/advisor_statement_affected_row_limit.go+++ b/backend/plugin/advisor/pg/advisor_statement_affected_row_limit.go@@ -57,14 +57,6 @@ func (*StatementAffectedRowLimitAdvisor) Check(ctx advisor.Context, _ string) ([}}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_statement_check_set_role_variable.go b/backend/plugin/advisor/pg/advisor_statement_check_set_role_variable.goindex d85c492ff4..9b0270b58a 100644--- a/backend/plugin/advisor/pg/advisor_statement_check_set_role_variable.go+++ b/backend/plugin/advisor/pg/advisor_statement_check_set_role_variable.go@@ -57,10 +57,5 @@ func (*StatementCheckSetRoleVariable) Check(ctx advisor.Context, _ string) ([]*s}}, nil}- return []*storepb.Advice{{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- }}, nil+ return nil, nil}diff --git a/backend/plugin/advisor/pg/advisor_statement_create_specify_schema.go b/backend/plugin/advisor/pg/advisor_statement_create_specify_schema.goindex 3ccc5cba9a..5bfc50d610 100644--- a/backend/plugin/advisor/pg/advisor_statement_create_specify_schema.go+++ b/backend/plugin/advisor/pg/advisor_statement_create_specify_schema.go@@ -39,14 +39,6 @@ func (*StatementCreateSpecifySchema) Check(ctx advisor.Context, _ string) ([]*stast.Walk(checker, stmt)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_statement_disallow_add_column_with_default.go b/backend/plugin/advisor/pg/advisor_statement_disallow_add_column_with_default.goindex c9e3a646c1..bcaf5f5166 100644--- a/backend/plugin/advisor/pg/advisor_statement_disallow_add_column_with_default.go+++ b/backend/plugin/advisor/pg/advisor_statement_disallow_add_column_with_default.go@@ -44,14 +44,6 @@ func (*StatementDisallowAddColumnWithDefaultAdvisor) Check(ctx advisor.Context,ast.Walk(checker, stmt)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_statement_disallow_add_not_null.go b/backend/plugin/advisor/pg/advisor_statement_disallow_add_not_null.goindex dcd259ec32..0ac48e6d30 100644--- a/backend/plugin/advisor/pg/advisor_statement_disallow_add_not_null.go+++ b/backend/plugin/advisor/pg/advisor_statement_disallow_add_not_null.go@@ -46,14 +46,6 @@ func (*StatementDisallowAddNotNullAdvisor) Check(ctx advisor.Context, _ string)ast.Walk(checker, stmt)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_statement_disallow_commit.go b/backend/plugin/advisor/pg/advisor_statement_disallow_commit.goindex d5f54fe936..f8e30f4335 100644--- a/backend/plugin/advisor/pg/advisor_statement_disallow_commit.go+++ b/backend/plugin/advisor/pg/advisor_statement_disallow_commit.go@@ -45,14 +45,6 @@ func (*StatementDisallowCommitAdvisor) Check(ctx advisor.Context, _ string) ([]*ast.Walk(checker, stmt)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_statement_disallow_mix_ddl_dml.go b/backend/plugin/advisor/pg/advisor_statement_disallow_mix_ddl_dml.goindex 4e6a688f2c..a5ab4d7139 100644--- a/backend/plugin/advisor/pg/advisor_statement_disallow_mix_ddl_dml.go+++ b/backend/plugin/advisor/pg/advisor_statement_disallow_mix_ddl_dml.go@@ -93,14 +93,5 @@ func (*StatementDisallowMixDdlDmlAdvisor) Check(ctx advisor.Context, _ string) (})}- if len(adviceList) == 0 {- adviceList = append(adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }-return adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_statement_disallow_on_del_cascade.go b/backend/plugin/advisor/pg/advisor_statement_disallow_on_del_cascade.goindex 1bf3a6057b..722f9f76ea 100644--- a/backend/plugin/advisor/pg/advisor_statement_disallow_on_del_cascade.go+++ b/backend/plugin/advisor/pg/advisor_statement_disallow_on_del_cascade.go@@ -28,14 +28,7 @@ type StatementDisallowOnDelCascadeAdvisor struct {func (*StatementDisallowOnDelCascadeAdvisor) Check(ctx advisor.Context, _ string) ([]*storepb.Advice, error) {stmt := ctx.Statementsif stmt == "" {- return []*storepb.Advice{- {- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- },- }, nil+ return nil, nil}level, err := advisor.NewStatusBySQLReviewRuleLevel(ctx.Rule.Level)@@ -69,14 +62,7 @@ func (*StatementDisallowOnDelCascadeAdvisor) Check(ctx advisor.Context, _ string},})}- if len(adviceList) == 0 {- adviceList = append(adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }+return adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_statement_disallow_rm_tbl_cascade.go b/backend/plugin/advisor/pg/advisor_statement_disallow_rm_tbl_cascade.goindex e089f53125..7fbfa3111a 100644--- a/backend/plugin/advisor/pg/advisor_statement_disallow_rm_tbl_cascade.go+++ b/backend/plugin/advisor/pg/advisor_statement_disallow_rm_tbl_cascade.go@@ -28,14 +28,7 @@ type StatementDisallowRemoveTblCascadeAdvisor struct {func (*StatementDisallowRemoveTblCascadeAdvisor) Check(ctx advisor.Context, _ string) ([]*storepb.Advice, error) {stmt := ctx.Statementsif stmt == "" {- return []*storepb.Advice{- {- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- },- }, nil+ return nil, nil}level, err := advisor.NewStatusBySQLReviewRuleLevel(ctx.Rule.Level)@@ -69,14 +62,7 @@ func (*StatementDisallowRemoveTblCascadeAdvisor) Check(ctx advisor.Context, _ st},})}- if len(adviceList) == 0 {- adviceList = append(adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }+return adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_statement_dml_dry_run.go b/backend/plugin/advisor/pg/advisor_statement_dml_dry_run.goindex eb582f3b97..25df17840b 100644--- a/backend/plugin/advisor/pg/advisor_statement_dml_dry_run.go+++ b/backend/plugin/advisor/pg/advisor_statement_dml_dry_run.go@@ -51,14 +51,6 @@ func (*StatementDmlDryRunAdvisor) Check(ctx advisor.Context, _ string) ([]*store}}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_statement_maximum_limit_value.go b/backend/plugin/advisor/pg/advisor_statement_maximum_limit_value.goindex 4a8783c01b..a7e8c9f2b0 100644--- a/backend/plugin/advisor/pg/advisor_statement_maximum_limit_value.go+++ b/backend/plugin/advisor/pg/advisor_statement_maximum_limit_value.go@@ -51,14 +51,6 @@ func (*StatementMaximumLimitValueAdvisor) Check(ctx advisor.Context, _ string) (ast.Walk(checker, stmt)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_statement_merge_alter_table.go b/backend/plugin/advisor/pg/advisor_statement_merge_alter_table.goindex 14aabc0cb5..e8420bf462 100644--- a/backend/plugin/advisor/pg/advisor_statement_merge_alter_table.go+++ b/backend/plugin/advisor/pg/advisor_statement_merge_alter_table.go@@ -72,14 +72,6 @@ func (checker *statementMergeAlterTableChecker) generateAdvice() []*storepb.Advi}}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList}diff --git a/backend/plugin/advisor/pg/advisor_statement_non_transactional.go b/backend/plugin/advisor/pg/advisor_statement_non_transactional.goindex 60a523a782..d1b92f7013 100644--- a/backend/plugin/advisor/pg/advisor_statement_non_transactional.go+++ b/backend/plugin/advisor/pg/advisor_statement_non_transactional.go@@ -51,14 +51,6 @@ func (*NonTransactionalAdvisor) Check(ctx advisor.Context, _ string) ([]*storepb}}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_statement_prior_backup_check.go b/backend/plugin/advisor/pg/advisor_statement_prior_backup_check.goindex c94c7c80d3..0e2ba4164f 100644--- a/backend/plugin/advisor/pg/advisor_statement_prior_backup_check.go+++ b/backend/plugin/advisor/pg/advisor_statement_prior_backup_check.go@@ -27,16 +27,10 @@ type StatementPriorBackupCheckAdvisor struct {// Check checks for disallow mix DDL and DML.func (*StatementPriorBackupCheckAdvisor) Check(ctx advisor.Context, _ string) ([]*storepb.Advice, error) {- var adviceList []*storepb.Adviceif ctx.PreUpdateBackupDetail == nil || ctx.ChangeType != storepb.PlanCheckRunConfig_DML {- adviceList = append(adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- return adviceList, nil+ return nil, nil}+ var adviceList []*storepb.AdvicestmtList, ok := ctx.AST.([]ast.Node)if !ok {return nil, errors.Errorf("failed to convert to Node")@@ -79,15 +73,6 @@ func (*StatementPriorBackupCheckAdvisor) Check(ctx advisor.Context, _ string) ([})}- if len(adviceList) == 0 {- adviceList = append(adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }-return adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_stmt_no_leading_wildcard_like.go b/backend/plugin/advisor/pg/advisor_stmt_no_leading_wildcard_like.goindex 09b582472a..11b98c70fa 100644--- a/backend/plugin/advisor/pg/advisor_stmt_no_leading_wildcard_like.go+++ b/backend/plugin/advisor/pg/advisor_stmt_no_leading_wildcard_like.go@@ -62,14 +62,6 @@ func (*NoLeadingWildcardLikeAdvisor) Check(ctx advisor.Context, _ string) ([]*st}}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_stmt_no_select_all.go b/backend/plugin/advisor/pg/advisor_stmt_no_select_all.goindex ad123c6b2e..d69f76df2d 100644--- a/backend/plugin/advisor/pg/advisor_stmt_no_select_all.go+++ b/backend/plugin/advisor/pg/advisor_stmt_no_select_all.go@@ -45,14 +45,6 @@ func (*NoSelectAllAdvisor) Check(ctx advisor.Context, _ string) ([]*storepb.Adviast.Walk(checker, stmt)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_stmt_where_required.go b/backend/plugin/advisor/pg/advisor_stmt_where_required.goindex d7b0b13a20..6ffc1b1b87 100644--- a/backend/plugin/advisor/pg/advisor_stmt_where_required.go+++ b/backend/plugin/advisor/pg/advisor_stmt_where_required.go@@ -45,14 +45,6 @@ func (*WhereRequirementAdvisor) Check(ctx advisor.Context, _ string) ([]*storepbast.Walk(checker, stmt)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_table_disallow_partition.go b/backend/plugin/advisor/pg/advisor_table_disallow_partition.goindex d1d7b0c52b..2d3fb9a6fb 100644--- a/backend/plugin/advisor/pg/advisor_table_disallow_partition.go+++ b/backend/plugin/advisor/pg/advisor_table_disallow_partition.go@@ -47,14 +47,6 @@ func (*TableDisallowPartitionAdvisor) Check(ctx advisor.Context, _ string) ([]*sast.Walk(checker, stmt)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_table_drop_naming_convention.go b/backend/plugin/advisor/pg/advisor_table_drop_naming_convention.goindex a6bbd617a5..a08ba7f1e4 100644--- a/backend/plugin/advisor/pg/advisor_table_drop_naming_convention.go+++ b/backend/plugin/advisor/pg/advisor_table_drop_naming_convention.go@@ -52,14 +52,6 @@ func (*TableDropNamingConventionAdvisor) Check(ctx advisor.Context, _ string) ([ast.Walk(checker, stmt)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_table_no_fk.go b/backend/plugin/advisor/pg/advisor_table_no_fk.goindex 0a12853949..28eb372c9f 100644--- a/backend/plugin/advisor/pg/advisor_table_no_fk.go+++ b/backend/plugin/advisor/pg/advisor_table_no_fk.go@@ -45,14 +45,6 @@ func (*TableNoFKAdvisor) Check(ctx advisor.Context, _ string) ([]*storepb.Adviceast.Walk(checker, stmt)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/advisor_table_require_pk.go b/backend/plugin/advisor/pg/advisor_table_require_pk.goindex f3366318cd..7d30e1e00e 100644--- a/backend/plugin/advisor/pg/advisor_table_require_pk.go+++ b/backend/plugin/advisor/pg/advisor_table_require_pk.go@@ -47,14 +47,6 @@ func (*TableRequirePKAdvisor) Check(ctx advisor.Context, _ string) ([]*storepb.Aast.Walk(checker, stmt)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/pg/test/column_disallow_change_type.yaml b/backend/plugin/advisor/pg/test/column_disallow_change_type.yamlindex 048a57c2b5..ae9beb9c7f 100644--- a/backend/plugin/advisor/pg/test/column_disallow_change_type.yaml+++ b/backend/plugin/advisor/pg/test/column_disallow_change_type.yaml@@ -1,4 +1,5 @@- statement: ALTER TABLE tech_book ALTER COLUMN id SET DATA TYPE INTEGER+ changeType: 0want:- status: 2code: 403@@ -8,11 +9,6 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book ADD COLUMN c1 int- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/pg/test/column_maximum_character_length.yaml b/backend/plugin/advisor/pg/test/column_maximum_character_length.yamlindex 95cb21a46c..f59fdf9f31 100644--- a/backend/plugin/advisor/pg/test/column_maximum_character_length.yaml+++ b/backend/plugin/advisor/pg/test/column_maximum_character_length.yaml@@ -1,20 +1,9 @@- statement: CREATE TABLE t(name char(20));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(name varchar(225));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(name char(225));+ changeType: 0want:- status: 2code: 415@@ -24,7 +13,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE public.tech_book ADD COLUMN name_2 char(225)+ changeType: 0want:- status: 2code: 415@@ -34,7 +25,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book ALTER COLUMN name SET DATA TYPE char(225)+ changeType: 0want:- status: 2code: 415@@ -44,3 +37,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/column_no_null.yaml b/backend/plugin/advisor/pg/test/column_no_null.yamlindex 92e454bfdb..eaf2bc72d1 100644--- a/backend/plugin/advisor/pg/test/column_no_null.yaml+++ b/backend/plugin/advisor/pg/test/column_no_null.yaml@@ -3,6 +3,7 @@id int,name varchar(255))+ changeType: 0want:- status: 2code: 402@@ -12,6 +13,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 402title: column.no-null@@ -20,7 +22,9 @@startposition:line: 3column: 0+ endposition: null- statement: CREATE TABLE book(id int, name varchar(255), PRIMARY KEY (id))+ changeType: 0want:- status: 2code: 402@@ -30,7 +34,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE book(id int PRIMARY KEY, name varchar(255))+ changeType: 0want:- status: 2code: 402@@ -40,7 +46,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE book(id int NOT NULL, name varchar(255))+ changeType: 0want:- status: 2code: 402@@ -50,15 +58,11 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE book(id int PRIMARY KEY, name varchar(255) NOT NULL)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book ADD COLUMN reader int+ changeType: 0want:- status: 2code: 402@@ -68,26 +72,16 @@startposition:line: 1column: 0+ endposition: null- statement: |-ALTER TABLE tech_book DROP COLUMN id;ALTER TABLE tech_book DROP COLUMN name;ALTER TABLE tech_book ADD COLUMN id int PRIMARY KEY, ADD COLUMN name varchar(255) NOT NULL;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book ALTER COLUMN id SET NOT NULL- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book ALTER COLUMN name DROP NOT NULL+ changeType: 0want:- status: 2code: 402@@ -97,11 +91,6 @@startposition:line: 1column: 0+ endposition: null- statement: /* this is a comment */- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/pg/test/column_require_default.yaml b/backend/plugin/advisor/pg/test/column_require_default.yamlindex bddb48fced..c92485828c 100644--- a/backend/plugin/advisor/pg/test/column_require_default.yaml+++ b/backend/plugin/advisor/pg/test/column_require_default.yaml@@ -1,16 +1,11 @@- statement: CREATE TABLE t(a serial primary key, b int default 1)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a int,b int default 1)+ changeType: 0want:- status: 2code: 420@@ -20,9 +15,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-ALTER TABLE tech_book ADD COLUMN a BLOB;ALTER TABLE tech_book ADD COLUMN b timestamp;+ changeType: 0want:- status: 2code: 420@@ -32,6 +29,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 420title: column.require-default@@ -40,3 +38,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/column_required.yaml b/backend/plugin/advisor/pg/test/column_required.yamlindex da257bc107..5126e9c295 100644--- a/backend/plugin/advisor/pg/test/column_required.yaml+++ b/backend/plugin/advisor/pg/test/column_required.yaml@@ -1,4 +1,5 @@- statement: CREATE TABLE book(id int)+ changeType: 0want:- status: 2code: 401@@ -8,6 +9,7 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE book(id int,@@ -15,16 +17,11 @@created_ts timestamp,updater_id int,updated_ts timestamp)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-ALTER TABLE tech_book ADD COLUMN creator_id int;ALTER TABLE tech_book RENAME COLUMN creator_id TO creator;+ changeType: 0want:- status: 2code: 401@@ -34,9 +31,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-ALTER TABLE tech_book ADD COLUMN creator_id int;ALTER TABLE tech_book DROP COLUMN creator_id;+ changeType: 0want:- status: 2code: 401@@ -46,3 +45,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/column_type_disallow_list.yaml b/backend/plugin/advisor/pg/test/column_type_disallow_list.yamlindex c98a508a80..19e5436496 100644--- a/backend/plugin/advisor/pg/test/column_type_disallow_list.yaml+++ b/backend/plugin/advisor/pg/test/column_type_disallow_list.yaml@@ -1,12 +1,7 @@- statement: CREATE TABLE t(a char(5));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(a int, b JSON);+ changeType: 0want:- status: 2code: 411@@ -16,9 +11,11 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE t(d char(5));ALTER TABLE t add COLUMN a JSON;+ changeType: 0want:- status: 2code: 411@@ -28,3 +25,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/index_create_concurrently.yaml b/backend/plugin/advisor/pg/test/index_create_concurrently.yamlindex 985528bc5b..3425c61974 100644--- a/backend/plugin/advisor/pg/test/index_create_concurrently.yaml+++ b/backend/plugin/advisor/pg/test/index_create_concurrently.yaml@@ -1,4 +1,5 @@- statement: create index on tech_book(id);+ changeType: 0want:- status: 2code: 814@@ -8,11 +9,6 @@startposition:line: 1column: 0+ endposition: null- statement: create index concurrently on tech_book(id);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/pg/test/index_key_number_limit.yaml b/backend/plugin/advisor/pg/test/index_key_number_limit.yamlindex 8f4ca9b911..45aa68b933 100644--- a/backend/plugin/advisor/pg/test/index_key_number_limit.yaml+++ b/backend/plugin/advisor/pg/test/index_key_number_limit.yaml@@ -1,28 +1,11 @@- statement: CREATE TABLE t(name char(20));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(name varchar(225));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(name char(225), PRIMARY KEY (name));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(id int, name char(225), c1 int, c2 int, c3 int, c4 int, CONSTRAINT t_id_name PRIMARY KEY (id, name, c1, c2, c3, c4));+ changeType: 0want:- status: 2code: 802@@ -32,7 +15,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(id int, name char(225), c1 int, c2 int, c3 int, c4 int, CONSTRAINT t_id_name UNIQUE (id, name, c1, c2, c3, c4));+ changeType: 0want:- status: 2code: 802@@ -42,9 +27,11 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE address(id int, phone varchar(225), c1 int, c2 int, c3 int, c4 int);CREATE INDEX idx_address_phone ON address(id, phone, c1, c2, c3, c4);+ changeType: 0want:- status: 2code: 802@@ -54,9 +41,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE address(id int, phone varchar(225), c1 int, c2 int, c3 int, c4 int);CREATE UNIQUE INDEX idx_address_phone ON address(id, phone, c2, c1, c3, c4);+ changeType: 0want:- status: 2code: 802@@ -66,9 +55,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE address(id int, phone varchar(225), c1 int, c2 int, c3 int, c4 int);ALTER TABLE address ADD CONSTRAINT address_id_name UNIQUE (id, phone, c1, c2, c3, c4);+ changeType: 0want:- status: 2code: 802@@ -78,3 +69,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/index_no_duplicate_column.yaml b/backend/plugin/advisor/pg/test/index_no_duplicate_column.yamlindex 88a0179717..9d62992f8e 100644--- a/backend/plugin/advisor/pg/test/index_no_duplicate_column.yaml+++ b/backend/plugin/advisor/pg/test/index_no_duplicate_column.yaml@@ -1,15 +1,10 @@- statement: CREATE TABLE t (a INT, PRIMARY KEY (a));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t (a int,PRIMARY KEY (a, a));+ changeType: 0want:- status: 2code: 812@@ -19,9 +14,11 @@startposition:line: 3column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);CREATE INDEX idx_a on t(a, a);+ changeType: 0want:- status: 2code: 812@@ -31,9 +28,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD CONSTRAINT uk_a UNIQUE (a, a);+ changeType: 0want:- status: 2code: 812@@ -43,9 +42,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD CONSTRAINT pk_a PRIMARY KEY (a, a);+ changeType: 0want:- status: 2code: 812@@ -55,9 +56,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD CONSTRAINT fk_a FOREIGN KEY (a, a) REFERENCES t1(a, b);+ changeType: 0want:- status: 2code: 812@@ -67,3 +70,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/index_primary_key_type_allowlist.yaml b/backend/plugin/advisor/pg/test/index_primary_key_type_allowlist.yamlindex 305e750fd7..74f88a4198 100644--- a/backend/plugin/advisor/pg/test/index_primary_key_type_allowlist.yaml+++ b/backend/plugin/advisor/pg/test/index_primary_key_type_allowlist.yaml@@ -1,23 +1,12 @@- statement: CREATE TABLE t(a SERIAL PRIMARY KEY);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(a BIGSERIAL, PRIMARY KEY(a));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a varchar(20) PRIMARY KEY);+ changeType: 0want:- status: 2code: 803@@ -27,11 +16,13 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a varchar(20),PRIMARY KEY(a));+ changeType: 0want:- status: 2code: 803@@ -41,3 +32,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/index_total_number_limit.yaml b/backend/plugin/advisor/pg/test/index_total_number_limit.yamlindex ff98430ffe..82555c0758 100644--- a/backend/plugin/advisor/pg/test/index_total_number_limit.yaml+++ b/backend/plugin/advisor/pg/test/index_total_number_limit.yaml@@ -1,25 +1,14 @@- statement: CREATE TABLE t(a int, b int, c int, unique (a, b, c))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE INDEX idx_id_name on tech_book(id, name)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE INDEX idx_id_name_1 on tech_book(id, name);CREATE INDEX idx_id_name_2 on tech_book(id, name);CREATE INDEX idx_id_name_3 on tech_book(id, name);CREATE INDEX idx_id_name_4 on tech_book(id, name);CREATE INDEX idx_id_name_5 on tech_book(id, name);+ changeType: 0want:- status: 2code: 813@@ -29,6 +18,7 @@startposition:line: 5column: 0+ endposition: null- statement: |-CREATE TABLE t(a int PRIMARY KEY, b int, c int);CREATE INDEX idx_a_b_1 on t(a, b);@@ -36,6 +26,7 @@CREATE INDEX idx_a_b_3 on t(a, b);CREATE INDEX idx_a_b_4 on t(a, b);CREATE INDEX idx_a_b_5 on t(a, b);+ changeType: 0want:- status: 2code: 813@@ -45,6 +36,7 @@startposition:line: 6column: 0+ endposition: null- statement: |-CREATE TABLE t(a int PRIMARY KEY,@@ -55,6 +47,7 @@CONSTRAINT idx_a_b_3 UNIQUE (a, b),CONSTRAINT idx_a_b_4 UNIQUE (a, b),CONSTRAINT idx_a_b_5 UNIQUE (a, b));+ changeType: 0want:- status: 2code: 813@@ -64,3 +57,4 @@startposition:line: 9column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/naming_column.yaml b/backend/plugin/advisor/pg/test/naming_column.yamlindex d4c3a2e21c..280d67aaf2 100644--- a/backend/plugin/advisor/pg/test/naming_column.yaml+++ b/backend/plugin/advisor/pg/test/naming_column.yaml@@ -1,4 +1,5 @@- statement: CREATE TABLE book(id int, "creatorId" int)+ changeType: 0want:- status: 2code: 302@@ -8,33 +9,17 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE book(id int, qavszgslczmsacubtvyymzhojfytkcmon int)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE book(id int, creator_Id int)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE book(id int, creator_id int)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(id int, creator_id int);ALTER TABLE book ADD COLUMN "creatorId" int+ changeType: 0want:- status: 2code: 302@@ -44,19 +29,15 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE book(id int, creator_id int);ALTER TABLE book ADD COLUMN "creator" int- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(id int, creator_id int);ALTER TABLE book RENAME COLUMN creator_id TO "creatorId"+ changeType: 0want:- status: 2code: 302@@ -66,13 +47,8 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE book(id int, creator_id int);ALTER TABLE book RENAME COLUMN creator_id TO "creator"- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/pg/test/naming_fully_qualified.yaml b/backend/plugin/advisor/pg/test/naming_fully_qualified.yamlindex 457b3b0e88..9a70713280 100644--- a/backend/plugin/advisor/pg/test/naming_fully_qualified.yaml+++ b/backend/plugin/advisor/pg/test/naming_fully_qualified.yaml@@ -3,6 +3,7 @@INSERT INTO public.pokesv1 VALUES (1, '1');CREATE TABLE public.pokes (foo int);CREATE TABLE pokesv2 (foo int, bar varchar);+ changeType: 0want:- status: 2code: 310@@ -12,10 +13,12 @@startposition:line: 4column: 0+ endposition: null- statement: |-CREATE SEQUENCE public.seq;CREATE SEQUENCE seq;DROP SEQUENCE public.seq+ changeType: 0want:- status: 2code: 310@@ -25,12 +28,14 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TRIGGER test_triggerAFTER INSERT ON pokesv1FOR EACH ROWEXECUTE PROCEDURE trigger_function();INSERT INTO bbdev.public.pokesv1 VALUES (1, '1');+ changeType: 0want:- status: 2code: 310@@ -40,17 +45,13 @@startposition:line: 4column: 0+ endposition: null- statement: DROP TRIGGER test_trigger ON public.pokes;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE public.pokesv1 (foo int, bar varchar);ALTER TABLE pokesv1 RENAME TO pokesv2;+ changeType: 0want:- status: 2code: 310@@ -60,10 +61,12 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE public.pokesv1 (foo int);INSERT INTO pokesv1(foo) VALUES (1);INSERT INTO public.pokesv1 VALUES (2);+ changeType: 0want:- status: 2code: 310@@ -73,12 +76,14 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE public.pokesv1 (foo int);UPDATE public.pokesv1 SET foo = 1 WHERE 1=1;UPDATE public.pokesv1 SET foo = 2 WHERE foo=1;UPDATE pokesv1 SET foo = 1 WHERE 1=1;UPDATE public.pokesv1 SET foo = 1 WHERE 1 > 1;+ changeType: 0want:- status: 2code: 310@@ -88,7 +93,9 @@startposition:line: 4column: 0+ endposition: null- statement: "CREATE TABLE public.pokes (foo int); \nSELECT * FROM (SELECT (id) FROM tech_book) AS foo;"+ changeType: 0want:- status: 2code: 310@@ -98,11 +105,6 @@startposition:line: 2column: 0+ endposition: null- statement: "CREATE TABLE public.pokes (foo int);\nWITH foo1 AS (SELECT * FROM public.tech_book) \nSELECT * FROM foo1;"- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/pg/test/naming_index_fk.yaml b/backend/plugin/advisor/pg/test/naming_index_fk.yamlindex befb2d9b69..c88d175ccf 100644--- a/backend/plugin/advisor/pg/test/naming_index_fk.yaml+++ b/backend/plugin/advisor/pg/test/naming_index_fk.yaml@@ -1,12 +1,7 @@- statement: ALTER TABLE tech_book ADD CONSTRAINT fk_tech_book_author_id_author_id FOREIGN KEY (author_id) REFERENCES author (id)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book ADD CONSTRAINT fk_author_id FOREIGN KEY (author_id) REFERENCES author (id)+ changeType: 0want:- status: 2code: 305@@ -16,7 +11,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book ADD CONSTRAINT wlwflloczhmazamdotbibvqrrzyhmvkslvyzpmlmxt FOREIGN KEY (author_id) REFERENCES author (id)+ changeType: 0want:- status: 2code: 305@@ -26,15 +23,11 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book ADD COLUMN author_id INT CONSTRAINT fk_tech_book_author_id_author_id REFERENCES author (id)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book ADD COLUMN author_id INT CONSTRAINT fk_author_id REFERENCES author (id)+ changeType: 0want:- status: 2code: 305@@ -44,15 +37,11 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE book(id INT, author_id INT, CONSTRAINT fk_book_author_id_author_id FOREIGN KEY (author_id) REFERENCES author (id))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE book(id INT, author_id INT, CONSTRAINT fk_book_author_id FOREIGN KEY (author_id) REFERENCES author (id))+ changeType: 0want:- status: 2code: 305@@ -62,20 +51,16 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE book(id INT, author_id INT CONSTRAINT fk_book_author_id_author_id REFERENCES author (id))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |--- this is the first line.CREATE TABLE book(id INT,author_id INT CONSTRAINT fk_book_author_id REFERENCES author (id))+ changeType: 0want:- status: 2code: 305@@ -85,3 +70,4 @@startposition:line: 4column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/naming_index_idx.yaml b/backend/plugin/advisor/pg/test/naming_index_idx.yamlindex 3faa419a44..3fb40381d6 100644--- a/backend/plugin/advisor/pg/test/naming_index_idx.yaml+++ b/backend/plugin/advisor/pg/test/naming_index_idx.yaml@@ -1,12 +1,7 @@- statement: CREATE INDEX idx_tech_book_id_name ON tech_book(id, name)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE INDEX tech_book_id_name ON tech_book(id, name)+ changeType: 0want:- status: 2code: 303@@ -16,7 +11,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE INDEX wfdtqyetsyoovcvikjlyfukxyjxxxhifl ON tech_book(id, name)+ changeType: 0want:- status: 2code: 303@@ -26,15 +23,11 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER INDEX old_index RENAME TO idx_tech_book_id_name- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER INDEX old_index RENAME TO idx_tech_book+ changeType: 0want:- status: 2code: 303@@ -44,3 +37,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/naming_index_pk.yaml b/backend/plugin/advisor/pg/test/naming_index_pk.yamlindex 8adaed08d4..03f733adb8 100644--- a/backend/plugin/advisor/pg/test/naming_index_pk.yaml+++ b/backend/plugin/advisor/pg/test/naming_index_pk.yaml@@ -1,12 +1,7 @@- statement: ALTER TABLE tech_book ADD CONSTRAINT pk_tech_book_id_name PRIMARY KEY (id, name)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book ADD CONSTRAINT tech_book_id_name PRIMARY KEY (id, name)+ changeType: 0want:- status: 2code: 306@@ -16,7 +11,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book ADD CONSTRAINT udmhjtnsaablcmjhqcznfiwtnevcehcvw PRIMARY KEY (id, name)+ changeType: 0want:- status: 2code: 306@@ -26,14 +23,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE book(id INT, name VARCHAR(20), CONSTRAINT pk_book_name PRIMARY KEY (name))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |--- this is the first line.CREATE TABLE book(@@ -41,6 +33,7 @@name VARCHAR(20),CONSTRAINT tech_book_name PRIMARY KEY (name))+ changeType: 0want:- status: 2code: 306@@ -50,31 +43,15 @@startposition:line: 5column: 0+ endposition: null- statement: CREATE TABLE book(id INT, name VARCHAR(20), PRIMARY KEY (name))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE book(id INT, name VARCHAR(20) PRIMARY KEY)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book ADD CONSTRAINT pk_tech_book_id_name PRIMARY KEY USING INDEX old_index- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book ADD CONSTRAINT pk_tech_book PRIMARY KEY USING INDEX old_index+ changeType: 0want:- status: 2code: 306@@ -84,15 +61,11 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book RENAME CONSTRAINT old_pk TO pk_tech_book_id_name- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book RENAME CONSTRAINT old_pk TO pk_tech_book+ changeType: 0want:- status: 2code: 306@@ -102,15 +75,11 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER INDEX old_pk RENAME TO pk_tech_book_id_name- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER INDEX old_pk RENAME TO pk_tech_book+ changeType: 0want:- status: 2code: 306@@ -120,3 +89,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/naming_index_uk.yaml b/backend/plugin/advisor/pg/test/naming_index_uk.yamlindex 692edf7439..3acb2e5a4f 100644--- a/backend/plugin/advisor/pg/test/naming_index_uk.yaml+++ b/backend/plugin/advisor/pg/test/naming_index_uk.yaml@@ -1,12 +1,7 @@- statement: CREATE UNIQUE INDEX uk_tech_book_id_name ON tech_book(id, name)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE UNIQUE INDEX tech_book_id_name ON tech_book(id, name)+ changeType: 0want:- status: 2code: 304@@ -16,7 +11,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE UNIQUE INDEX dzfzqbhnkiiegdhvqjeqoevesfuwcmokrehxlapoqj ON tech_book(id, name)+ changeType: 0want:- status: 2code: 304@@ -26,15 +23,11 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book ADD CONSTRAINT uk_tech_book_id_name UNIQUE (id, name)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book ADD CONSTRAINT tech_book_id_name UNIQUE (id, name)+ changeType: 0want:- status: 2code: 304@@ -44,14 +37,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE book(id INT PRIMARY KEY, name VARCHAR(20), CONSTRAINT uk_book_name UNIQUE (name))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |--- this is the first line.CREATE TABLE book(@@ -59,6 +47,7 @@name VARCHAR(20),CONSTRAINT book_name UNIQUE (name))+ changeType: 0want:- status: 2code: 304@@ -68,31 +57,15 @@startposition:line: 5column: 0+ endposition: null- statement: CREATE TABLE book(id INT PRIMARY KEY, name VARCHAR(20), UNIQUE (name))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE book(id INT PRIMARY KEY, name VARCHAR(20) UNIQUE)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book ADD CONSTRAINT uk_tech_book_id_name UNIQUE USING INDEX old_index- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book ADD CONSTRAINT uk_tech_book UNIQUE USING INDEX old_index+ changeType: 0want:- status: 2code: 304@@ -102,15 +75,11 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book RENAME CONSTRAINT old_uk TO uk_tech_book_id_name- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book RENAME CONSTRAINT old_uk TO uk_tech_book+ changeType: 0want:- status: 2code: 304@@ -120,15 +89,11 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER INDEX old_uk RENAME TO uk_tech_book_id_name- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER INDEX old_uk RENAME TO uk_tech_book+ changeType: 0want:- status: 2code: 304@@ -138,3 +103,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/naming_table.yaml b/backend/plugin/advisor/pg/test/naming_table.yamlindex 679cf26e2a..34a0442f87 100644--- a/backend/plugin/advisor/pg/test/naming_table.yaml+++ b/backend/plugin/advisor/pg/test/naming_table.yaml@@ -1,4 +1,5 @@- statement: CREATE TABLE "techBook"(id int, name varchar(255))+ changeType: 0want:- status: 2code: 301@@ -8,15 +9,11 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE "rlcmidzlevbivwvcntihenpoibtiutqeb"(id int, name varchar(255))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE _techBook(id int, name varchar(255))+ changeType: 0want:- status: 2code: 301@@ -26,23 +23,13 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE techBook(id int, name varchar(255))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE book(id int, name varchar(255))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book RENAME TO "TechBook"+ changeType: 0want:- status: 2code: 301@@ -52,19 +39,15 @@startposition:line: 1column: 0+ endposition: null- statement: |-create table techBook(id int);ALTER TABLE techBook RENAME TO tech_book_tmp;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE _techBook(id int, name varchar(255));ALTER TABLE tech_book RENAME TO "TechBook";+ changeType: 0want:- status: 2code: 301@@ -74,6 +57,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 301title: naming.table@@ -82,3 +66,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/schema_backward_compatibility.yaml b/backend/plugin/advisor/pg/test/schema_backward_compatibility.yamlindex b78dd4e62f..9ed982161b 100644--- a/backend/plugin/advisor/pg/test/schema_backward_compatibility.yaml+++ b/backend/plugin/advisor/pg/test/schema_backward_compatibility.yaml@@ -1,4 +1,5 @@- statement: ALTER TABLE tech_book ALTER COLUMN name TYPE TEXT+ changeType: 0want:- status: 2code: 111@@ -8,3 +9,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/statement_add_check_not_valid.yaml b/backend/plugin/advisor/pg/test/statement_add_check_not_valid.yamlindex c9956aad60..7d48197cd9 100644--- a/backend/plugin/advisor/pg/test/statement_add_check_not_valid.yaml+++ b/backend/plugin/advisor/pg/test/statement_add_check_not_valid.yaml@@ -1,4 +1,5 @@- statement: alter table tech_book add constraint check_id check(id > 0);+ changeType: 0want:- status: 2code: 211@@ -8,11 +9,6 @@startposition:line: 1column: 0+ endposition: null- statement: alter table tech_book add constraint check_id check(id > 0) NOT VALID;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/pg/test/statement_add_foreign_key_not_valid.yaml b/backend/plugin/advisor/pg/test/statement_add_foreign_key_not_valid.yamlindex 2432f7f153..679df42af4 100644--- a/backend/plugin/advisor/pg/test/statement_add_foreign_key_not_valid.yaml+++ b/backend/plugin/advisor/pg/test/statement_add_foreign_key_not_valid.yaml@@ -11,6 +11,7 @@result JSONB NOT NULL DEFAULT '{}');ALTER TABLE task_run ADD CONSTRAINT task_run_task_id_fk_task_id FOREIGN KEY (task_id) REFERENCES task (id);+ changeType: 0want:- status: 2code: 229@@ -20,6 +21,7 @@startposition:line: 12column: 0+ endposition: null- statement: |-CREATE TABLE task (id SERIAL PRIMARY KEY,@@ -33,10 +35,4 @@result JSONB NOT NULL DEFAULT '{}');ALTER TABLE task_run ADD CONSTRAINT task_run_task_id_fk_task_id FOREIGN KEY (task_id) REFERENCES task (id) NOT VALID;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/pg/test/statement_affected_row_limit.yaml b/backend/plugin/advisor/pg/test/statement_affected_row_limit.yamlindex 4c53b25ff2..45ecb65167 100644--- a/backend/plugin/advisor/pg/test/statement_affected_row_limit.yaml+++ b/backend/plugin/advisor/pg/test/statement_affected_row_limit.yaml@@ -1,16 +1,4 @@- statement: DELETE FROM tech_book WHERE a > 1- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: UPDATE tech_book SET id = 1- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/pg/test/statement_check_set_role_variable.yaml b/backend/plugin/advisor/pg/test/statement_check_set_role_variable.yamlindex 161eaf8c1d..8e891ffdca 100644--- a/backend/plugin/advisor/pg/test/statement_check_set_role_variable.yaml+++ b/backend/plugin/advisor/pg/test/statement_check_set_role_variable.yaml@@ -1,11 +1,5 @@- statement: SET SESSION ROLE joe; SELECT * FROM t- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: INSERT INTO t (id) VALUES (1);changeType: 2want:@@ -17,3 +11,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/statement_create_specify_schema.yaml b/backend/plugin/advisor/pg/test/statement_create_specify_schema.yamlindex 6f3e340aab..519d2be11e 100644--- a/backend/plugin/advisor/pg/test/statement_create_specify_schema.yaml+++ b/backend/plugin/advisor/pg/test/statement_create_specify_schema.yaml@@ -1,4 +1,5 @@- statement: CREATE TABLE t(id int);+ changeType: 0want:- status: 2code: 216@@ -8,11 +9,6 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE public.t(id int);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/pg/test/statement_disallow_add_column_with_default.yaml b/backend/plugin/advisor/pg/test/statement_disallow_add_column_with_default.yamlindex d4c8b5a070..2ca213dfef 100644--- a/backend/plugin/advisor/pg/test/statement_disallow_add_column_with_default.yaml+++ b/backend/plugin/advisor/pg/test/statement_disallow_add_column_with_default.yaml@@ -1,12 +1,7 @@- statement: ALTER TABLE tech_book ADD COLUMN c int;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book ADD COLUMN c int DEFAULT 0;+ changeType: 0want:- status: 2code: 210@@ -16,3 +11,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/statement_disallow_add_not_null.yaml b/backend/plugin/advisor/pg/test/statement_disallow_add_not_null.yamlindex 747259a2dc..148894615b 100644--- a/backend/plugin/advisor/pg/test/statement_disallow_add_not_null.yaml+++ b/backend/plugin/advisor/pg/test/statement_disallow_add_not_null.yaml@@ -1,4 +1,5 @@- statement: alter table tech_book alter column name set not null;+ changeType: 0want:- status: 2code: 212@@ -8,13 +9,8 @@startposition:line: 1column: 0+ endposition: null- statement: |-alter table tech_book add constraint check_name_not_null check(name IS NOT NULL) NOT VALID;alter table tech_book validate constraint check_name_not_null;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/pg/test/statement_disallow_commit.yaml b/backend/plugin/advisor/pg/test/statement_disallow_commit.yamlindex 00970f21b7..806ff53e06 100644--- a/backend/plugin/advisor/pg/test/statement_disallow_commit.yaml+++ b/backend/plugin/advisor/pg/test/statement_disallow_commit.yaml@@ -2,6 +2,7 @@START TRANSACTION;CREATE TABLE techBook(id int, name varchar(255));COMMIT;+ changeType: 0want:- status: 2code: 206@@ -11,6 +12,7 @@startposition:line: 3column: 0+ endposition: null- statement: |-START TRANSACTION;CREATE TABLE techBook(id int, name varchar(255));@@ -19,6 +21,7 @@START TRANSACTION;INSERT INTO techBook(id, name) VALUES(1, "book");COMMIT;+ changeType: 0want:- status: 2code: 206@@ -28,6 +31,7 @@startposition:line: 3column: 0+ endposition: null- status: 2code: 206title: statement.disallow-commit@@ -36,3 +40,4 @@startposition:line: 7column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/statement_disallow_on_del_cascade.yaml b/backend/plugin/advisor/pg/test/statement_disallow_on_del_cascade.yamlindex b6d22a3d5e..cd6fc488a7 100644--- a/backend/plugin/advisor/pg/test/statement_disallow_on_del_cascade.yaml+++ b/backend/plugin/advisor/pg/test/statement_disallow_on_del_cascade.yaml@@ -1,17 +1,12 @@- statement: TRUNCATE TABLE issues CASCADE;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE users (tenant_id integer REFERENCES tenants ON DELETE CASCADE,user_id integer NOT NULL,PRIMARY KEY (tenant_id, user_id));+ changeType: 0want:- status: 2code: 213@@ -21,6 +16,7 @@startposition:line: 1column: 1+ endposition: null- statement: |-CREATE TABLE users (tenant_id integer,@@ -28,13 +24,7 @@PRIMARY KEY (tenant_id, user_id));COMMENT ON TABLE users IS 'CASCADE COMMENT';- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-TRUNCATE TABLE tech_book CASCADE;DROP TABLE tech_book CASCADE;@@ -43,6 +33,7 @@user_id integer NOT NULL,PRIMARY KEY (tenant_id, user_id));+ changeType: 0want:- status: 2code: 213@@ -52,3 +43,4 @@startposition:line: 3column: 1+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/statement_disallow_rm_tbl_cascade.yaml b/backend/plugin/advisor/pg/test/statement_disallow_rm_tbl_cascade.yamlindex 29cf40d44a..cd02431e62 100644--- a/backend/plugin/advisor/pg/test/statement_disallow_rm_tbl_cascade.yaml+++ b/backend/plugin/advisor/pg/test/statement_disallow_rm_tbl_cascade.yaml@@ -1,4 +1,5 @@- statement: TRUNCATE TABLE issues CASCADE;+ changeType: 0want:- status: 2code: 213@@ -8,19 +9,14 @@startposition:line: 1column: 1+ endposition: null- statement: |-CREATE TABLE users (tenant_id integer REFERENCES tenants ON DELETE CASCADE,user_id integer NOT NULL,PRIMARY KEY (tenant_id, user_id));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE users (tenant_id integer,@@ -28,13 +24,7 @@PRIMARY KEY (tenant_id, user_id));COMMENT ON TABLE users IS 'CASCADE COMMENT';- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-TRUNCATE TABLE tech_book CASCADE;DROP TABLE tech_book CASCADE;@@ -43,6 +33,7 @@user_id integer NOT NULL,PRIMARY KEY (tenant_id, user_id));+ changeType: 0want:- status: 2code: 213@@ -52,6 +43,7 @@startposition:line: 1column: 1+ endposition: null- status: 2code: 213title: statement.disallow-rm-tbl-cascade@@ -60,3 +52,4 @@startposition:line: 2column: 1+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/statement_dml_dry_run.yaml b/backend/plugin/advisor/pg/test/statement_dml_dry_run.yamlindex b00f58a6f4..68885e98ba 100644--- a/backend/plugin/advisor/pg/test/statement_dml_dry_run.yaml+++ b/backend/plugin/advisor/pg/test/statement_dml_dry_run.yaml@@ -1,16 +1,4 @@- statement: INSERT INTO tech_book values(1, 'a')- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: DELETE FROM tech_book- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/pg/test/statement_insert_disallow_order_by_rand.yaml b/backend/plugin/advisor/pg/test/statement_insert_disallow_order_by_rand.yamlindex 574275ec5f..94697b3e9f 100644--- a/backend/plugin/advisor/pg/test/statement_insert_disallow_order_by_rand.yaml+++ b/backend/plugin/advisor/pg/test/statement_insert_disallow_order_by_rand.yaml@@ -1,12 +1,7 @@- statement: INSERT INTO tech_book VALUES(1, "a")- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: INSERT INTO tech_book SELECT * FROM tech_book ORDER BY random()+ changeType: 0want:- status: 2code: 1108@@ -16,3 +11,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/statement_insert_must_specify_column.yaml b/backend/plugin/advisor/pg/test/statement_insert_must_specify_column.yamlindex f6ad536e44..72316511c2 100644--- a/backend/plugin/advisor/pg/test/statement_insert_must_specify_column.yaml+++ b/backend/plugin/advisor/pg/test/statement_insert_must_specify_column.yaml@@ -1,12 +1,7 @@- statement: INSERT INTO tech_book(id, name) VALUES (1, '1')- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: INSERT INTO tech_book VALUES (1, '1')+ changeType: 0want:- status: 2code: 1107@@ -16,3 +11,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/statement_insert_row_limit.yaml b/backend/plugin/advisor/pg/test/statement_insert_row_limit.yamlindex 9c4b4219a2..fcc8a932f4 100644--- a/backend/plugin/advisor/pg/test/statement_insert_row_limit.yaml+++ b/backend/plugin/advisor/pg/test/statement_insert_row_limit.yaml@@ -1,12 +1,7 @@- statement: INSERT INTO tech_book values(1, 'a')- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: INSERT INTO tech_book values(1, 'a'), (2, 'b'), (3, 'c'), (4, 'd'), (5, 'e'), (6, 'f')+ changeType: 0want:- status: 2code: 1101@@ -16,11 +11,6 @@startposition:line: 1column: 0+ endposition: null- statement: INSERT INTO tech_book SELECT * FROM tech_book;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/pg/test/statement_maximum_limit_value.yaml b/backend/plugin/advisor/pg/test/statement_maximum_limit_value.yamlindex 92506c1406..341261a746 100644--- a/backend/plugin/advisor/pg/test/statement_maximum_limit_value.yaml+++ b/backend/plugin/advisor/pg/test/statement_maximum_limit_value.yaml@@ -1,5 +1,6 @@- statement: |SELECT * FROM employee LIMIT 1000000;+ changeType: 0want:- status: 2code: 222@@ -9,3 +10,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/statement_merge_alter_table.yaml b/backend/plugin/advisor/pg/test/statement_merge_alter_table.yamlindex ef2292d7b2..a4ad01647b 100644--- a/backend/plugin/advisor/pg/test/statement_merge_alter_table.yaml+++ b/backend/plugin/advisor/pg/test/statement_merge_alter_table.yaml@@ -1,15 +1,10 @@- statement: ALTER TABLE tech_book ADD COLUMN a int- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a int);ALTER TABLE tech_book ADD COLUMN a int;ALTER TABLE t ADD COLUMN b int;+ changeType: 0want:- status: 2code: 207@@ -19,3 +14,4 @@startposition:line: 3column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/statement_non_transactional.yaml b/backend/plugin/advisor/pg/test/statement_non_transactional.yamlindex 591be9373a..50169065ec 100644--- a/backend/plugin/advisor/pg/test/statement_non_transactional.yaml+++ b/backend/plugin/advisor/pg/test/statement_non_transactional.yaml@@ -1,12 +1,7 @@- statement: CREATE INDEX idx_tech_book_id_name ON tech_book(id, name)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE INDEX CONCURRENTLY tech_book_id_name ON tech_book(id, name)+ changeType: 0want:- status: 2code: 230@@ -16,7 +11,9 @@startposition:line: 1column: 0+ endposition: null- statement: VACUUM FULL tech_book+ changeType: 0want:- status: 2code: 230@@ -26,3 +23,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/statement_select_no_select_all.yaml b/backend/plugin/advisor/pg/test/statement_select_no_select_all.yamlindex 8105f035ce..34d8f8e812 100644--- a/backend/plugin/advisor/pg/test/statement_select_no_select_all.yaml+++ b/backend/plugin/advisor/pg/test/statement_select_no_select_all.yaml@@ -1,4 +1,5 @@- statement: SELECT * FROM t+ changeType: 0want:- status: 2code: 203@@ -8,15 +9,11 @@startposition:line: 1column: 0+ endposition: null- statement: SELECT a, b FROM t- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: SELECT a, b FROM (SELECT * from t1, t2) t+ changeType: 0want:- status: 2code: 203@@ -26,7 +23,9 @@startposition:line: 1column: 0+ endposition: null- statement: INSERT INTO t SELECT * FROM t1+ changeType: 0want:- status: 2code: 203@@ -36,3 +35,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/statement_where_no_leading_wildcard_like.yaml b/backend/plugin/advisor/pg/test/statement_where_no_leading_wildcard_like.yamlindex cff6f75cc1..223de58bff 100644--- a/backend/plugin/advisor/pg/test/statement_where_no_leading_wildcard_like.yaml+++ b/backend/plugin/advisor/pg/test/statement_where_no_leading_wildcard_like.yaml@@ -1,12 +1,7 @@- statement: SELECT * FROM t WHERE a LIKE 'abc%'- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: SELECT * FROM t WHERE a LIKE '%abc'+ changeType: 0want:- status: 2code: 204@@ -16,7 +11,9 @@startposition:line: 1column: 0+ endposition: null- statement: SELECT * FROM t WHERE a LIKE 'abc' OR a LIKE '%abc'+ changeType: 0want:- status: 2code: 204@@ -26,7 +23,9 @@startposition:line: 1column: 0+ endposition: null- statement: SELECT * FROM t WHERE a LIKE '%acc' OR a LIKE '%abc'+ changeType: 0want:- status: 2code: 204@@ -36,7 +35,9 @@startposition:line: 1column: 0+ endposition: null- statement: SELECT * FROM (SELECT * FROM t WHERE a LIKE '%acc' OR a LIKE '%abc') t1+ changeType: 0want:- status: 2code: 204@@ -46,3 +47,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/statement_where_require.yaml b/backend/plugin/advisor/pg/test/statement_where_require.yamlindex 35a263dc3c..7dd6f493a2 100644--- a/backend/plugin/advisor/pg/test/statement_where_require.yaml+++ b/backend/plugin/advisor/pg/test/statement_where_require.yaml@@ -1,12 +1,7 @@- statement: INSERT INTO t VALUES(1)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: DELETE FROM t1+ changeType: 0want:- status: 2code: 202@@ -16,7 +11,9 @@startposition:line: 1column: 0+ endposition: null- statement: UPDATE t1 SET a = 1+ changeType: 0want:- status: 2code: 202@@ -26,23 +23,13 @@startposition:line: 1column: 0+ endposition: null- statement: DELETE FROM t1 WHERE a > 0- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: UPDATE t1 SET a = 1 WHERE a > 10- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: SELECT a FROM t+ changeType: 0want:- status: 2code: 202@@ -52,15 +39,11 @@startposition:line: 1column: 0+ endposition: null- statement: SELECT a FROM t WHERE a > 0- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: SELECT a FROM t WHERE a > (SELECT max(id) FROM user)+ changeType: 0want:- status: 2code: 202@@ -70,11 +53,6 @@startposition:line: 1column: 0+ endposition: null- statement: SELECT 1- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/pg/test/system_charset_allowlist.yaml b/backend/plugin/advisor/pg/test/system_charset_allowlist.yamlindex 8d47c4b4be..38989ce842 100644--- a/backend/plugin/advisor/pg/test/system_charset_allowlist.yaml+++ b/backend/plugin/advisor/pg/test/system_charset_allowlist.yaml@@ -1,20 +1,9 @@- statement: CREATE DATABASE test WITH ENCODING 'UTF8'- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE DATABASE test- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE DATABASE test WITH ENCODING 'LATIN1'+ changeType: 0want:- status: 2code: 1001@@ -24,11 +13,6 @@startposition:line: 0column: 0+ endposition: null- statement: /* this is a comment */- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/pg/test/system_collation_allowlist.yaml b/backend/plugin/advisor/pg/test/system_collation_allowlist.yamlindex 30e23aaac9..f3aefb3e94 100644--- a/backend/plugin/advisor/pg/test/system_collation_allowlist.yaml+++ b/backend/plugin/advisor/pg/test/system_collation_allowlist.yaml@@ -1,12 +1,7 @@- statement: CREATE TABLE t(a text COLLATE utf8mb4_0900_ai_ci)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(a text COLLATE "unknown")+ changeType: 0want:- status: 2code: 1201@@ -16,7 +11,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book ADD COLUMN c1 text COLLATE "unknown"+ changeType: 0want:- status: 2code: 1201@@ -26,7 +23,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book ALTER COLUMN id TYPE text COLLATE "unknown"+ changeType: 0want:- status: 2code: 1201@@ -36,3 +35,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/system_comment_length.yaml b/backend/plugin/advisor/pg/test/system_comment_length.yamlindex aaa838a6c6..5e74b88d18 100644--- a/backend/plugin/advisor/pg/test/system_comment_length.yaml+++ b/backend/plugin/advisor/pg/test/system_comment_length.yaml@@ -1,12 +1,7 @@- statement: comment on column public.name is 'is a column name'- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: comment on column public.name is 'is a to long column name'+ changeType: 0want:- status: 2code: 1301@@ -16,15 +11,11 @@startposition:line: 1column: 0+ endposition: null- statement: comment on table public is 'is a table name'- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: comment on table public is 'is a to long table name long long long long long long long'+ changeType: 0want:- status: 2code: 1301@@ -34,3 +25,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/table_disallow_partition.yaml b/backend/plugin/advisor/pg/test/table_disallow_partition.yamlindex a22127598a..0465be2695 100644--- a/backend/plugin/advisor/pg/test/table_disallow_partition.yaml+++ b/backend/plugin/advisor/pg/test/table_disallow_partition.yaml@@ -1,12 +1,7 @@- statement: CREATE TABLE t(a int)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(a int) PARTITION BY RANGE (a);+ changeType: 0want:- status: 2code: 608@@ -16,7 +11,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book ATTACH PARTITION p1 DEFAULT;+ changeType: 0want:- status: 2code: 608@@ -26,3 +23,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/table_drop_naming_convention.yaml b/backend/plugin/advisor/pg/test/table_drop_naming_convention.yamlindex 3e918f85ef..80e1fdc6e5 100644--- a/backend/plugin/advisor/pg/test/table_drop_naming_convention.yaml+++ b/backend/plugin/advisor/pg/test/table_drop_naming_convention.yaml@@ -1,12 +1,7 @@- statement: DROP TABLE IF EXISTS foo_delete- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: DROP TABLE IF EXISTS foo+ changeType: 0want:- status: 2code: 603@@ -16,7 +11,9 @@startposition:line: 1column: 0+ endposition: null- statement: DROP TABLE IF EXISTS foo_delete, bar+ changeType: 0want:- status: 2code: 603@@ -26,3 +23,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/table_no_foreign_key.yaml b/backend/plugin/advisor/pg/test/table_no_foreign_key.yamlindex dc5eefb4b7..a3c70f19ee 100644--- a/backend/plugin/advisor/pg/test/table_no_foreign_key.yaml+++ b/backend/plugin/advisor/pg/test/table_no_foreign_key.yaml@@ -1,4 +1,5 @@- statement: ALTER TABLE tech_book ADD CONSTRAINT fk_tech_book_author_id_author_id FOREIGN KEY (author_id) REFERENCES author (id)+ changeType: 0want:- status: 2code: 602@@ -8,7 +9,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE book(id INT, author_id INT, CONSTRAINT fk_book_author_id_author_id FOREIGN KEY (author_id) REFERENCES author (id))+ changeType: 0want:- status: 2code: 602@@ -18,3 +21,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/pg/test/table_require_pk.yaml b/backend/plugin/advisor/pg/test/table_require_pk.yamlindex a1c7f53490..d8cdbee491 100644--- a/backend/plugin/advisor/pg/test/table_require_pk.yaml+++ b/backend/plugin/advisor/pg/test/table_require_pk.yaml@@ -1,20 +1,9 @@- statement: CREATE TABLE t(id INT PRIMARY KEY)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(id INT, PRIMARY KEY (id))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(id INT)+ changeType: 0want:- status: 2code: 601@@ -24,7 +13,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE "tech_book" DROP CONSTRAINT "old_pk"+ changeType: 0want:- status: 2code: 601@@ -34,23 +25,13 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE "tech_book" DROP CONSTRAINT "old_index"- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE "tech_book" DROP CONSTRAINT constraint_not_in_catalog- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE "tech_book" DROP COLUMN id+ changeType: 0want:- status: 2code: 601@@ -60,13 +41,8 @@startposition:line: 1column: 0+ endposition: null- statement: |-ALTER TABLE tech_book ADD COLUMN column_not_in_pk int;ALTER TABLE "tech_book" DROP COLUMN column_not_in_pk;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/snowflake/advisor_column_maximum_varchar_length.go b/backend/plugin/advisor/snowflake/advisor_column_maximum_varchar_length.goindex 3b7467a6f5..c18b8d1476 100644--- a/backend/plugin/advisor/snowflake/advisor_column_maximum_varchar_length.go+++ b/backend/plugin/advisor/snowflake/advisor_column_maximum_varchar_length.go@@ -73,14 +73,6 @@ type columnMaximumVarcharLengthChecker struct {// generateAdvice returns the advices generated by the listener, the advices must not be empty.func (l *columnMaximumVarcharLengthChecker) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/snowflake/advisor_column_no_null.go b/backend/plugin/advisor/snowflake/advisor_column_no_null.goindex 97268ac286..3a98bef45f 100644--- a/backend/plugin/advisor/snowflake/advisor_column_no_null.go+++ b/backend/plugin/advisor/snowflake/advisor_column_no_null.go@@ -67,14 +67,6 @@ type columnNoNullChecker struct {// generateAdvice returns the advices generated by the listener, the advices must not be empty.func (l *columnNoNullChecker) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/snowflake/advisor_column_require.go b/backend/plugin/advisor/snowflake/advisor_column_require.goindex cb38d6351e..9012e08b35 100644--- a/backend/plugin/advisor/snowflake/advisor_column_require.go+++ b/backend/plugin/advisor/snowflake/advisor_column_require.go@@ -79,14 +79,6 @@ type columnRequireChecker struct {// generateAdvice returns the advices generated by the listener, the advices must not be empty.func (l *columnRequireChecker) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/snowflake/advisor_migration_compatibility.go b/backend/plugin/advisor/snowflake/advisor_migration_compatibility.goindex a836cc4b31..1139fcfbce 100644--- a/backend/plugin/advisor/snowflake/advisor_migration_compatibility.go+++ b/backend/plugin/advisor/snowflake/advisor_migration_compatibility.go@@ -74,14 +74,6 @@ type migrationCompatibilityChecker struct {// generateAdvice returns the advices generated by the listener, the advices must not be empty.func (l *migrationCompatibilityChecker) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/snowflake/advisor_naming_identifier_case.go b/backend/plugin/advisor/snowflake/advisor_naming_identifier_case.goindex d3bc3f226a..aeb23eb068 100644--- a/backend/plugin/advisor/snowflake/advisor_naming_identifier_case.go+++ b/backend/plugin/advisor/snowflake/advisor_naming_identifier_case.go@@ -64,14 +64,6 @@ type namingIdentifierCaseChecker struct {// generateAdvice returns the advices generated by the listener, the advices must not be empty.func (l *namingIdentifierCaseChecker) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/snowflake/advisor_naming_identifier_no_keyword.go b/backend/plugin/advisor/snowflake/advisor_naming_identifier_no_keyword.goindex ee62982bfa..388fb1cf7f 100644--- a/backend/plugin/advisor/snowflake/advisor_naming_identifier_no_keyword.go+++ b/backend/plugin/advisor/snowflake/advisor_naming_identifier_no_keyword.go@@ -62,14 +62,6 @@ type namingIdentifierNoKeywordChecker struct {// generateAdvice returns the advices generated by the listener, the advices must not be empty.func (l *namingIdentifierNoKeywordChecker) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/snowflake/advisor_naming_table.go b/backend/plugin/advisor/snowflake/advisor_naming_table.goindex e69752b101..a8a52d60b0 100644--- a/backend/plugin/advisor/snowflake/advisor_naming_table.go+++ b/backend/plugin/advisor/snowflake/advisor_naming_table.go@@ -68,14 +68,6 @@ type namingTableListener struct {// generateAdvice returns the advices generated by the listener, the advices must not be empty.func (l *namingTableListener) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/snowflake/advisor_naming_table_no_keyword.go b/backend/plugin/advisor/snowflake/advisor_naming_table_no_keyword.goindex 9053a8e65f..7e569f3e72 100644--- a/backend/plugin/advisor/snowflake/advisor_naming_table_no_keyword.go+++ b/backend/plugin/advisor/snowflake/advisor_naming_table_no_keyword.go@@ -59,14 +59,6 @@ type namingTableNoKeywordChecker struct {// generateAdvice returns the advices generated by the listener, the advices must not be empty.func (l *namingTableNoKeywordChecker) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/snowflake/advisor_select_no_select_all.go b/backend/plugin/advisor/snowflake/advisor_select_no_select_all.goindex 8e9e55125e..321018beef 100644--- a/backend/plugin/advisor/snowflake/advisor_select_no_select_all.go+++ b/backend/plugin/advisor/snowflake/advisor_select_no_select_all.go@@ -56,14 +56,6 @@ type selectNoSelectAllChecker struct {// generateAdvice returns the advices generated by the listener, the advices must not be empty.func (l *selectNoSelectAllChecker) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/snowflake/advisor_table_drop_naming_convention.go b/backend/plugin/advisor/snowflake/advisor_table_drop_naming_convention.goindex 7202f1d156..379e7c5f66 100644--- a/backend/plugin/advisor/snowflake/advisor_table_drop_naming_convention.go+++ b/backend/plugin/advisor/snowflake/advisor_table_drop_naming_convention.go@@ -67,14 +67,6 @@ type tableDropNamingConventionChecker struct {// generateAdvice returns the advices generated by the listener, the advices must not be empty.func (l *tableDropNamingConventionChecker) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/snowflake/advisor_table_no_foreign_key.go b/backend/plugin/advisor/snowflake/advisor_table_no_foreign_key.goindex 6ce65c0483..e188151dc2 100644--- a/backend/plugin/advisor/snowflake/advisor_table_no_foreign_key.go+++ b/backend/plugin/advisor/snowflake/advisor_table_no_foreign_key.go@@ -92,16 +92,7 @@ func (l *tableNoForeignKeyChecker) generateAdvice() ([]*storepb.Advice, error) {})}}- if len(l.adviceList) == 0 {- return []*storepb.Advice{- {- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- },- }, nil- }+return l.adviceList, nil}diff --git a/backend/plugin/advisor/snowflake/advisor_table_require_pk.go b/backend/plugin/advisor/snowflake/advisor_table_require_pk.goindex c934d6420b..6de93bc9e9 100644--- a/backend/plugin/advisor/snowflake/advisor_table_require_pk.go+++ b/backend/plugin/advisor/snowflake/advisor_table_require_pk.go@@ -92,16 +92,7 @@ func (l *tableRequirePkChecker) generateAdvice() ([]*storepb.Advice, error) {})}}- if len(l.adviceList) == 0 {- return []*storepb.Advice{- {- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- },- }, nil- }+return l.adviceList, nil}diff --git a/backend/plugin/advisor/snowflake/advisor_where_require.go b/backend/plugin/advisor/snowflake/advisor_where_require.goindex 1f3d58dab5..6021a5e14a 100644--- a/backend/plugin/advisor/snowflake/advisor_where_require.go+++ b/backend/plugin/advisor/snowflake/advisor_where_require.go@@ -56,14 +56,6 @@ type whereRequireChecker struct {// generateAdvice returns the advices generated by the listener, the advices must not be empty.func (l *whereRequireChecker) generateAdvice() ([]*storepb.Advice, error) {- if len(l.adviceList) == 0 {- l.adviceList = append(l.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return l.adviceList, nil}diff --git a/backend/plugin/advisor/snowflake/test/column_maximum_varchar_length.yaml b/backend/plugin/advisor/snowflake/test/column_maximum_varchar_length.yamlindex 877c827f4e..ecd1f8a45d 100644--- a/backend/plugin/advisor/snowflake/test/column_maximum_varchar_length.yaml+++ b/backend/plugin/advisor/snowflake/test/column_maximum_varchar_length.yaml@@ -1,12 +1,7 @@- statement: CREATE TABLE CUSTOMER(NAME VARCHAR(20));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE CUSTOMER(NAME VARCHAR(3000));+ changeType: 0want:- status: 2code: 422@@ -16,7 +11,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE CUSTOMER(NAME VARCHAR);+ changeType: 0want:- status: 2code: 422@@ -26,7 +23,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE PUBLIC.CUSTOMER ADD NAME_2 VARCHAR(22225);+ changeType: 0want:- status: 2code: 422@@ -36,7 +35,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE PUBLIC.CUSTOMER MODIFY COLUMN NAME VARCHAR(22225);+ changeType: 0want:- status: 2code: 422@@ -46,15 +47,11 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE PUBLIC.CUSTOMER MODIFY COLUMN NAME VARCHAR(20);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE PUBLIC.CUSTOMER MODIFY COLUMN NAME SET DATA TYPE VARCHAR(22225);+ changeType: 0want:- status: 2code: 422@@ -64,3 +61,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/snowflake/test/column_no_null.yaml b/backend/plugin/advisor/snowflake/test/column_no_null.yamlindex 8ae82986c8..42b27a73f0 100644--- a/backend/plugin/advisor/snowflake/test/column_no_null.yaml+++ b/backend/plugin/advisor/snowflake/test/column_no_null.yaml@@ -5,6 +5,7 @@age INT,address VARCHAR);+ changeType: 0want:- status: 2code: 402@@ -14,6 +15,7 @@startposition:line: 4column: 0+ endposition: null- status: 2code: 402title: column.no-null@@ -22,6 +24,7 @@startposition:line: 5column: 0+ endposition: null- statement: |-CREATE TABLE t (id INT,@@ -30,6 +33,7 @@address VARCHAR,PRIMARY KEY (id, age))+ changeType: 0want:- status: 2code: 402@@ -39,6 +43,7 @@startposition:line: 5column: 0+ endposition: null- statement: |-CREATE TABLE t (id INT NOT NULL,@@ -46,14 +51,9 @@age INT NOT NULL,address VARCHAR NOT NULL);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE a ADD COLUMN age INT;+ changeType: 0want:- status: 2code: 402@@ -63,15 +63,11 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE a ADD COLUMN age INT NOT NULL;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE a ALTER COLUMN age DROP NOT NULL;+ changeType: 0want:- status: 2code: 402@@ -81,3 +77,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/snowflake/test/column_required.yaml b/backend/plugin/advisor/snowflake/test/column_required.yamlindex c98e2f0ce2..573d4f7e8b 100644--- a/backend/plugin/advisor/snowflake/test/column_required.yaml+++ b/backend/plugin/advisor/snowflake/test/column_required.yaml@@ -6,18 +6,13 @@"updated_ts" INT,"updater_id" INT);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t ("name" TEXT,"age" INT);+ changeType: 0want:- status: 2code: 401@@ -27,6 +22,7 @@startposition:line: 3column: 0+ endposition: null- status: 2code: 401title: column.required@@ -35,6 +31,7 @@startposition:line: 3column: 0+ endposition: null- status: 2code: 401title: column.required@@ -43,6 +40,7 @@startposition:line: 3column: 0+ endposition: null- status: 2code: 401title: column.required@@ -51,6 +49,7 @@startposition:line: 3column: 0+ endposition: null- status: 2code: 401title: column.required@@ -59,6 +58,7 @@startposition:line: 3column: 0+ endposition: null- statement: |-CREATE TABLE t ("id" INT,@@ -66,6 +66,7 @@"created_ts" INT,"updater_id" INT);+ changeType: 0want:- status: 2code: 401@@ -75,7 +76,9 @@startposition:line: 5column: 0+ endposition: null- statement: ALTER TABLE t DROP COLUMN "created_ts";+ changeType: 0want:- status: 2code: 401@@ -85,19 +88,8 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE t DROP COLUMN creator_id;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE TARGET_TABLE ALTER COLUMN description DROP DEFAULT, COLUMN description DROP NOT NULL;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/snowflake/test/naming_identifier_case.yaml b/backend/plugin/advisor/snowflake/test/naming_identifier_case.yamlindex 8f761a0eec..5c088e544e 100644--- a/backend/plugin/advisor/snowflake/test/naming_identifier_case.yaml+++ b/backend/plugin/advisor/snowflake/test/naming_identifier_case.yaml@@ -1,27 +1,16 @@- statement: |--- The rule should be friendly with engine behavior(i.e. stored and resolved as uppercase characters if not quoted)CREATE TABLE t(id INT);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(ID INT);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(name VARCHAR,age INT,"address" VARCHAR);+ changeType: 0want:- status: 2code: 309@@ -31,12 +20,14 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE mytable_copy (name INT,age INT,"address" VARCHAR) AS SELECT a + 1, b + 2 FROM mytable;+ changeType: 0want:- status: 2code: 309@@ -46,20 +37,16 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE mytable_copy (name INT,age INT,address VARCHAR) AS SELECT a + 1, b + 2 FROM mytable;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE mytable RENAME COLUMN name TO "address";+ changeType: 0want:- status: 2code: 309@@ -69,11 +56,6 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE mytable RENAME COLUMN name TO address;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/snowflake/test/naming_identifier_no_keyword.yaml b/backend/plugin/advisor/snowflake/test/naming_identifier_no_keyword.yamlindex fa68c6a00b..d9d0cd14cd 100644--- a/backend/plugin/advisor/snowflake/test/naming_identifier_no_keyword.yaml+++ b/backend/plugin/advisor/snowflake/test/naming_identifier_no_keyword.yaml@@ -3,6 +3,7 @@name VARCHAR,"CONNECT" VARCHAR);+ changeType: 0want:- status: 2code: 308@@ -12,11 +13,13 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(name VARCHAR,"connect" VARCHAR);+ changeType: 0want:- status: 2code: 308@@ -26,23 +29,19 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(name VARCHAR,age INT);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE mytable_copy (name INT,"connect" INT) AS SELECT a + 1, b + 2 FROM mytable;+ changeType: 0want:- status: 2code: 308@@ -52,19 +51,15 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE mytable_copy (name INT,age INT) AS SELECT a + 1, b + 2 FROM mytable;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE mytable RENAME COLUMN name TO "connect";+ changeType: 0want:- status: 2code: 308@@ -74,11 +69,6 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE mytable RENAME COLUMN name TO age;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/snowflake/test/naming_table.yaml b/backend/plugin/advisor/snowflake/test/naming_table.yamlindex 53792de611..319e7409fd 100644--- a/backend/plugin/advisor/snowflake/test/naming_table.yaml+++ b/backend/plugin/advisor/snowflake/test/naming_table.yaml@@ -1,20 +1,9 @@- statement: CREATE TABLE UPPER_CASE_TABLE_NAME_WITHOUT_DOUBLE_QUOTES(ID INT);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE "UPPER_CASE_TABLE_NAME_WITH_DOUBLE_QUOTES"(ID INT);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE lower_case_table_name_without_double_quotes(ID INT);+ changeType: 0want:- status: 2code: 301@@ -24,7 +13,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE "lower_case_table_name_with_double_quotes"(ID INT);+ changeType: 0want:- status: 2code: 301@@ -34,7 +25,9 @@startposition:line: 1column: 0+ endposition: null- statement: "CREATE TABLE \"\U0001F608EMOJI\U0001F604\"(ID INT);"+ changeType: 0want:- status: 2code: 301@@ -44,15 +37,11 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE "lower_case_table_with_double_quotes" RENAME TO UPPER_CASE_TABLE_NAME_WITHOUT_DOUBLE_QUOTES;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE UPPER_CASE_TABLE_NAME RENAME TO "lower_case_table_with_double_quotes";+ changeType: 0want:- status: 2code: 301@@ -62,9 +51,11 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE UPPER_CASE_TABLE_NAME_WITHOUT_DOUBLE_QUOTES(ID INT);ALTER TABLE UPPER_CASE_TABLE_NAME_WITHOUT_DOUBLE_QUOTES RENAME TO "lower_case_table_with_double_quotes";+ changeType: 0want:- status: 2code: 301@@ -74,9 +65,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE "lower_case_table_name_with_double_quotes"(ID INT);ALTER TABLE "lower_case_table_name_with_double_quotes" RENAME TO UPPER_CASE_TABLE_NAME_WITHOUT_DOUBLE_QUOTES;+ changeType: 0want:- status: 2code: 301@@ -86,9 +79,11 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE "lowercase"(ID INT);ALTER TABLE another_schema."lower_case" RENAME TO another_schema.UPPER_CASE_TABLE_NAME_WITHOUT_DOUBLE_QUOTES;+ changeType: 0want:- status: 2code: 301@@ -98,3 +93,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/snowflake/test/naming_table_no_keyword.yaml b/backend/plugin/advisor/snowflake/test/naming_table_no_keyword.yamlindex 3eb75f0767..f8f82de90e 100644--- a/backend/plugin/advisor/snowflake/test/naming_table_no_keyword.yaml+++ b/backend/plugin/advisor/snowflake/test/naming_table_no_keyword.yaml@@ -1,4 +1,5 @@- statement: CREATE TABLE "CONNECT"(ID INT);+ changeType: 0want:- status: 2code: 308@@ -6,7 +7,9 @@content: Table name "CONNECT" is a keyword identifier and should be avoided.detail: ""startposition: null+ endposition: null- statement: CREATE TABLE "DB_NAME"."SCHEMA_NAME"."CONNECT"(ID INT);+ changeType: 0want:- status: 2code: 308@@ -14,15 +17,11 @@content: Table name "CONNECT" is a keyword identifier and should be avoided.detail: ""startposition: null+ endposition: null- statement: CREATE TABLE "DB_NAME"."SCHEMA_NAME"."TABLE_NAME"(ID INT);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE "DB_NAME"."SCHEMA_NAME"."TABLE_NAME" RENAME TO "CONNECT";+ changeType: 0want:- status: 2code: 308@@ -30,3 +29,4 @@content: Table name "CONNECT" is a keyword identifier and should be avoided.detail: ""startposition: null+ endposition: nulldiff --git a/backend/plugin/advisor/snowflake/test/schema_backward_compatibility.yaml b/backend/plugin/advisor/snowflake/test/schema_backward_compatibility.yamlindex b979710ed6..f7d28910e6 100644--- a/backend/plugin/advisor/snowflake/test/schema_backward_compatibility.yaml+++ b/backend/plugin/advisor/snowflake/test/schema_backward_compatibility.yaml@@ -1,4 +1,5 @@- statement: DROP DATABASE DB;+ changeType: 0want:- status: 2code: 101@@ -8,7 +9,9 @@startposition:line: 1column: 0+ endposition: null- statement: DROP SCHEMA SCHEMA1;+ changeType: 0want:- status: 2code: 112@@ -18,7 +21,9 @@startposition:line: 1column: 0+ endposition: null- statement: DROP TABLE T;+ changeType: 0want:- status: 2code: 103@@ -28,7 +33,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE T DROP COLUMN COL1;+ changeType: 0want:- status: 2code: 105@@ -38,9 +45,11 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE IF NOT EXISTS T(ID INT);DROP TABLE T;+ changeType: 0want:- status: 2code: 103@@ -50,13 +59,8 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE T(ID INT);DROP TABLE T;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/snowflake/test/statement_select_no_select_all.yaml b/backend/plugin/advisor/snowflake/test/statement_select_no_select_all.yamlindex da283d21ee..0548a580f9 100644--- a/backend/plugin/advisor/snowflake/test/statement_select_no_select_all.yaml+++ b/backend/plugin/advisor/snowflake/test/statement_select_no_select_all.yaml@@ -1,4 +1,5 @@- statement: SELECT * FROM t+ changeType: 0want:- status: 2code: 203@@ -8,15 +9,11 @@startposition:line: 1column: 0+ endposition: null- statement: SELECT a, b FROM t- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: SELECT a, b FROM (SELECT * from t1, t2) t+ changeType: 0want:- status: 2code: 203@@ -26,7 +23,9 @@startposition:line: 1column: 0+ endposition: null- statement: INSERT INTO t SELECT * FROM t1+ changeType: 0want:- status: 2code: 203@@ -36,3 +35,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/snowflake/test/statement_where_require.yaml b/backend/plugin/advisor/snowflake/test/statement_where_require.yamlindex 4cf478d636..0905d860f7 100644--- a/backend/plugin/advisor/snowflake/test/statement_where_require.yaml+++ b/backend/plugin/advisor/snowflake/test/statement_where_require.yaml@@ -1,4 +1,5 @@- statement: SELECT * FROM (SELECT * FROM TARGET_TABLE) AS a WHERE a.id = 1;+ changeType: 0want:- status: 2code: 202@@ -8,7 +9,9 @@startposition:line: 1column: 0+ endposition: null- statement: UPDATE t SET a = 1;+ changeType: 0want:- status: 2code: 202@@ -18,15 +21,11 @@startposition:line: 1column: 0+ endposition: null- statement: UPDATE t SET a = 1 WHERE b = 2;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: DELETE FROM t;+ changeType: 0want:- status: 2code: 202@@ -36,15 +35,11 @@startposition:line: 1column: 0+ endposition: null- statement: DELETE FROM t WHERE a = 1;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: SELECT * FROM t;+ changeType: 0want:- status: 2code: 202@@ -54,14 +49,9 @@startposition:line: 1column: 0+ endposition: null- statement: SELECT * FROM t WHERE b = 2;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-withalbum_info_1976 as (select m.album_ID, m.album_name, b.band_name@@ -72,6 +62,7 @@)select album_name, band_namefrom Journey_album_info_1976;+ changeType: 0want:- status: 2code: 202@@ -81,6 +72,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 202title: statement.where.require@@ -89,12 +81,14 @@startposition:line: 5column: 0+ endposition: null- statement: |-MERGE INTO target_table USING (SELECT id, description FROM source_table) AS filtered_source_tableON target_table.id = filtered_source_table.idWHEN MATCHED THEN UPDATE SET target_table.a = filtered_source_table.b;+ changeType: 0want:- status: 2code: 202@@ -104,11 +98,6 @@startposition:line: 2column: 0+ endposition: null- statement: SELECT 1;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/snowflake/test/table_drop_naming_convention.yaml b/backend/plugin/advisor/snowflake/test/table_drop_naming_convention.yamlindex c6f285f3a6..91cc151abf 100644--- a/backend/plugin/advisor/snowflake/test/table_drop_naming_convention.yaml+++ b/backend/plugin/advisor/snowflake/test/table_drop_naming_convention.yaml@@ -1,12 +1,7 @@- statement: DROP TABLE IF EXISTS "FOO_delete"- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: DROP TABLE IF EXISTS FOO+ changeType: 0want:- status: 2code: 603@@ -16,3 +11,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/snowflake/test/table_no_foreign_key.yaml b/backend/plugin/advisor/snowflake/test/table_no_foreign_key.yamlindex fdd3900752..1ae8261484 100644--- a/backend/plugin/advisor/snowflake/test/table_no_foreign_key.yaml+++ b/backend/plugin/advisor/snowflake/test/table_no_foreign_key.yaml@@ -5,6 +5,7 @@FULL_NAME VARCHAR(10),POSITION VARCHAR(100));+ changeType: 0want:- status: 2code: 602@@ -14,6 +15,7 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE CUSTOMER(@@ -22,6 +24,7 @@POSITION VARCHAR(100),(ID) REFERENCES PERSON(ID));+ changeType: 0want:- status: 2code: 602@@ -31,6 +34,7 @@startposition:line: 6column: 0+ endposition: null- statement: |-CREATE TABLE CUSTOMER(@@ -39,6 +43,7 @@POSITION VARCHAR(100));ALTER TABLE CUSTOMER ADD (ID) REFERENCES PERSON(ID);+ changeType: 0want:- status: 2code: 602@@ -48,6 +53,7 @@startposition:line: 7column: 0+ endposition: null- statement: |-CREATE TABLE "ANOTHER_SCHEMA"."CUSTOMER"(@@ -56,6 +62,7 @@POSITION VARCHAR(100));ALTER TABLE CUSTOMER DROP FOREIGN KEY (ID);+ changeType: 0want:- status: 2code: 602@@ -65,6 +72,7 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE CUSTOMER(@@ -73,13 +81,7 @@POSITION VARCHAR(100));ALTER TABLE CUSTOMER DROP FOREIGN KEY (ID);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE CUSTOMER(@@ -94,6 +96,7 @@POSITION VARCHAR(100));ALTER TABLE CUSTOMER ADD CONSTRAINT FK_CUSTOMER_PERSON FOREIGN KEY (ID) REFERENCES PERSON(ID);+ changeType: 0want:- status: 2code: 602@@ -103,3 +106,4 @@startposition:line: 13column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/snowflake/test/table_require_pk.yaml b/backend/plugin/advisor/snowflake/test/table_require_pk.yamlindex 2206504b86..9c871164d3 100644--- a/backend/plugin/advisor/snowflake/test/table_require_pk.yaml+++ b/backend/plugin/advisor/snowflake/test/table_require_pk.yaml@@ -5,13 +5,7 @@FULL_NAME VARCHAR(10),POSITION VARCHAR(100));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE CUSTOMER(@@ -20,13 +14,7 @@POSITION VARCHAR(100),CONSTRAINT PK_CUSTOMER PRIMARY KEY (ID));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE CUSTOMER(@@ -34,6 +22,7 @@FULL_NAME VARCHAR(10),POSITION VARCHAR(100));+ changeType: 0want:- status: 2code: 601@@ -43,6 +32,7 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE CUSTOMER(@@ -51,6 +41,7 @@POSITION VARCHAR(100));ALTER TABLE CUSTOMER DROP PRIMARY KEY(ID);+ changeType: 0want:- status: 2code: 601@@ -60,6 +51,7 @@startposition:line: 7column: 0+ endposition: null- statement: |-CREATE TABLE CUSTOMER(@@ -68,13 +60,7 @@POSITION VARCHAR(100));ALTER TABLE CUSTOMER ADD CONSTRAINT PK_CUSTOMER PRIMARY KEY (ID);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE CUSTOMER(@@ -83,13 +69,7 @@POSITION VARCHAR(100));ALTER TABLE "PUBLIC"."CUSTOMER" ADD CONSTRAINT PK_CUSTOMER PRIMARY KEY (ID);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE CUSTOMER(@@ -105,6 +85,7 @@FULL_NAME VARCHAR(10),POSITION VARCHAR(100));+ changeType: 0want:- status: 2code: 601@@ -114,6 +95,7 @@startposition:line: 9column: 0+ endposition: null- statement: |-CREATE TABLE CUSTOMER(@@ -140,6 +122,7 @@);ALTER TABLE CUSTOMER DROP PRIMARY KEY(ID);ALTER TABLE ORDERING DROP PRIMARY KEY(ORDER_ID);+ changeType: 0want:- status: 2code: 601@@ -149,6 +132,7 @@startposition:line: 24column: 0+ endposition: null- status: 2code: 601title: table.require-pk@@ -157,3 +141,4 @@startposition:line: 25column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/sql_review.go b/backend/plugin/advisor/sql_review.goindex 24b192a269..c33e1133c5 100644--- a/backend/plugin/advisor/sql_review.go+++ b/backend/plugin/advisor/sql_review.go@@ -561,14 +561,6 @@ func SQLReviewCheck(// Error is 2, warning is 1. So the error (value 2) should come first.return result[i].Status.Number() > result[j].Status.Number()})- if len(result) == 0 {- result = append(result, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: Ok.Int32(),- Title: "OK",- Content: "",- })- }return result, nil}diff --git a/backend/plugin/advisor/tidb/advisor_charset_allowlist.go b/backend/plugin/advisor/tidb/advisor_charset_allowlist.goindex 79a4490c26..cf6e047486 100644--- a/backend/plugin/advisor/tidb/advisor_charset_allowlist.go+++ b/backend/plugin/advisor/tidb/advisor_charset_allowlist.go@@ -55,14 +55,6 @@ func (*CharsetAllowlistAdvisor) Check(ctx advisor.Context, _ string) ([]*storepb(stmt).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_collation_allowlist.go b/backend/plugin/advisor/tidb/advisor_collation_allowlist.goindex 09bb2c5f83..5b2b81baca 100644--- a/backend/plugin/advisor/tidb/advisor_collation_allowlist.go+++ b/backend/plugin/advisor/tidb/advisor_collation_allowlist.go@@ -56,14 +56,6 @@ func (*CollationAllowlistAdvisor) Check(ctx advisor.Context, _ string) ([]*store(stmt).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_colum_require_default.go b/backend/plugin/advisor/tidb/advisor_colum_require_default.goindex d87c9d17e3..b0718ece8b 100644--- a/backend/plugin/advisor/tidb/advisor_colum_require_default.go+++ b/backend/plugin/advisor/tidb/advisor_colum_require_default.go@@ -49,14 +49,6 @@ func (*ColumRequireDefaultAdvisor) Check(ctx advisor.Context, _ string) ([]*stor(stmt).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_column_auto_increment_initial_value.go b/backend/plugin/advisor/tidb/advisor_column_auto_increment_initial_value.goindex 51708a68f0..5d2f325154 100644--- a/backend/plugin/advisor/tidb/advisor_column_auto_increment_initial_value.go+++ b/backend/plugin/advisor/tidb/advisor_column_auto_increment_initial_value.go@@ -52,14 +52,6 @@ func (*ColumnAutoIncrementInitialValueAdvisor) Check(ctx advisor.Context, _ stri(stmt).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_column_auto_increment_must_integer.go b/backend/plugin/advisor/tidb/advisor_column_auto_increment_must_integer.goindex 7309419a75..4b5b931fcf 100644--- a/backend/plugin/advisor/tidb/advisor_column_auto_increment_must_integer.go+++ b/backend/plugin/advisor/tidb/advisor_column_auto_increment_must_integer.go@@ -49,14 +49,6 @@ func (*ColumnAutoIncrementMustIntegerAdvisor) Check(ctx advisor.Context, _ strin(stmt).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_column_auto_increment_must_unsigned.go b/backend/plugin/advisor/tidb/advisor_column_auto_increment_must_unsigned.goindex c787ef3486..88f80f99e2 100644--- a/backend/plugin/advisor/tidb/advisor_column_auto_increment_must_unsigned.go+++ b/backend/plugin/advisor/tidb/advisor_column_auto_increment_must_unsigned.go@@ -48,14 +48,6 @@ func (*ColumnAutoIncrementMustUnsignedAdvisor) Check(ctx advisor.Context, _ stri(stmt).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_column_comment_convention.go b/backend/plugin/advisor/tidb/advisor_column_comment_convention.goindex 4e4806aabf..53e462f6dd 100644--- a/backend/plugin/advisor/tidb/advisor_column_comment_convention.go+++ b/backend/plugin/advisor/tidb/advisor_column_comment_convention.go@@ -54,14 +54,6 @@ func (*ColumnCommentConventionAdvisor) Check(ctx advisor.Context, _ string) ([]*(stmt).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_column_current_time_count_limit.go b/backend/plugin/advisor/tidb/advisor_column_current_time_count_limit.goindex 89255ad047..5c4981abf7 100644--- a/backend/plugin/advisor/tidb/advisor_column_current_time_count_limit.go+++ b/backend/plugin/advisor/tidb/advisor_column_current_time_count_limit.go@@ -107,14 +107,7 @@ func (checker *columnCurrentTimeCountLimitChecker) generateAdvice() []*storepb.A})}}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }+return checker.adviceList}diff --git a/backend/plugin/advisor/tidb/advisor_column_disallow_changing.go b/backend/plugin/advisor/tidb/advisor_column_disallow_changing.goindex 3d6311564e..1210375a4e 100644--- a/backend/plugin/advisor/tidb/advisor_column_disallow_changing.go+++ b/backend/plugin/advisor/tidb/advisor_column_disallow_changing.go@@ -47,14 +47,6 @@ func (*ColumnDisallowChangingAdvisor) Check(ctx advisor.Context, _ string) ([]*s(stmt).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_column_disallow_changing_order.go b/backend/plugin/advisor/tidb/advisor_column_disallow_changing_order.goindex 7dac32eff2..471c35c298 100644--- a/backend/plugin/advisor/tidb/advisor_column_disallow_changing_order.go+++ b/backend/plugin/advisor/tidb/advisor_column_disallow_changing_order.go@@ -47,14 +47,6 @@ func (*ColumnDisallowChangingOrderAdvisor) Check(ctx advisor.Context, _ string)(stmt).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_column_disallow_changing_type.go b/backend/plugin/advisor/tidb/advisor_column_disallow_changing_type.goindex 0a4c16f440..ea4bec4051 100644--- a/backend/plugin/advisor/tidb/advisor_column_disallow_changing_type.go+++ b/backend/plugin/advisor/tidb/advisor_column_disallow_changing_type.go@@ -50,14 +50,6 @@ func (*ColumnDisallowChangingTypeAdvisor) Check(ctx advisor.Context, _ string) ((stmt).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_column_disallow_drop_in_index.go b/backend/plugin/advisor/tidb/advisor_column_disallow_drop_in_index.goindex 70f74ea83f..3f9113edf5 100644--- a/backend/plugin/advisor/tidb/advisor_column_disallow_drop_in_index.go+++ b/backend/plugin/advisor/tidb/advisor_column_disallow_drop_in_index.go@@ -51,15 +51,6 @@ func (*ColumnDisallowDropInIndexAdvisor) Check(ctx advisor.Context, _ string) ([(stmt).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }-return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_column_disallow_set_charset.go b/backend/plugin/advisor/tidb/advisor_column_disallow_set_charset.goindex 9ea8c55a89..ec01686363 100644--- a/backend/plugin/advisor/tidb/advisor_column_disallow_set_charset.go+++ b/backend/plugin/advisor/tidb/advisor_column_disallow_set_charset.go@@ -47,14 +47,6 @@ func (*ColumnDisallowSetCharsetAdvisor) Check(ctx advisor.Context, _ string) ([](stmt).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_column_maximum_character_length.go b/backend/plugin/advisor/tidb/advisor_column_maximum_character_length.goindex 348a2a5bf4..a6387224ad 100644--- a/backend/plugin/advisor/tidb/advisor_column_maximum_character_length.go+++ b/backend/plugin/advisor/tidb/advisor_column_maximum_character_length.go@@ -53,14 +53,6 @@ func (*ColumnMaximumCharacterLengthAdvisor) Check(ctx advisor.Context, _ string)(stmt).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_column_no_null.go b/backend/plugin/advisor/tidb/advisor_column_no_null.goindex 08580d2e48..d61a8b79c2 100644--- a/backend/plugin/advisor/tidb/advisor_column_no_null.go+++ b/backend/plugin/advisor/tidb/advisor_column_no_null.go@@ -88,14 +88,6 @@ func (checker *columnNoNullChecker) generateAdvice() []*storepb.Advice {}}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList}diff --git a/backend/plugin/advisor/tidb/advisor_column_required.go b/backend/plugin/advisor/tidb/advisor_column_required.goindex 43cb3444a9..4016d683e8 100644--- a/backend/plugin/advisor/tidb/advisor_column_required.go+++ b/backend/plugin/advisor/tidb/advisor_column_required.go@@ -140,14 +140,6 @@ func (v *columnRequirementChecker) generateAdviceList() []*storepb.Advice {}}- if len(v.adviceList) == 0 {- v.adviceList = append(v.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return v.adviceList}diff --git a/backend/plugin/advisor/tidb/advisor_column_set_default_for_not_null.go b/backend/plugin/advisor/tidb/advisor_column_set_default_for_not_null.goindex 2aaee1fe45..aaf1f945e1 100644--- a/backend/plugin/advisor/tidb/advisor_column_set_default_for_not_null.go+++ b/backend/plugin/advisor/tidb/advisor_column_set_default_for_not_null.go@@ -46,14 +46,6 @@ func (*ColumnSetDefaultForNotNullAdvisor) Check(ctx advisor.Context, _ string) ((stmt).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_column_type_disallow_list.go b/backend/plugin/advisor/tidb/advisor_column_type_disallow_list.goindex 057cfd6ca7..7bcd9f82fc 100644--- a/backend/plugin/advisor/tidb/advisor_column_type_disallow_list.go+++ b/backend/plugin/advisor/tidb/advisor_column_type_disallow_list.go@@ -56,14 +56,6 @@ func (*ColumnTypeDisallowListAdvisor) Check(ctx advisor.Context, _ string) ([]*s(stmt).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_database_drop_empty_db.go b/backend/plugin/advisor/tidb/advisor_database_drop_empty_db.goindex 8c1a76d4b6..91c10dc8fb 100644--- a/backend/plugin/advisor/tidb/advisor_database_drop_empty_db.go+++ b/backend/plugin/advisor/tidb/advisor_database_drop_empty_db.go@@ -45,14 +45,6 @@ func (*DatabaseAllowDropIfEmptyAdvisor) Check(ctx advisor.Context, _ string) ([](stmtNode).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_index_key_number_limit.go b/backend/plugin/advisor/tidb/advisor_index_key_number_limit.goindex 80bd9d9374..d5abe99cf9 100644--- a/backend/plugin/advisor/tidb/advisor_index_key_number_limit.go+++ b/backend/plugin/advisor/tidb/advisor_index_key_number_limit.go@@ -52,14 +52,6 @@ func (*IndexKeyNumberLimitAdvisor) Check(ctx advisor.Context, _ string) ([]*stor(stmt).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_index_no_duplicate_column.go b/backend/plugin/advisor/tidb/advisor_index_no_duplicate_column.goindex b1cfcb3c7f..a701cef02e 100644--- a/backend/plugin/advisor/tidb/advisor_index_no_duplicate_column.go+++ b/backend/plugin/advisor/tidb/advisor_index_no_duplicate_column.go@@ -47,14 +47,6 @@ func (*IndexNoDuplicateColumnAdvisor) Check(ctx advisor.Context, _ string) ([]*s(stmt).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_index_pk_type.go b/backend/plugin/advisor/tidb/advisor_index_pk_type.goindex f78758d093..8a81b670b8 100644--- a/backend/plugin/advisor/tidb/advisor_index_pk_type.go+++ b/backend/plugin/advisor/tidb/advisor_index_pk_type.go@@ -51,14 +51,6 @@ func (*IndexPkTypeAdvisor) Check(ctx advisor.Context, _ string) ([]*storepb.Advi(stmt).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_index_primary_key_type_allowlist.go b/backend/plugin/advisor/tidb/advisor_index_primary_key_type_allowlist.goindex cd85d0d9dd..e8264c238f 100644--- a/backend/plugin/advisor/tidb/advisor_index_primary_key_type_allowlist.go+++ b/backend/plugin/advisor/tidb/advisor_index_primary_key_type_allowlist.go@@ -61,14 +61,6 @@ func (*IndexPrimaryKeyTypeAllowlistAdvisor) Check(ctx advisor.Context, _ string)(stmt).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_index_total_number_limit.go b/backend/plugin/advisor/tidb/advisor_index_total_number_limit.goindex 9bf47047c9..1997502f44 100644--- a/backend/plugin/advisor/tidb/advisor_index_total_number_limit.go+++ b/backend/plugin/advisor/tidb/advisor_index_total_number_limit.go@@ -102,14 +102,6 @@ func (checker *indexTotalNumberLimitChecker) generateAdvice() []*storepb.Advice}}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList}diff --git a/backend/plugin/advisor/tidb/advisor_index_type_no_blob.go b/backend/plugin/advisor/tidb/advisor_index_type_no_blob.goindex 7138194030..85f0ffa041 100644--- a/backend/plugin/advisor/tidb/advisor_index_type_no_blob.go+++ b/backend/plugin/advisor/tidb/advisor_index_type_no_blob.go@@ -53,14 +53,6 @@ func (*IndexTypeNoBlobAdvisor) Check(ctx advisor.Context, _ string) ([]*storepb.(stmt).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_insert_disallow_order_by_rand.go b/backend/plugin/advisor/tidb/advisor_insert_disallow_order_by_rand.goindex 98fbb88a2c..9994b809ed 100644--- a/backend/plugin/advisor/tidb/advisor_insert_disallow_order_by_rand.go+++ b/backend/plugin/advisor/tidb/advisor_insert_disallow_order_by_rand.go@@ -47,14 +47,6 @@ func (*InsertDisallowOrderByRandAdvisor) Check(ctx advisor.Context, _ string) ([(stmt).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_insert_must_specify_column.go b/backend/plugin/advisor/tidb/advisor_insert_must_specify_column.goindex 99f1d7b205..6b601447a2 100644--- a/backend/plugin/advisor/tidb/advisor_insert_must_specify_column.go+++ b/backend/plugin/advisor/tidb/advisor_insert_must_specify_column.go@@ -47,14 +47,6 @@ func (*InsertMustSpecifyColumnAdvisor) Check(ctx advisor.Context, _ string) ([]*(stmt).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_migration_compatibility.go b/backend/plugin/advisor/tidb/advisor_migration_compatibility.goindex 76870716b9..01a5f915fe 100644--- a/backend/plugin/advisor/tidb/advisor_migration_compatibility.go+++ b/backend/plugin/advisor/tidb/advisor_migration_compatibility.go@@ -44,14 +44,6 @@ func (*CompatibilityAdvisor) Check(ctx advisor.Context, _ string) ([]*storepb.Ad(stmtNode).Accept(c)}- if len(c.adviceList) == 0 {- c.adviceList = append(c.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return c.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_naming_auto_increment_column.go b/backend/plugin/advisor/tidb/advisor_naming_auto_increment_column.goindex 178130ce36..f9171c3760 100644--- a/backend/plugin/advisor/tidb/advisor_naming_auto_increment_column.go+++ b/backend/plugin/advisor/tidb/advisor_naming_auto_increment_column.go@@ -54,14 +54,6 @@ func (*NamingAutoIncrementColumnAdvisor) Check(ctx advisor.Context, _ string) ([(stmt).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_naming_column.go b/backend/plugin/advisor/tidb/advisor_naming_column.goindex 9ef072a57c..e1b6f329aa 100644--- a/backend/plugin/advisor/tidb/advisor_naming_column.go+++ b/backend/plugin/advisor/tidb/advisor_naming_column.go@@ -51,15 +51,6 @@ func (*NamingColumnConventionAdvisor) Check(ctx advisor.Context, _ string) ([]*s(stmtNode).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }-return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_naming_foreign_key_convention.go b/backend/plugin/advisor/tidb/advisor_naming_foreign_key_convention.goindex 79afec5c3a..79b5ed08b5 100644--- a/backend/plugin/advisor/tidb/advisor_naming_foreign_key_convention.go+++ b/backend/plugin/advisor/tidb/advisor_naming_foreign_key_convention.go@@ -51,15 +51,6 @@ func (*NamingFKConventionAdvisor) Check(ctx advisor.Context, _ string) ([]*store(stmtNode).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }-return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_naming_index_convention.go b/backend/plugin/advisor/tidb/advisor_naming_index_convention.goindex 21e05cd20a..ffd9ddaf15 100644--- a/backend/plugin/advisor/tidb/advisor_naming_index_convention.go+++ b/backend/plugin/advisor/tidb/advisor_naming_index_convention.go@@ -54,15 +54,6 @@ func (*NamingIndexConventionAdvisor) Check(ctx advisor.Context, _ string) ([]*st(stmtNode).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }-return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_naming_table.go b/backend/plugin/advisor/tidb/advisor_naming_table.goindex 7b3aa68a8c..6e10353862 100644--- a/backend/plugin/advisor/tidb/advisor_naming_table.go+++ b/backend/plugin/advisor/tidb/advisor_naming_table.go@@ -49,14 +49,6 @@ func (*NamingTableConventionAdvisor) Check(ctx advisor.Context, _ string) ([]*st(stmtNode).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_naming_unique_key_convention.go b/backend/plugin/advisor/tidb/advisor_naming_unique_key_convention.goindex e1a8dd09e9..2e23466571 100644--- a/backend/plugin/advisor/tidb/advisor_naming_unique_key_convention.go+++ b/backend/plugin/advisor/tidb/advisor_naming_unique_key_convention.go@@ -53,14 +53,6 @@ func (*NamingUKConventionAdvisor) Check(ctx advisor.Context, _ string) ([]*store(stmtNode).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_statement_disallow_mix_ddl_dml.go b/backend/plugin/advisor/tidb/advisor_statement_disallow_mix_ddl_dml.goindex 59862879c2..a49230486e 100644--- a/backend/plugin/advisor/tidb/advisor_statement_disallow_mix_ddl_dml.go+++ b/backend/plugin/advisor/tidb/advisor_statement_disallow_mix_ddl_dml.go@@ -92,14 +92,5 @@ func (*StatementDisallowMixDDLDMLAdvisor) Check(ctx advisor.Context, _ string) (})}- if len(adviceList) == 0 {- adviceList = append(adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }-return adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_statement_dml_dry_run.go b/backend/plugin/advisor/tidb/advisor_statement_dml_dry_run.goindex 014f7c1f3b..ae2ad8e0e8 100644--- a/backend/plugin/advisor/tidb/advisor_statement_dml_dry_run.go+++ b/backend/plugin/advisor/tidb/advisor_statement_dml_dry_run.go@@ -53,14 +53,6 @@ func (*StatementDmlDryRunAdvisor) Check(ctx advisor.Context, _ string) ([]*store}}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_statement_maximum_limit_value.go b/backend/plugin/advisor/tidb/advisor_statement_maximum_limit_value.goindex 26d9f221fb..72ecbb51e6 100644--- a/backend/plugin/advisor/tidb/advisor_statement_maximum_limit_value.go+++ b/backend/plugin/advisor/tidb/advisor_statement_maximum_limit_value.go@@ -54,14 +54,6 @@ func (*StatementMaximumLimitValueAdvisor) Check(ctx advisor.Context, _ string) ((stmt).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_statement_merge_alter_table.go b/backend/plugin/advisor/tidb/advisor_statement_merge_alter_table.goindex 3f64784637..2aaf36f049 100644--- a/backend/plugin/advisor/tidb/advisor_statement_merge_alter_table.go+++ b/backend/plugin/advisor/tidb/advisor_statement_merge_alter_table.go@@ -121,13 +121,5 @@ func (checker *statementMergeAlterTableChecker) generateAdvice() []*storepb.Advi}}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList}diff --git a/backend/plugin/advisor/tidb/advisor_statement_prior_backup_check.go b/backend/plugin/advisor/tidb/advisor_statement_prior_backup_check.goindex ffd707cc73..5076010fc9 100644--- a/backend/plugin/advisor/tidb/advisor_statement_prior_backup_check.go+++ b/backend/plugin/advisor/tidb/advisor_statement_prior_backup_check.go@@ -27,17 +27,11 @@ type StatementPriorBackupCheckAdvisor struct {// Check checks for no mixed DDL and DML.func (*StatementPriorBackupCheckAdvisor) Check(ctx advisor.Context, _ string) ([]*storepb.Advice, error) {- var adviceList []*storepb.Adviceif ctx.PreUpdateBackupDetail == nil || ctx.ChangeType != storepb.PlanCheckRunConfig_DML {- adviceList = append(adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- return adviceList, nil+ return nil, nil}+ var adviceList []*storepb.Adviceroot, ok := ctx.AST.([]ast.StmtNode)if !ok {return nil, errors.Errorf("failed to convert to StmtNode")@@ -121,15 +115,6 @@ func (*StatementPriorBackupCheckAdvisor) Check(ctx advisor.Context, _ string) ([}}- if len(adviceList) == 0 {- adviceList = append(adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }-return adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_stmt_disallow_commit.go b/backend/plugin/advisor/tidb/advisor_stmt_disallow_commit.goindex e71ee7dce4..ce2b917de0 100644--- a/backend/plugin/advisor/tidb/advisor_stmt_disallow_commit.go+++ b/backend/plugin/advisor/tidb/advisor_stmt_disallow_commit.go@@ -47,14 +47,6 @@ func (*StatementDisallowCommitAdvisor) Check(ctx advisor.Context, _ string) ([]*(stmt).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_stmt_disallow_limit.go b/backend/plugin/advisor/tidb/advisor_stmt_disallow_limit.goindex e62a66938b..14cdba7a19 100644--- a/backend/plugin/advisor/tidb/advisor_stmt_disallow_limit.go+++ b/backend/plugin/advisor/tidb/advisor_stmt_disallow_limit.go@@ -47,14 +47,6 @@ func (*StatementDisallowLimitAdvisor) Check(ctx advisor.Context, _ string) ([]*s(stmt).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_stmt_disallow_order_by.go b/backend/plugin/advisor/tidb/advisor_stmt_disallow_order_by.goindex debaed9d50..5593c4ceaf 100644--- a/backend/plugin/advisor/tidb/advisor_stmt_disallow_order_by.go+++ b/backend/plugin/advisor/tidb/advisor_stmt_disallow_order_by.go@@ -47,14 +47,6 @@ func (*DisallowOrderByAdvisor) Check(ctx advisor.Context, _ string) ([]*storepb.(stmt).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_stmt_no_leading_wildcard_like.go b/backend/plugin/advisor/tidb/advisor_stmt_no_leading_wildcard_like.goindex 06e28f68bc..f7b2057e02 100644--- a/backend/plugin/advisor/tidb/advisor_stmt_no_leading_wildcard_like.go+++ b/backend/plugin/advisor/tidb/advisor_stmt_no_leading_wildcard_like.go@@ -59,14 +59,6 @@ func (*NoLeadingWildcardLikeAdvisor) Check(ctx advisor.Context, _ string) ([]*st}}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_stmt_no_select_all.go b/backend/plugin/advisor/tidb/advisor_stmt_no_select_all.goindex 241a007b02..8c358df37d 100644--- a/backend/plugin/advisor/tidb/advisor_stmt_no_select_all.go+++ b/backend/plugin/advisor/tidb/advisor_stmt_no_select_all.go@@ -44,14 +44,6 @@ func (*NoSelectAllAdvisor) Check(ctx advisor.Context, _ string) ([]*storepb.Advi(stmtNode).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_stmt_where_required.go b/backend/plugin/advisor/tidb/advisor_stmt_where_required.goindex 7835368032..28141582f7 100644--- a/backend/plugin/advisor/tidb/advisor_stmt_where_required.go+++ b/backend/plugin/advisor/tidb/advisor_stmt_where_required.go@@ -45,14 +45,6 @@ func (*WhereRequirementAdvisor) Check(ctx advisor.Context, _ string) ([]*storepb(stmtNode).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_table_comment_convention.go b/backend/plugin/advisor/tidb/advisor_table_comment_convention.goindex 6c957ef6b8..c725c3be15 100644--- a/backend/plugin/advisor/tidb/advisor_table_comment_convention.go+++ b/backend/plugin/advisor/tidb/advisor_table_comment_convention.go@@ -53,14 +53,6 @@ func (*TableCommentConventionAdvisor) Check(ctx advisor.Context, _ string) ([]*s(stmt).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_table_disallow_partition.go b/backend/plugin/advisor/tidb/advisor_table_disallow_partition.goindex 0a0519c9db..22263eb40f 100644--- a/backend/plugin/advisor/tidb/advisor_table_disallow_partition.go+++ b/backend/plugin/advisor/tidb/advisor_table_disallow_partition.go@@ -47,14 +47,6 @@ func (*TableDisallowPartitionAdvisor) Check(ctx advisor.Context, _ string) ([]*s(stmt).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_table_drop_naming_convention.go b/backend/plugin/advisor/tidb/advisor_table_drop_naming_convention.goindex 031aee0602..9e3abd4c46 100644--- a/backend/plugin/advisor/tidb/advisor_table_drop_naming_convention.go+++ b/backend/plugin/advisor/tidb/advisor_table_drop_naming_convention.go@@ -49,14 +49,6 @@ func (*TableDropNamingConventionAdvisor) Check(ctx advisor.Context, _ string) ([(stmtNode).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_table_no_fk.go b/backend/plugin/advisor/tidb/advisor_table_no_fk.goindex df68f5b923..13e621db36 100644--- a/backend/plugin/advisor/tidb/advisor_table_no_fk.go+++ b/backend/plugin/advisor/tidb/advisor_table_no_fk.go@@ -42,15 +42,6 @@ func (*TableNoFKAdvisor) Check(ctx advisor.Context, _ string) ([]*storepb.Advice(stmtNode).Accept(checker)}- if len(checker.adviceList) == 0 {- checker.adviceList = append(checker.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }-return checker.adviceList, nil}diff --git a/backend/plugin/advisor/tidb/advisor_table_require_pk.go b/backend/plugin/advisor/tidb/advisor_table_require_pk.goindex 54d600cb0b..11510e1098 100644--- a/backend/plugin/advisor/tidb/advisor_table_require_pk.go+++ b/backend/plugin/advisor/tidb/advisor_table_require_pk.go@@ -141,14 +141,6 @@ func (v *tableRequirePKChecker) generateAdviceList() []*storepb.Advice {}}- if len(v.adviceList) == 0 {- v.adviceList = append(v.adviceList, &storepb.Advice{- Status: storepb.Advice_SUCCESS,- Code: advisor.Ok.Int32(),- Title: "OK",- Content: "",- })- }return v.adviceList}diff --git a/backend/plugin/advisor/tidb/test/column_auto_increment_initial_value.yaml b/backend/plugin/advisor/tidb/test/column_auto_increment_initial_value.yamlindex f13707e24d..6a6bec1c2e 100644--- a/backend/plugin/advisor/tidb/test/column_auto_increment_initial_value.yaml+++ b/backend/plugin/advisor/tidb/test/column_auto_increment_initial_value.yaml@@ -1,20 +1,9 @@- statement: CREATE TABLE t(a int)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(a int auto_increment) auto_increment = 20- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(a int auto_increment) auto_increment = 2+ changeType: 0want:- status: 2code: 416@@ -24,3 +13,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/column_auto_increment_must_integer.yaml b/backend/plugin/advisor/tidb/test/column_auto_increment_must_integer.yamlindex a97500bc08..fa02e6ae77 100644--- a/backend/plugin/advisor/tidb/test/column_auto_increment_must_integer.yaml+++ b/backend/plugin/advisor/tidb/test/column_auto_increment_must_integer.yaml@@ -1,12 +1,7 @@- statement: CREATE TABLE t(a INT AUTO_INCREMENT)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(a varchar(255) AUTO_INCREMENT)+ changeType: 0want:- status: 2code: 410@@ -16,9 +11,11 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE t(b int);ALTER TABLE t ADD COLUMN a varchar(255) AUTO_INCREMENT+ changeType: 0want:- status: 2code: 410@@ -28,9 +25,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t MODIFY COLUMN a varchar(255) AUTO_INCREMENT+ changeType: 0want:- status: 2code: 410@@ -40,9 +39,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(b int);ALTER TABLE t CHANGE COLUMN b a varchar(255) AUTO_INCREMENT+ changeType: 0want:- status: 2code: 410@@ -52,3 +53,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/column_auto_increment_must_unsigned.yaml b/backend/plugin/advisor/tidb/test/column_auto_increment_must_unsigned.yamlindex 234571c7ef..870c44f104 100644--- a/backend/plugin/advisor/tidb/test/column_auto_increment_must_unsigned.yaml+++ b/backend/plugin/advisor/tidb/test/column_auto_increment_must_unsigned.yaml@@ -1,12 +1,7 @@- statement: CREATE TABLE t(a INT UNSIGNED AUTO_INCREMENT)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(a INT AUTO_INCREMENT)+ changeType: 0want:- status: 2code: 417@@ -16,9 +11,11 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE t(b int);ALTER TABLE t ADD COLUMN a INT AUTO_INCREMENT+ changeType: 0want:- status: 2code: 417@@ -28,9 +25,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t MODIFY COLUMN a INT AUTO_INCREMENT+ changeType: 0want:- status: 2code: 417@@ -40,9 +39,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(b int);ALTER TABLE t CHANGE COLUMN b a INT AUTO_INCREMENT+ changeType: 0want:- status: 2code: 417@@ -52,3 +53,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/column_comment.yaml b/backend/plugin/advisor/tidb/test/column_comment.yamlindex 13645accad..ceb12ac0fe 100644--- a/backend/plugin/advisor/tidb/test/column_comment.yaml+++ b/backend/plugin/advisor/tidb/test/column_comment.yaml@@ -1,16 +1,11 @@- statement: CREATE TABLE t(a int COMMENT 'comments')- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a int COMMENT 'some comments',b int,c int)+ changeType: 0want:- status: 2code: 409@@ -20,6 +15,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 408title: column.comment@@ -28,6 +24,7 @@startposition:line: 3column: 0+ endposition: null- status: 2code: 408title: column.comment@@ -36,9 +33,11 @@startposition:line: 4column: 0+ endposition: null- statement: |-CREATE TABLE t(a int COMMENT 'comment');ALTER TABLE t ADD COLUMN b int+ changeType: 0want:- status: 2code: 408@@ -48,9 +47,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int COMMENT 'this is comment');ALTER TABLE t CHANGE COLUMN a b int+ changeType: 0want:- status: 2code: 409@@ -60,6 +61,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 408title: column.comment@@ -68,9 +70,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(b int COMMENT 'It is comment');ALTER TABLE t MODIFY COLUMN b int+ changeType: 0want:- status: 2code: 409@@ -80,6 +84,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 408title: column.comment@@ -88,9 +93,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(b int COMMENT 'It is COMMENT');ALTER TABLE t MODIFY COLUMN b int COMMENT 'abcdefghiakljhakljdsfalugelkhnabsdguelkadf'+ changeType: 0want:- status: 2code: 409@@ -100,6 +107,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 409title: column.comment@@ -108,3 +116,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/column_current_time_count_limit.yaml b/backend/plugin/advisor/tidb/test/column_current_time_count_limit.yamlindex 539f28a2af..ae790e848a 100644--- a/backend/plugin/advisor/tidb/test/column_current_time_count_limit.yaml+++ b/backend/plugin/advisor/tidb/test/column_current_time_count_limit.yaml@@ -1,17 +1,12 @@- statement: CREATE TABLE t(a timestamp, b timestamp)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a timestamp default now(),b timestamp default current_timestamp(),c timestamp default localtime)+ changeType: 0want:- status: 2code: 418@@ -21,11 +16,13 @@startposition:line: 5column: 0+ endposition: null- statement: |-CREATE TABLE t(a timestamp default now() on update localtime,b timestamp default current_timestamp() on update localtimestamp())+ changeType: 0want:- status: 2code: 419@@ -35,9 +32,11 @@startposition:line: 4column: 0+ endposition: null- statement: |-ALTER TABLE tech_book ADD COLUMN a timestamp default now() on update localtime;ALTER TABLE tech_book ADD COLUMN b timestamp default current_timestamp() on update localtimestamp();+ changeType: 0want:- status: 2code: 419@@ -47,3 +46,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/column_disallow_change.yaml b/backend/plugin/advisor/tidb/test/column_disallow_change.yamlindex f5beb6a5c3..ceccf6466e 100644--- a/backend/plugin/advisor/tidb/test/column_disallow_change.yaml+++ b/backend/plugin/advisor/tidb/test/column_disallow_change.yaml@@ -1,16 +1,11 @@- statement: |-CREATE TABLE t(b int);ALTER TABLE t ADD COLUMN a int- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(b int);ALTER TABLE t CHANGE COLUMN b a int+ changeType: 0want:- status: 2code: 406@@ -20,3 +15,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/column_disallow_change_type.yaml b/backend/plugin/advisor/tidb/test/column_disallow_change_type.yamlindex dea3618e77..a04465ce3b 100644--- a/backend/plugin/advisor/tidb/test/column_disallow_change_type.yaml+++ b/backend/plugin/advisor/tidb/test/column_disallow_change_type.yaml@@ -1,4 +1,5 @@- statement: ALTER TABLE tech_book MODIFY id INTEGER UNSIGNED+ changeType: 0want:- status: 2code: 403@@ -8,15 +9,11 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book MODIFY id int- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book MODIFY id bigint+ changeType: 0want:- status: 2code: 403@@ -26,7 +23,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book CHANGE name uname varchar(20)+ changeType: 0want:- status: 2code: 403@@ -36,3 +35,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/column_disallow_changing_order.yaml b/backend/plugin/advisor/tidb/test/column_disallow_changing_order.yamlindex 5d38ced230..dda4c1aead 100644--- a/backend/plugin/advisor/tidb/test/column_disallow_changing_order.yaml+++ b/backend/plugin/advisor/tidb/test/column_disallow_changing_order.yaml@@ -1,6 +1,7 @@- statement: |-CREATE TABLE t(a int);ALTER TABLE t MODIFY COLUMN a int+ changeType: 0want:- status: 2code: 407@@ -10,9 +11,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t MODIFY COLUMN a int FIRST+ changeType: 0want:- status: 2code: 407@@ -22,9 +25,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(b int, a1 int);ALTER TABLE t CHANGE COLUMN a1 a int FIRST+ changeType: 0want:- status: 2code: 407@@ -34,9 +39,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int, b int);ALTER TABLE t MODIFY COLUMN a int AFTER b+ changeType: 0want:- status: 2code: 407@@ -46,9 +53,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a1 int, b int);ALTER TABLE t CHANGE COLUMN a1 a int AFTER b+ changeType: 0want:- status: 2code: 407@@ -58,3 +67,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/column_disallow_drop_in_index.yaml b/backend/plugin/advisor/tidb/test/column_disallow_drop_in_index.yamlindex 31eb8c7f32..fbd65168bf 100644--- a/backend/plugin/advisor/tidb/test/column_disallow_drop_in_index.yaml+++ b/backend/plugin/advisor/tidb/test/column_disallow_drop_in_index.yaml@@ -1,16 +1,11 @@- statement: |-CREATE TABLE t(a int, b int, INDEX idx_a(a));ALTER TABLE t DROP COLUMN b- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a int, b int, INDEX idx_b(b));ALTER TABLE t DROP COLUMN b+ changeType: 0want:- status: 2code: 424@@ -20,9 +15,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int, c int, INDEX idx_ac(a,c));ALTER TABLE t DROP COLUMN c+ changeType: 0want:- status: 2code: 424@@ -32,21 +29,17 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int, b int, INDEX idx_a(a));CREATE TABLE y(a int, b int);ALTER TABLE y DROP COLUMN a- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a int,b int, c int, INDEX idx_ac(a,c));ALTER TABLE t DROP COLUMN a;ALTER TABLE t DROP COLUMN c+ changeType: 0want:- status: 2code: 424@@ -56,6 +49,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 424title: column.disallow-drop-in-index@@ -64,3 +58,4 @@startposition:line: 3column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/column_disallow_set_charset.yaml b/backend/plugin/advisor/tidb/test/column_disallow_set_charset.yamlindex e55a466e48..9bde904f21 100644--- a/backend/plugin/advisor/tidb/test/column_disallow_set_charset.yaml+++ b/backend/plugin/advisor/tidb/test/column_disallow_set_charset.yaml@@ -1,22 +1,11 @@- statement: |-CREATE TABLE dt_relation_temp(objto int);ALTER TABLE dt_relation_temp ADD COLUMN infos json null comment'关系信息点'AFTER`objto`;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(a varchar(20))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(a varchar(20) CHARSET ascii)+ changeType: 0want:- status: 2code: 414@@ -26,7 +15,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book ADD COLUMN a varchar(20) CHARSET ascii+ changeType: 0want:- status: 2code: 414@@ -36,7 +27,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book MODIFY COLUMN id varchar(20) CHARSET ascii+ changeType: 0want:- status: 2code: 414@@ -46,7 +39,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book CHANGE COLUMN name name varchar(20) CHARSET ascii+ changeType: 0want:- status: 2code: 414@@ -56,3 +51,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/column_maximum_character_length.yaml b/backend/plugin/advisor/tidb/test/column_maximum_character_length.yamlindex 27b57a5a98..61f38c3fa4 100644--- a/backend/plugin/advisor/tidb/test/column_maximum_character_length.yaml+++ b/backend/plugin/advisor/tidb/test/column_maximum_character_length.yaml@@ -1,20 +1,9 @@- statement: CREATE TABLE t(name char(20));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(name varchar(225));- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(name char(225));+ changeType: 0want:- status: 2code: 415@@ -24,7 +13,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book ADD COLUMN name_2 char(225)+ changeType: 0want:- status: 2code: 415@@ -34,7 +25,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book CHANGE COLUMN name name char(225)+ changeType: 0want:- status: 2code: 415@@ -44,7 +37,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book MODIFY COLUMN name char(225)+ changeType: 0want:- status: 2code: 415@@ -54,3 +49,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/column_no_null.yaml b/backend/plugin/advisor/tidb/test/column_no_null.yamlindex 29c9dff49e..014bc275db 100644--- a/backend/plugin/advisor/tidb/test/column_no_null.yaml+++ b/backend/plugin/advisor/tidb/test/column_no_null.yaml@@ -2,6 +2,7 @@CREATE TABLE book(id int,name varchar(255))+ changeType: 0want:- status: 2code: 402@@ -11,6 +12,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 402title: column.no-null@@ -19,7 +21,9 @@startposition:line: 3column: 0+ endposition: null- statement: CREATE TABLE book(id int PRIMARY KEY, name varchar(255))+ changeType: 0want:- status: 2code: 402@@ -29,7 +33,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE book(id int NOT NULL, name varchar(255))+ changeType: 0want:- status: 2code: 402@@ -39,17 +45,13 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE book(id int PRIMARY KEY, name varchar(255) NOT NULL)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(a int NOT NULL);ALTER TABLE book ADD COLUMN (id int, name varchar(255) NOT NULL);+ changeType: 0want:- status: 2code: 402@@ -59,19 +61,15 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE book(a int NOT NULL);ALTER TABLE book ADD COLUMN (id int PRIMARY KEY, name varchar(255) NOT NULL);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(id int NOT NULL);ALTER TABLE book CHANGE COLUMN id name varchar(255);+ changeType: 0want:- status: 2code: 402@@ -81,13 +79,8 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE book(id int NOT NULL);ALTER TABLE book CHANGE COLUMN id name varchar(255) NOT NULL;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/tidb/test/column_require_default.yaml b/backend/plugin/advisor/tidb/test/column_require_default.yamlindex 9bc061d303..067bad6a8f 100644--- a/backend/plugin/advisor/tidb/test/column_require_default.yaml+++ b/backend/plugin/advisor/tidb/test/column_require_default.yaml@@ -1,16 +1,11 @@- statement: CREATE TABLE t(a int primary key, b int default 1)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a int,b int default 1)+ changeType: 0want:- status: 2code: 420@@ -20,10 +15,12 @@startposition:line: 2column: 0+ endposition: null- statement: |-ALTER TABLE tech_book ADD COLUMN a BLOB;ALTER TABLE tech_book ADD COLUMN b timestamp;ALTER TABLE tech_book MODIFY COLUMN a varchar(220);+ changeType: 0want:- status: 2code: 420@@ -33,6 +30,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 420title: column.require-default@@ -41,3 +39,4 @@startposition:line: 3column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/column_required.yaml b/backend/plugin/advisor/tidb/test/column_required.yamlindex c23d786f82..5c69bfdf18 100644--- a/backend/plugin/advisor/tidb/test/column_required.yaml+++ b/backend/plugin/advisor/tidb/test/column_required.yaml@@ -1,4 +1,5 @@- statement: CREATE TABLE book(id int)+ changeType: 0want:- status: 2code: 401@@ -8,6 +9,7 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE book(id int,@@ -15,13 +17,7 @@created_ts timestamp,updater_id int,updated_ts timestamp)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(id int,@@ -30,6 +26,7 @@updater_id int,updated_ts timestamp);ALTER TABLE book RENAME COLUMN creator_id TO creator;+ changeType: 0want:- status: 2code: 401@@ -39,6 +36,7 @@startposition:line: 7column: 0+ endposition: null- statement: |-CREATE TABLE book(id int,@@ -47,13 +45,7 @@updater_id int,updated_ts timestamp);ALTER TABLE book RENAME COLUMN creator TO creator_id;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(id int,@@ -62,6 +54,7 @@updater_id int,updated_ts timestamp);ALTER TABLE book CHANGE COLUMN creator_id creator int;+ changeType: 0want:- status: 2code: 401@@ -71,6 +64,7 @@startposition:line: 7column: 0+ endposition: null- statement: |-CREATE TABLE book(id int,@@ -79,13 +73,7 @@updater_id int,updated_ts timestamp);ALTER TABLE book CHANGE COLUMN creator creator_id int;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(id int,@@ -94,6 +82,7 @@updater_id int,updated_ts timestamp);ALTER TABLE book DROP COLUMN creator_id;+ changeType: 0want:- status: 2code: 401@@ -103,6 +92,7 @@startposition:line: 7column: 0+ endposition: null- statement: |-CREATE TABLE book(id int,@@ -112,13 +102,7 @@updated_ts timestamp,content varchar(255));ALTER TABLE book DROP COLUMN content;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(id int,@@ -126,6 +110,7 @@created_ts timestamp,updated_ts timestamp);ALTER TABLE book ADD COLUMN content varchar(255);+ changeType: 0want:- status: 2code: 401@@ -135,6 +120,7 @@startposition:line: 5column: 0+ endposition: null- statement: |-CREATE TABLE book(id int,@@ -143,13 +129,7 @@updater_id int,updated_ts timestamp);ALTER TABLE book ADD COLUMN creator_id int;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(id int,@@ -160,6 +140,7 @@id int,created_ts timestamp,updated_ts timestamp)+ changeType: 0want:- status: 2code: 401@@ -169,6 +150,7 @@startposition:line: 5column: 0+ endposition: null- status: 2code: 401title: column.required@@ -177,6 +159,7 @@startposition:line: 9column: 0+ endposition: null- statement: |-CREATE TABLE book(id int,@@ -185,10 +168,4 @@updater_id int,updated_ts timestamp);DROP TABLE book;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/tidb/test/column_set_default_for_not_null.yaml b/backend/plugin/advisor/tidb/test/column_set_default_for_not_null.yamlindex 46ef28ca09..176a487ab6 100644--- a/backend/plugin/advisor/tidb/test/column_set_default_for_not_null.yaml+++ b/backend/plugin/advisor/tidb/test/column_set_default_for_not_null.yaml@@ -2,28 +2,17 @@CREATE TABLE book(id int PRIMARY KEY DEFAULT 0)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(id int PRIMARY KEY)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(id int NOT NULL)+ changeType: 0want:- status: 2code: 404@@ -33,31 +22,21 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE book(id int,PRIMARY KEY (id))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(a int);ALTER TABLE book ADD COLUMN id int PRIMARY KEY- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(a int);ALTER TABLE book ADD COLUMN id int NOT NULL+ changeType: 0want:- status: 2code: 404@@ -67,9 +46,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE book(id int);ALTER TABLE book MODIFY COLUMN id int NOT NULL+ changeType: 0want:- status: 2code: 404@@ -79,29 +60,19 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE book(id int);ALTER TABLE book MODIFY COLUMN id int PRIMARY KEY- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(uid int);ALTER TABLE book CHANGE COLUMN uid id int PRIMARY KEY- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(uid int);ALTER TABLE book CHANGE COLUMN uid id int NOT NULL+ changeType: 0want:- status: 2code: 404@@ -111,11 +82,6 @@startposition:line: 2column: 0+ endposition: null- statement: "\n\t\t\t\tCREATE TABLE book(uid int, id int);\n\t\t\t\tALTER TABLE book \n\t\t\t\t\tCHANGE COLUMN uid uid int NOT NULL DEFAULT 0,\n\t\t\t\t\tMODIFY COLUMN id int PRIMARY KEY DEFAULT 0,\n\t\t\t\t\tADD COLUMN name varchar(20) NOT NULL DEFAULT ''\n\t\t\t\t"- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/tidb/test/column_type_disallow_list.yaml b/backend/plugin/advisor/tidb/test/column_type_disallow_list.yamlindex b1da7c7f9e..7a34c71324 100644--- a/backend/plugin/advisor/tidb/test/column_type_disallow_list.yaml+++ b/backend/plugin/advisor/tidb/test/column_type_disallow_list.yaml@@ -1,12 +1,7 @@- statement: CREATE TABLE t(a int)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(a JSON, b BLOB, c TEXT)+ changeType: 0want:- status: 2code: 411@@ -16,9 +11,11 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE t(d int);ALTER TABLE t add COLUMN (a JSON, b BLOB, c TEXT)+ changeType: 0want:- status: 2code: 411@@ -28,9 +25,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(c int, b int);ALTER TABLE t CHANGE COLUMN c a JSON, MODIFY b BLOB+ changeType: 0want:- status: 2code: 411@@ -40,3 +39,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/database_drop_empty_database.yaml b/backend/plugin/advisor/tidb/test/database_drop_empty_database.yamlindex d2cd6cdea6..f15fb8b751 100644--- a/backend/plugin/advisor/tidb/test/database_drop_empty_database.yaml+++ b/backend/plugin/advisor/tidb/test/database_drop_empty_database.yaml@@ -1,4 +1,5 @@- statement: DROP DATABASE IF EXISTS test+ changeType: 0want:- status: 2code: 701@@ -8,3 +9,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/index_key_number_limit.yaml b/backend/plugin/advisor/tidb/test/index_key_number_limit.yamlindex 7fb624d864..decfa262d6 100644--- a/backend/plugin/advisor/tidb/test/index_key_number_limit.yaml+++ b/backend/plugin/advisor/tidb/test/index_key_number_limit.yaml@@ -1,16 +1,11 @@- statement: CREATE TABLE t(a int, b int, primary key (a, b))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a int,b int,primary key pk (a, b, b, b, b, b, b))+ changeType: 0want:- status: 2code: 802@@ -20,9 +15,11 @@startposition:line: 4column: 0+ endposition: null- statement: |-CREATE TABLE t(a int, b int, c int, d int, e int, f int, g int);CREATE INDEX idx ON t(a, b, c, d, e, f, g)+ changeType: 0want:- status: 2code: 802@@ -32,9 +29,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int, b int, c int, d int, e int, f int, g int);ALTER TABLE t ADD UNIQUE KEY uk (a, b, c, d, e, f, g)+ changeType: 0want:- status: 2code: 802@@ -44,9 +43,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int, b int, c int, d int, e int, f int, g int);ALTER TABLE t ADD FOREIGN KEY uk (a, b, c, d, e, f, g) REFERENCES t1(a, b, c, d, e, f, g)+ changeType: 0want:- status: 2code: 802@@ -56,3 +57,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/index_no_duplicate_column.yaml b/backend/plugin/advisor/tidb/test/index_no_duplicate_column.yamlindex 2ee2f43a08..86dca9e855 100644--- a/backend/plugin/advisor/tidb/test/index_no_duplicate_column.yaml+++ b/backend/plugin/advisor/tidb/test/index_no_duplicate_column.yaml@@ -1,15 +1,10 @@- statement: CREATE TABLE t (a int, PRIMARY KEY (a))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t (a int,INDEX idx_a (a, a))+ changeType: 0want:- status: 2code: 812@@ -19,9 +14,11 @@startposition:line: 3column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);CREATE INDEX idx_a on t(a, a)+ changeType: 0want:- status: 2code: 812@@ -31,9 +28,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD INDEX idx_a (a, a)+ changeType: 0want:- status: 2code: 812@@ -43,9 +42,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD PRIMARY KEY pk_a (a, a)+ changeType: 0want:- status: 2code: 812@@ -55,9 +56,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD UNIQUE KEY uk_a (a, a)+ changeType: 0want:- status: 2code: 812@@ -67,9 +70,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD FOREIGN KEY fk_a (a, a) REFERENCES t1(a, b)+ changeType: 0want:- status: 2code: 812@@ -79,3 +84,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/index_pk_type_limit.yaml b/backend/plugin/advisor/tidb/test/index_pk_type_limit.yamlindex 159a70387a..6abeed821e 100644--- a/backend/plugin/advisor/tidb/test/index_pk_type_limit.yaml+++ b/backend/plugin/advisor/tidb/test/index_pk_type_limit.yaml@@ -1,4 +1,5 @@- statement: CREATE TABLE t(id VARCHAR(5) PRIMARY KEY)+ changeType: 0want:- status: 2code: 803@@ -8,15 +9,11 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(id INT PRIMARY KEY)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(id VARCHAR(5), PRIMARY KEY(id))+ changeType: 0want:- status: 2code: 803@@ -26,7 +23,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(id INT, id2 VARCHAR(5), id3 VARCHAR(5), PRIMARY KEY(id, id2, id3))+ changeType: 0want:- status: 2code: 803@@ -36,6 +35,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 803title: index.pk-type-limit@@ -44,25 +44,15 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(id INT, id2 BIGINT, PRIMARY KEY(id, id2))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(id INT, PRIMARY KEY(id))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id VARCHAR(5) PRIMARY KEY+ changeType: 0want:- status: 2code: 803@@ -72,19 +62,15 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id INT PRIMARY KEY- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id VARCHAR(5), ADD PRIMARY KEY (id)+ changeType: 0want:- status: 2code: 803@@ -94,9 +80,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id INT, ADD COLUMN id2 VARCHAR(5), ADD COLUMN id3 VARCHAR(5), ADD PRIMARY KEY (id, id2, id3)+ changeType: 0want:- status: 2code: 803@@ -106,6 +94,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 803title: index.pk-type-limit@@ -114,29 +103,19 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id INT, ADD COLUMN id2 BIGINT, ADD PRIMARY KEY (id, id2)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id BIGINT, ADD PRIMARY KEY (id)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(id VARCHAR(5));ALTER TABLE t ADD PRIMARY KEY(id);+ changeType: 0want:- status: 2code: 803@@ -146,9 +125,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(id INT, id2 VARCHAR(5), id3 VARCHAR(5));ALTER TABLE t ADD PRIMARY KEY(id, id2, id3);+ changeType: 0want:- status: 2code: 803@@ -158,6 +139,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 803title: index.pk-type-limit@@ -166,29 +148,19 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(id INT, id2 BIGINT);ALTER TABLE t ADD PRIMARY KEY(id, id2);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(id BIGINT);ALTER TABLE t ADD PRIMARY KEY(id);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(id int);ALTER TABLE t MODIFY COLUMN id VARCHAR(5) PRIMARY KEY;+ changeType: 0want:- status: 2code: 803@@ -198,19 +170,15 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(id int);ALTER TABLE t MODIFY COLUMN id INT(5) PRIMARY KEY;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(id int);ALTER TABLE t CHANGE COLUMN id id2 VARCHAR(5) PRIMARY KEY+ changeType: 0want:- status: 2code: 803@@ -220,13 +188,8 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(id int);ALTER TABLE t CHANGE COLUMN id id2 INT(5) PRIMARY KEY- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/tidb/test/index_primary_key_type_allowlist.yaml b/backend/plugin/advisor/tidb/test/index_primary_key_type_allowlist.yamlindex c6e5edff56..771d55f7a5 100644--- a/backend/plugin/advisor/tidb/test/index_primary_key_type_allowlist.yaml+++ b/backend/plugin/advisor/tidb/test/index_primary_key_type_allowlist.yaml@@ -1,4 +1,5 @@- statement: CREATE TABLE t(id VARCHAR(5) PRIMARY KEY)+ changeType: 0want:- status: 2code: 803@@ -8,15 +9,11 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(id INT PRIMARY KEY)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(id VARCHAR(5), PRIMARY KEY(id))+ changeType: 0want:- status: 2code: 803@@ -26,7 +23,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(id INT, id2 VARCHAR(5), id3 VARCHAR(5), PRIMARY KEY(id, id2, id3))+ changeType: 0want:- status: 2code: 803@@ -36,6 +35,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 803title: index.primary-key-type-allowlist@@ -44,25 +44,15 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(id INT, id2 BIGINT, PRIMARY KEY(id, id2))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(id INT, PRIMARY KEY(id))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id VARCHAR(5) PRIMARY KEY+ changeType: 0want:- status: 2code: 803@@ -72,19 +62,15 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id INT PRIMARY KEY- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id VARCHAR(5), ADD PRIMARY KEY (id)+ changeType: 0want:- status: 2code: 803@@ -94,9 +80,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id INT, ADD COLUMN id2 VARCHAR(5), ADD COLUMN id3 VARCHAR(5), ADD PRIMARY KEY (id, id2, id3)+ changeType: 0want:- status: 2code: 803@@ -106,6 +94,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 803title: index.primary-key-type-allowlist@@ -114,29 +103,19 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id INT, ADD COLUMN id2 BIGINT, ADD PRIMARY KEY (id, id2)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN id BIGINT, ADD PRIMARY KEY (id)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(id VARCHAR(5));ALTER TABLE t ADD PRIMARY KEY(id);+ changeType: 0want:- status: 2code: 803@@ -146,9 +125,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(id INT, id2 VARCHAR(5), id3 VARCHAR(5));ALTER TABLE t ADD PRIMARY KEY(id, id2, id3);+ changeType: 0want:- status: 2code: 803@@ -158,6 +139,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 803title: index.primary-key-type-allowlist@@ -166,29 +148,19 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(id INT, id2 BIGINT);ALTER TABLE t ADD PRIMARY KEY(id, id2);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(id BIGINT);ALTER TABLE t ADD PRIMARY KEY(id);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(id int);ALTER TABLE t MODIFY COLUMN id VARCHAR(5) PRIMARY KEY;+ changeType: 0want:- status: 2code: 803@@ -198,19 +170,15 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(id int);ALTER TABLE t MODIFY COLUMN id INT(5) PRIMARY KEY;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(id int);ALTER TABLE t CHANGE COLUMN id id2 VARCHAR(5) PRIMARY KEY+ changeType: 0want:- status: 2code: 803@@ -220,13 +188,8 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(id int);ALTER TABLE t CHANGE COLUMN id id2 INT(5) PRIMARY KEY- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/tidb/test/index_total_number_limit.yaml b/backend/plugin/advisor/tidb/test/index_total_number_limit.yamlindex 2ee4ea04b9..e3cce7a971 100644--- a/backend/plugin/advisor/tidb/test/index_total_number_limit.yaml+++ b/backend/plugin/advisor/tidb/test/index_total_number_limit.yaml@@ -1,25 +1,14 @@- statement: CREATE TABLE t(a int, b int, c int, unique key(a, b, c))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE INDEX idx_id_name on tech_book(id, name)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE INDEX idx_id_name_1 on tech_book(id, name);CREATE INDEX idx_id_name_2 on tech_book(id, name);CREATE INDEX idx_id_name_3 on tech_book(id, name);CREATE INDEX idx_id_name_4 on tech_book(id, name);CREATE INDEX idx_id_name_5 on tech_book(id, name);+ changeType: 0want:- status: 2code: 813@@ -29,6 +18,7 @@startposition:line: 5column: 0+ endposition: null- statement: |-CREATE TABLE t(a int PRIMARY KEY, b int, c int);CREATE INDEX idx_a_b_1 on t(a, b);@@ -36,6 +26,7 @@CREATE INDEX idx_a_b_3 on t(a, b);CREATE INDEX idx_a_b_4 on t(a, b);CREATE INDEX idx_a_b_5 on t(a, b);+ changeType: 0want:- status: 2code: 813@@ -45,6 +36,7 @@startposition:line: 6column: 0+ endposition: null- statement: |-CREATE TABLE t(a int PRIMARY KEY,@@ -55,6 +47,7 @@INDEX idx_a_b_3 (a, b),INDEX idx_a_b_4 (a, b),INDEX idx_a_b_5 (a, b));+ changeType: 0want:- status: 2code: 813@@ -64,3 +57,4 @@startposition:line: 9column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/index_type_no_blob.yaml b/backend/plugin/advisor/tidb/test/index_type_no_blob.yamlindex dc0378f9c3..1f55f4b7c6 100644--- a/backend/plugin/advisor/tidb/test/index_type_no_blob.yaml+++ b/backend/plugin/advisor/tidb/test/index_type_no_blob.yaml@@ -1,4 +1,5 @@- statement: CREATE TABLE t(b BLOB, PRIMARY KEY(b(10)))+ changeType: 0want:- status: 2code: 804@@ -8,7 +9,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(b BLOB, mb MEDIUMBLOB, lb LONGBLOB, id INT, PRIMARY KEY(b(1), mb(2), lb(3), id))+ changeType: 0want:- status: 2code: 804@@ -18,6 +21,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 804title: index.type-no-blob@@ -26,6 +30,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 804title: index.type-no-blob@@ -34,7 +39,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(b BLOB, mb MEDIUMBLOB, lb LONGBLOB, id INT, UNIQUE INDEX(b(1), mb(2), lb(3), id))+ changeType: 0want:- status: 2code: 804@@ -44,6 +51,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 804title: index.type-no-blob@@ -52,6 +60,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 804title: index.type-no-blob@@ -60,7 +69,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(b BLOB, mb MEDIUMBLOB, lb LONGBLOB, id iNT, INDEX(b(1), mb(2), lb(3), id))+ changeType: 0want:- status: 2code: 804@@ -70,6 +81,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 804title: index.type-no-blob@@ -78,6 +90,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 804title: index.type-no-blob@@ -86,17 +99,13 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(id INT, PRIMARY KEY(id))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN b BLOB, ADD COLUMN id INT, ADD PRIMARY KEY(b(1), id)+ changeType: 0want:- status: 2code: 804@@ -106,9 +115,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN b BLOB, ADD COLUMN mb MEDIUMBLOB, ADD COLUMN lb LONGBLOB, ADD COLUMN id INT, ADD UNIQUE INDEX(b(1), mb(2), lb(3), id)+ changeType: 0want:- status: 2code: 804@@ -118,6 +129,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 804title: index.type-no-blob@@ -126,6 +138,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 804title: index.type-no-blob@@ -134,9 +147,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN b BLOB, ADD COLUMN mb MEDIUMBLOB, ADD COLUMN lb LONGBLOB, ADD COLUMN id INT, ADD INDEX(b(1), mb(2), lb(3), id)+ changeType: 0want:- status: 2code: 804@@ -146,6 +161,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 804title: index.type-no-blob@@ -154,6 +170,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 804title: index.type-no-blob@@ -162,22 +179,18 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t ADD COLUMN b BLOB, ADD COLUMN mb MEDIUMBLOB, ADD COLUMN lb LONGBLOB, ADD COLUMN id INT, ADD INDEX(id)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(b blob, mb mediumblob, lb longblob, id int);CREATE INDEX idx_b ON t(b(5));CREATE INDEX idx_mb ON t(mb(5));CREATE INDEX idx_lb ON t(lb(5));CREATE INDEX idx_id ON t(id);+ changeType: 0want:- status: 2code: 804@@ -187,6 +200,7 @@startposition:line: 2column: 0+ endposition: null- status: 2code: 804title: index.type-no-blob@@ -195,6 +209,7 @@startposition:line: 3column: 0+ endposition: null- status: 2code: 804title: index.type-no-blob@@ -203,13 +218,8 @@startposition:line: 4column: 0+ endposition: null- statement: |-CREATE TABLE t(b blob, mb mediumblob, lb longblob, id int);CREATE INDEX idx_id ON t(id);- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/tidb/test/naming_column.yaml b/backend/plugin/advisor/tidb/test/naming_column.yamlindex 79c69d7e06..f2f72810f2 100644--- a/backend/plugin/advisor/tidb/test/naming_column.yaml+++ b/backend/plugin/advisor/tidb/test/naming_column.yaml@@ -1,4 +1,5 @@- statement: CREATE TABLE book(id int, creatorId int)+ changeType: 0want:- status: 2code: 302@@ -8,7 +9,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE book(id int, gbhzmtchhsjzyrhdroxmyouwloxqezowdvhcbqalqcgqhfbjnvmhwrbggezmzeusx int)+ changeType: 0want:- status: 2code: 302@@ -18,17 +21,13 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE book(id int, creator_id int)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(id int, creator_id int);ALTER TABLE book RENAME COLUMN creator_id TO creatorId+ changeType: 0want:- status: 2code: 302@@ -38,14 +37,9 @@startposition:line: 2column: 0+ endposition: null- statement: ALTER TABLE tech_book RENAME COLUMN id TO creator_id;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(id int,@@ -54,6 +48,7 @@updater_id int,updated_ts timestamp);ALTER TABLE book CHANGE COLUMN creator_id creatorId int;+ changeType: 0want:- status: 2code: 302@@ -63,22 +58,11 @@startposition:line: 7column: 0+ endposition: null- statement: ALTER TABLE tech_book CHANGE COLUMN id creator_id int;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book DROP COLUMN id;- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE book(id int,@@ -86,6 +70,7 @@created_ts timestamp,updated_ts timestamp);ALTER TABLE book ADD COLUMN contentString varchar(255);+ changeType: 0want:- status: 2code: 302@@ -95,6 +80,7 @@startposition:line: 6column: 0+ endposition: null- statement: |-CREATE TABLE book(id int,@@ -105,6 +91,7 @@id int,createdTs timestamp,updatedTs timestamp);+ changeType: 0want:- status: 2code: 302@@ -114,6 +101,7 @@startposition:line: 3column: 0+ endposition: null- status: 2code: 302title: naming.column@@ -122,6 +110,7 @@startposition:line: 4column: 0+ endposition: null- status: 2code: 302title: naming.column@@ -130,6 +119,7 @@startposition:line: 8column: 0+ endposition: null- status: 2code: 302title: naming.column@@ -138,3 +128,4 @@startposition:line: 9column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/naming_column_auto_increment.yaml b/backend/plugin/advisor/tidb/test/naming_column_auto_increment.yamlindex cf33e687b3..fc227ca465 100644--- a/backend/plugin/advisor/tidb/test/naming_column_auto_increment.yaml+++ b/backend/plugin/advisor/tidb/test/naming_column_auto_increment.yaml@@ -1,12 +1,7 @@- statement: CREATE TABLE book(id int AUTO_INCREMENT)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE book(a int AUTO_INCREMENT)+ changeType: 0want:- status: 2code: 307@@ -16,7 +11,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book ADD COLUMN a int AUTO_INCREMENT+ changeType: 0want:- status: 2code: 307@@ -26,7 +23,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book CHANGE COLUMN id a int AUTO_INCREMENT+ changeType: 0want:- status: 2code: 307@@ -36,7 +35,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book MODIFY COLUMN name int AUTO_INCREMENT+ changeType: 0want:- status: 2code: 307@@ -46,3 +47,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/naming_index_fk.yaml b/backend/plugin/advisor/tidb/test/naming_index_fk.yamlindex c500e15f2a..d26f183353 100644--- a/backend/plugin/advisor/tidb/test/naming_index_fk.yaml+++ b/backend/plugin/advisor/tidb/test/naming_index_fk.yaml@@ -1,12 +1,7 @@- statement: ALTER TABLE tech_book ADD CONSTRAINT fk_tech_book_author_id_author_id FOREIGN KEY (author_id) REFERENCES author (id)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book ADD CONSTRAINT fk_author_id FOREIGN KEY (author_id) REFERENCES author (id)+ changeType: 0want:- status: 2code: 305@@ -16,7 +11,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book ADD CONSTRAINT rvemempmcmmhutaskvcidmwaldtfjdgmcpkhmibtadfydtkexpuzczrrneucthfwk FOREIGN KEY (author_id) REFERENCES author (id)+ changeType: 0want:- status: 2code: 305@@ -26,6 +23,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 305title: naming.index.fk@@ -34,23 +32,13 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE book(id INT, author_id INT, FOREIGN KEY fk_book_author_id_author_id (author_id) REFERENCES author (id))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE book(id INT, author_id INT, FOREIGN KEY (author_id) REFERENCES author (id))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE book(id INT, author_id INT, FOREIGN KEY fk_book_author_id (author_id) REFERENCES author (id))+ changeType: 0want:- status: 2code: 305@@ -60,3 +48,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/naming_index_idx.yaml b/backend/plugin/advisor/tidb/test/naming_index_idx.yamlindex eaa23b6793..b8ded7db57 100644--- a/backend/plugin/advisor/tidb/test/naming_index_idx.yaml+++ b/backend/plugin/advisor/tidb/test/naming_index_idx.yaml@@ -1,12 +1,7 @@- statement: CREATE INDEX idx_tech_book_id_name ON tech_book(id, name)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE INDEX tech_book_id_name ON tech_book(id, name)+ changeType: 0want:- status: 2code: 303@@ -16,7 +11,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE INDEX afvjwsgrbgqzjfrkmbcoxzstznuypasijbbcdykoboredqovetzfcmmqliaelyavw ON tech_book(id, name)+ changeType: 0want:- status: 2code: 303@@ -26,6 +23,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 303title: naming.index.idx@@ -34,15 +32,11 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book RENAME INDEX old_index TO idx_tech_book_id_name- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book RENAME INDEX old_index TO idx_tech_book+ changeType: 0want:- status: 2code: 303@@ -52,15 +46,11 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book ADD INDEX idx_tech_book_id_name (id, name)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book ADD INDEX tech_book_id_name (id, name)+ changeType: 0want:- status: 2code: 303@@ -70,19 +60,8 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE tech_book_copy(id INT PRIMARY KEY, name VARCHAR(20), INDEX idx_tech_book_copy_name (name))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE tech_book_copy(id INT PRIMARY KEY, name VARCHAR(20), INDEX (name))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/tidb/test/naming_index_uk.yaml b/backend/plugin/advisor/tidb/test/naming_index_uk.yamlindex 6b0d29071a..3e562c0d8d 100644--- a/backend/plugin/advisor/tidb/test/naming_index_uk.yaml+++ b/backend/plugin/advisor/tidb/test/naming_index_uk.yaml@@ -1,12 +1,7 @@- statement: CREATE UNIQUE INDEX uk_tech_book_id_name ON tech_book(id, name)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE UNIQUE INDEX tech_book_id_name ON tech_book(id, name)+ changeType: 0want:- status: 2code: 304@@ -16,7 +11,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE UNIQUE INDEX qtzmquwvlnttctfluoouxelxeliltcfzzstrtyocogwwyiyrflmrkbhbfasynlacy ON tech_book(id, name)+ changeType: 0want:- status: 2code: 304@@ -26,6 +23,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 304title: naming.index.uk@@ -34,15 +32,11 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book ADD UNIQUE uk_tech_book_id_name (id, name)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book ADD UNIQUE tech_book_id_name (id, name)+ changeType: 0want:- status: 2code: 304@@ -52,15 +46,11 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book RENAME INDEX old_uk TO uk_tech_book_id_name- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book RENAME INDEX old_uk TO uk_tech_book+ changeType: 0want:- status: 2code: 304@@ -70,27 +60,10 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE book(id INT PRIMARY KEY, name VARCHAR(20), UNIQUE INDEX uk_book_name (name))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE book(id INT PRIMARY KEY, name VARCHAR(20), UNIQUE KEY (name))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE book(id INT PRIMARY KEY, name VARCHAR(20), UNIQUE INDEX (name))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/tidb/test/naming_table.yaml b/backend/plugin/advisor/tidb/test/naming_table.yamlindex 4270f00b12..726be80023 100644--- a/backend/plugin/advisor/tidb/test/naming_table.yaml+++ b/backend/plugin/advisor/tidb/test/naming_table.yaml@@ -1,4 +1,5 @@- statement: CREATE TABLE techBook(id int, name varchar(255))+ changeType: 0want:- status: 2code: 301@@ -8,15 +9,11 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE tech_book_copy(id int, name varchar(255))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE cjnubexocfhqoogdmihudyahmmghviqkzvpixnwvxtxumvuannpwdcbtsgwrvzpde(id int, name varchar(255))+ changeType: 0want:- status: 2code: 301@@ -26,7 +23,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book RENAME TO TechBook+ changeType: 0want:- status: 2code: 301@@ -36,15 +35,11 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book RENAME TO tech_book_copy- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: RENAME TABLE tech_book TO tech_book_copy, tech_book_copy TO LiteraryBook+ changeType: 0want:- status: 2code: 301@@ -54,7 +49,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE literary_book(a int);RENAME TABLE tech_book TO TechBook, literary_book TO LiteraryBook+ changeType: 0want:- status: 2code: 301@@ -64,6 +61,7 @@startposition:line: 1column: 0+ endposition: null- status: 2code: 301title: naming.table@@ -72,11 +70,6 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE literary_book(a int);RENAME TABLE tech_book TO tech_book_copy, literary_book TO literary_book_copy- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/tidb/test/schema_backward_compatibility.yaml b/backend/plugin/advisor/tidb/test/schema_backward_compatibility.yamlindex 2095297d09..2c1692c55e 100644--- a/backend/plugin/advisor/tidb/test/schema_backward_compatibility.yaml+++ b/backend/plugin/advisor/tidb/test/schema_backward_compatibility.yaml@@ -1,4 +1,5 @@- statement: ALTER TABLE tech_book CHANGE name f2 TEXT+ changeType: 0want:- status: 2code: 111@@ -8,7 +9,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book MODIFY name TEXT+ changeType: 0want:- status: 2code: 111@@ -18,7 +21,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book MODIFY name TEXT NULL+ changeType: 0want:- status: 2code: 111@@ -28,7 +33,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book MODIFY name TEXT NOT NULL+ changeType: 0want:- status: 2code: 111@@ -38,7 +45,9 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book MODIFY name TEXT COMMENT 'bla'+ changeType: 0want:- status: 2code: 111@@ -48,3 +57,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/statement_disallow_commit.yaml b/backend/plugin/advisor/tidb/test/statement_disallow_commit.yamlindex 00970f21b7..806ff53e06 100644--- a/backend/plugin/advisor/tidb/test/statement_disallow_commit.yaml+++ b/backend/plugin/advisor/tidb/test/statement_disallow_commit.yaml@@ -2,6 +2,7 @@START TRANSACTION;CREATE TABLE techBook(id int, name varchar(255));COMMIT;+ changeType: 0want:- status: 2code: 206@@ -11,6 +12,7 @@startposition:line: 3column: 0+ endposition: null- statement: |-START TRANSACTION;CREATE TABLE techBook(id int, name varchar(255));@@ -19,6 +21,7 @@START TRANSACTION;INSERT INTO techBook(id, name) VALUES(1, "book");COMMIT;+ changeType: 0want:- status: 2code: 206@@ -28,6 +31,7 @@startposition:line: 3column: 0+ endposition: null- status: 2code: 206title: statement.disallow-commit@@ -36,3 +40,4 @@startposition:line: 7column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/statement_disallow_limit.yaml b/backend/plugin/advisor/tidb/test/statement_disallow_limit.yamlindex 68fef9cda5..abb681575b 100644--- a/backend/plugin/advisor/tidb/test/statement_disallow_limit.yaml+++ b/backend/plugin/advisor/tidb/test/statement_disallow_limit.yaml@@ -1,12 +1,7 @@- statement: ""- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: INSERT INTO tech_book SELECT * FROM tech_book LIMIT 1+ changeType: 0want:- status: 2code: 1103@@ -16,7 +11,9 @@startposition:line: 1column: 0+ endposition: null- statement: INSERT INTO tech_book SELECT * FROM tech_book UNION SELECT * FROM tech_book LIMIT 1+ changeType: 0want:- status: 2code: 1103@@ -26,7 +23,9 @@startposition:line: 1column: 0+ endposition: null- statement: UPDATE tech_book SET name = 'my name' LIMIT 10+ changeType: 0want:- status: 2code: 1102@@ -36,7 +35,9 @@startposition:line: 1column: 0+ endposition: null- statement: DELETE FROM tech_book LIMIT 10+ changeType: 0want:- status: 2code: 1106@@ -46,3 +47,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/statement_disallow_order_by.yaml b/backend/plugin/advisor/tidb/test/statement_disallow_order_by.yamlindex 0e61539404..88223c5049 100644--- a/backend/plugin/advisor/tidb/test/statement_disallow_order_by.yaml+++ b/backend/plugin/advisor/tidb/test/statement_disallow_order_by.yaml@@ -1,12 +1,7 @@- statement: INSERT INTO tech_book values(1, 'a')- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: UPDATE tech_book SET name = 'my name' ORDER BY id+ changeType: 0want:- status: 2code: 1104@@ -16,7 +11,9 @@startposition:line: 1column: 0+ endposition: null- statement: DELETE FROM tech_book ORDER BY id+ changeType: 0want:- status: 2code: 1105@@ -26,3 +23,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/statement_dml_dry_run.yaml b/backend/plugin/advisor/tidb/test/statement_dml_dry_run.yamlindex b00f58a6f4..68885e98ba 100644--- a/backend/plugin/advisor/tidb/test/statement_dml_dry_run.yaml+++ b/backend/plugin/advisor/tidb/test/statement_dml_dry_run.yaml@@ -1,16 +1,4 @@- statement: INSERT INTO tech_book values(1, 'a')- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: DELETE FROM tech_book- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/tidb/test/statement_insert_disallow_order_by_rand.yaml b/backend/plugin/advisor/tidb/test/statement_insert_disallow_order_by_rand.yamlindex c4e44200a1..957420705b 100644--- a/backend/plugin/advisor/tidb/test/statement_insert_disallow_order_by_rand.yaml+++ b/backend/plugin/advisor/tidb/test/statement_insert_disallow_order_by_rand.yaml@@ -1,12 +1,7 @@- statement: INSERT INTO tech_book VALUES(1, "a")- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: INSERT INTO tech_book SELECT * FROM tech_book ORDER BY rand()+ changeType: 0want:- status: 2code: 1108@@ -16,3 +11,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/statement_insert_must_specify_column.yaml b/backend/plugin/advisor/tidb/test/statement_insert_must_specify_column.yamlindex f6ad536e44..72316511c2 100644--- a/backend/plugin/advisor/tidb/test/statement_insert_must_specify_column.yaml+++ b/backend/plugin/advisor/tidb/test/statement_insert_must_specify_column.yaml@@ -1,12 +1,7 @@- statement: INSERT INTO tech_book(id, name) VALUES (1, '1')- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: INSERT INTO tech_book VALUES (1, '1')+ changeType: 0want:- status: 2code: 1107@@ -16,3 +11,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/statement_maximum_limit_value.yaml b/backend/plugin/advisor/tidb/test/statement_maximum_limit_value.yamlindex 92506c1406..341261a746 100644--- a/backend/plugin/advisor/tidb/test/statement_maximum_limit_value.yaml+++ b/backend/plugin/advisor/tidb/test/statement_maximum_limit_value.yaml@@ -1,5 +1,6 @@- statement: |SELECT * FROM employee LIMIT 1000000;+ changeType: 0want:- status: 2code: 222@@ -9,3 +10,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/statement_merge_alter_table.yaml b/backend/plugin/advisor/tidb/test/statement_merge_alter_table.yamlindex 774637ea04..af428f8b91 100644--- a/backend/plugin/advisor/tidb/test/statement_merge_alter_table.yaml+++ b/backend/plugin/advisor/tidb/test/statement_merge_alter_table.yaml@@ -1,14 +1,9 @@- statement: ALTER TABLE tech_book ADD COLUMN a int- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-ALTER TABLE tech_book ADD COLUMN a int;ALTER TABLE tech_book ADD COLUMN b int;+ changeType: 0want:- status: 2code: 207@@ -18,11 +13,13 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE tech_book ADD COLUMN a int;ALTER TABLE t ADD COLUMN b int;ALTER TABLE tech_book ADD COLUMN b int;+ changeType: 0want:- status: 2code: 207@@ -32,6 +29,7 @@startposition:line: 3column: 0+ endposition: null- status: 2code: 207title: statement.merge-alter-table@@ -40,11 +38,13 @@startposition:line: 4column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE tech_book ADD COLUMN a int;ALTER TABLE tech_book ADD COLUMN b int;ALTER TABLE t ADD COLUMN b int;+ changeType: 0want:- status: 2code: 207@@ -54,6 +54,7 @@startposition:line: 3column: 0+ endposition: null- status: 2code: 207title: statement.merge-alter-table@@ -62,3 +63,4 @@startposition:line: 4column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/statement_select_no_select_all.yaml b/backend/plugin/advisor/tidb/test/statement_select_no_select_all.yamlindex 4c38d11ba6..3411a7df03 100644--- a/backend/plugin/advisor/tidb/test/statement_select_no_select_all.yaml+++ b/backend/plugin/advisor/tidb/test/statement_select_no_select_all.yaml@@ -1,4 +1,5 @@- statement: SELECT * FROM t+ changeType: 0want:- status: 2code: 203@@ -8,15 +9,11 @@startposition:line: 1column: 0+ endposition: null- statement: SELECT a, b FROM t- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: SELECT a, b FROM (SELECT * from t1 JOIN t2) t+ changeType: 0want:- status: 2code: 203@@ -26,3 +23,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/statement_where_no_leading_wildcard_like.yaml b/backend/plugin/advisor/tidb/test/statement_where_no_leading_wildcard_like.yamlindex cff6f75cc1..223de58bff 100644--- a/backend/plugin/advisor/tidb/test/statement_where_no_leading_wildcard_like.yaml+++ b/backend/plugin/advisor/tidb/test/statement_where_no_leading_wildcard_like.yaml@@ -1,12 +1,7 @@- statement: SELECT * FROM t WHERE a LIKE 'abc%'- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: SELECT * FROM t WHERE a LIKE '%abc'+ changeType: 0want:- status: 2code: 204@@ -16,7 +11,9 @@startposition:line: 1column: 0+ endposition: null- statement: SELECT * FROM t WHERE a LIKE 'abc' OR a LIKE '%abc'+ changeType: 0want:- status: 2code: 204@@ -26,7 +23,9 @@startposition:line: 1column: 0+ endposition: null- statement: SELECT * FROM t WHERE a LIKE '%acc' OR a LIKE '%abc'+ changeType: 0want:- status: 2code: 204@@ -36,7 +35,9 @@startposition:line: 1column: 0+ endposition: null- statement: SELECT * FROM (SELECT * FROM t WHERE a LIKE '%acc' OR a LIKE '%abc') t1+ changeType: 0want:- status: 2code: 204@@ -46,3 +47,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/statement_where_require.yaml b/backend/plugin/advisor/tidb/test/statement_where_require.yamlindex cce2ea7f50..076dffcc0f 100644--- a/backend/plugin/advisor/tidb/test/statement_where_require.yaml+++ b/backend/plugin/advisor/tidb/test/statement_where_require.yaml@@ -1,12 +1,7 @@- statement: INSERT INTO tech_book(id) values (1)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: DELETE FROM tech_book+ changeType: 0want:- status: 2code: 202@@ -16,7 +11,9 @@startposition:line: 1column: 0+ endposition: null- statement: UPDATE tech_book SET id = 1+ changeType: 0want:- status: 2code: 202@@ -26,23 +23,13 @@startposition:line: 1column: 0+ endposition: null- statement: DELETE FROM tech_book WHERE id > 0- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: UPDATE tech_book SET id = 1 WHERE id > 10- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: SELECT id FROM tech_book+ changeType: 0want:- status: 2code: 202@@ -52,15 +39,11 @@startposition:line: 1column: 0+ endposition: null- statement: SELECT id FROM tech_book WHERE id > 0- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: SELECT id FROM tech_book WHERE id > (SELECT max(id) FROM tech_book)+ changeType: 0want:- status: 2code: 202@@ -70,11 +53,6 @@startposition:line: 1column: 0+ endposition: null- statement: SELECT CURDATE()- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/tidb/test/system_charset_allowlist.yaml b/backend/plugin/advisor/tidb/test/system_charset_allowlist.yamlindex 6217ae7eac..991941b80f 100644--- a/backend/plugin/advisor/tidb/test/system_charset_allowlist.yaml+++ b/backend/plugin/advisor/tidb/test/system_charset_allowlist.yaml@@ -1,20 +1,9 @@- statement: CREATE TABLE t(a int) CHARSET utf8mb4- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(a varchar(255))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(a int) CHARSET ascii+ changeType: 0want:- status: 2code: 1001@@ -24,9 +13,11 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t CHARSET ascii+ changeType: 0want:- status: 2code: 1001@@ -36,7 +27,9 @@startposition:line: 2column: 0+ endposition: null- statement: ALTER DATABASE test CHARSET ascii+ changeType: 0want:- status: 2code: 1001@@ -46,7 +39,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(a varchar(255) CHARSET ascii)+ changeType: 0want:- status: 2code: 1001@@ -56,9 +51,11 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE t(b int);ALTER TABLE t ADD COLUMN a varchar(255) CHARSET ascii+ changeType: 0want:- status: 2code: 1001@@ -68,9 +65,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t MODIFY COLUMN a varchar(255) CHARSET ascii+ changeType: 0want:- status: 2code: 1001@@ -80,9 +79,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t CHANGE COLUMN a a varchar(255) CHARSET ascii+ changeType: 0want:- status: 2code: 1001@@ -92,11 +93,6 @@startposition:line: 2column: 0+ endposition: null- statement: /* this is a comment */- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0diff --git a/backend/plugin/advisor/tidb/test/system_collation_allowlist.yaml b/backend/plugin/advisor/tidb/test/system_collation_allowlist.yamlindex ceb9ec68fb..f971335897 100644--- a/backend/plugin/advisor/tidb/test/system_collation_allowlist.yaml+++ b/backend/plugin/advisor/tidb/test/system_collation_allowlist.yaml@@ -1,4 +1,5 @@- statement: CREATE TABLE t(a int) COLLATE utf8mb4_polish_ci+ changeType: 0want:- status: 2code: 1201@@ -8,15 +9,11 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(a varchar(255))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(a int) COLLATE latin1_bin+ changeType: 0want:- status: 2code: 1201@@ -26,9 +23,11 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t COLLATE latin1_bin+ changeType: 0want:- status: 2code: 1201@@ -38,7 +37,9 @@startposition:line: 2column: 0+ endposition: null- statement: ALTER DATABASE test COLLATE latin1_bin+ changeType: 0want:- status: 2code: 1201@@ -48,7 +49,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(a varchar(255) CHARACTER SET latin1 COLLATE latin1_bin)+ changeType: 0want:- status: 2code: 1201@@ -58,9 +61,11 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE t(b int);ALTER TABLE t ADD COLUMN a varchar(255) CHARACTER SET latin1 COLLATE latin1_bin+ changeType: 0want:- status: 2code: 1201@@ -70,9 +75,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t MODIFY COLUMN a varchar(255) CHARACTER SET latin1 COLLATE latin1_bin+ changeType: 0want:- status: 2code: 1201@@ -82,9 +89,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(a int);ALTER TABLE t CHANGE COLUMN a a varchar(255) CHARACTER SET latin1 COLLATE latin1_bin+ changeType: 0want:- status: 2code: 1201@@ -94,3 +103,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/table_comment.yaml b/backend/plugin/advisor/tidb/test/table_comment.yamlindex 49b3c3ad11..2af50e685a 100644--- a/backend/plugin/advisor/tidb/test/table_comment.yaml+++ b/backend/plugin/advisor/tidb/test/table_comment.yaml@@ -1,4 +1,5 @@- statement: CREATE TABLE t(a int) COMMENT 'some comments'+ changeType: 0want:- status: 2code: 606@@ -8,7 +9,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(a int)+ changeType: 0want:- status: 2code: 605@@ -18,7 +21,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE t(a int) COMMENT 'sdlfkjalkseblkjduafelbnlsdfkljayue'+ changeType: 0want:- status: 2code: 606@@ -28,3 +33,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/table_disallow_partition.yaml b/backend/plugin/advisor/tidb/test/table_disallow_partition.yamlindex 40f12e3ba3..cdd6b22cd4 100644--- a/backend/plugin/advisor/tidb/test/table_disallow_partition.yaml+++ b/backend/plugin/advisor/tidb/test/table_disallow_partition.yaml@@ -1,16 +1,11 @@- statement: CREATE TABLE t(a int)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(a int) PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (6),PARTITION p1 VALUES LESS THAN (11))+ changeType: 0want:- status: 2code: 608@@ -24,11 +19,13 @@startposition:line: 4column: 0+ endposition: null- statement: |-ALTER TABLE tech_book PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (6),PARTITION p1 VALUES LESS THAN (11))+ changeType: 0want:- status: 2code: 608@@ -42,3 +39,4 @@startposition:line: 4column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/table_drop_naming_convention.yaml b/backend/plugin/advisor/tidb/test/table_drop_naming_convention.yamlindex 3e918f85ef..80e1fdc6e5 100644--- a/backend/plugin/advisor/tidb/test/table_drop_naming_convention.yaml+++ b/backend/plugin/advisor/tidb/test/table_drop_naming_convention.yaml@@ -1,12 +1,7 @@- statement: DROP TABLE IF EXISTS foo_delete- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: DROP TABLE IF EXISTS foo+ changeType: 0want:- status: 2code: 603@@ -16,7 +11,9 @@startposition:line: 1column: 0+ endposition: null- statement: DROP TABLE IF EXISTS foo_delete, bar+ changeType: 0want:- status: 2code: 603@@ -26,3 +23,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/table_no_foreign_key.yaml b/backend/plugin/advisor/tidb/test/table_no_foreign_key.yamlindex b9ecbc1fec..45c0796aa3 100644--- a/backend/plugin/advisor/tidb/test/table_no_foreign_key.yaml+++ b/backend/plugin/advisor/tidb/test/table_no_foreign_key.yaml@@ -1,4 +1,5 @@- statement: ALTER TABLE tech_book ADD CONSTRAINT fk_tech_book_author_id_author_id FOREIGN KEY (author_id) REFERENCES author (id)+ changeType: 0want:- status: 2code: 602@@ -8,7 +9,9 @@startposition:line: 1column: 0+ endposition: null- statement: CREATE TABLE book(id INT, author_id INT, FOREIGN KEY fk_book_author_id_author_id (author_id) REFERENCES author (id))+ changeType: 0want:- status: 2code: 602@@ -18,3 +21,4 @@startposition:line: 1column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/tidb/test/table_require_pk.yaml b/backend/plugin/advisor/tidb/test/table_require_pk.yamlindex 7f581825ac..7844795eb2 100644--- a/backend/plugin/advisor/tidb/test/table_require_pk.yaml+++ b/backend/plugin/advisor/tidb/test/table_require_pk.yaml@@ -1,20 +1,9 @@- statement: CREATE TABLE t(id INT PRIMARY KEY)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(id INT, PRIMARY KEY (id))- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: CREATE TABLE t(id INT)+ changeType: 0want:- status: 2code: 601@@ -24,29 +13,19 @@startposition:line: 1column: 0+ endposition: null- statement: |-CREATE TABLE t(id INT);DROP TABLE t- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(id INT);ALTER TABLE t ADD CONSTRAINT PRIMARY KEY (id)- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(id INT PRIMARY KEY);ALTER TABLE t DROP PRIMARY KEY+ changeType: 0want:- status: 2code: 601@@ -56,9 +35,11 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(id INT PRIMARY KEY);ALTER TABLE t DROP INDEX `PRIMARY`+ changeType: 0want:- status: 2code: 601@@ -68,65 +49,31 @@startposition:line: 2column: 0+ endposition: null- statement: |-CREATE TABLE t(id INT);ALTER TABLE t ADD COLUMN name varchar(30) PRIMARY KEY- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(id INT);ALTER TABLE t CHANGE COLUMN id id INT PRIMARY KEY- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book CHANGE COLUMN id uid INT- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(id INT);ALTER TABLE t MODIFY COLUMN id INT PRIMARY KEY- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: ALTER TABLE tech_book MODIFY COLUMN id INT- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(id INT, name varchar(30), PRIMARY KEY(id, name));ALTER TABLE t DROP COLUMN id- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-CREATE TABLE t(id INT, name varchar(30), comment varchar(255), PRIMARY KEY(id, name));ALTER TABLE t DROP COLUMN id, DROP COLUMN name+ changeType: 0want:- status: 2code: 601@@ -136,7 +83,9 @@startposition:line: 2column: 0+ endposition: null- statement: ALTER TABLE tech_book ADD COLUMN a int, DROP COLUMN id, DROP COLUMN name+ changeType: 0want:- status: 2code: 601@@ -146,17 +95,13 @@startposition:line: 1column: 0+ endposition: null- statement: ALTER TABLE tech_book DROP COLUMN name- want:- - status: 1- code: 0- title: OK- content: ""- detail: ""- startposition: null+ changeType: 0- statement: |-ALTER TABLE tech_book CHANGE COLUMN id uid int;ALTER TABLE tech_book ADD COLUMN a int, DROP COLUMN uid, DROP COLUMN name+ changeType: 0want:- status: 2code: 601@@ -166,3 +111,4 @@startposition:line: 2column: 0+ endposition: nulldiff --git a/backend/plugin/advisor/utils_for_tests.go b/backend/plugin/advisor/utils_for_tests.goindex 18ba8afa80..f477b51b19 100644--- a/backend/plugin/advisor/utils_for_tests.go+++ b/backend/plugin/advisor/utils_for_tests.go@@ -150,7 +150,7 @@ var (type TestCase struct {Statement string `yaml:"statement"`ChangeType storepb.PlanCheckRunConfig_ChangeDatabaseType `yaml:"changeType"`- Want []*storepb.Advice `yaml:"want"`+ Want []*storepb.Advice `yaml:"want,omitempty"`}type testCatalog struct {