Skip to content

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

fix: fix npe in IndexTotalNumberLimitAdvisor (#11993)

He Wangd3f927710db1
diff --git a/backend/plugin/advisor/mysql/advisor_index_total_number_limit.go b/backend/plugin/advisor/mysql/advisor_index_total_number_limit.go
index cd61b19f91..3a658d5e75 100644
--- a/backend/plugin/advisor/mysql/advisor_index_total_number_limit.go
+++ b/backend/plugin/advisor/mysql/advisor_index_total_number_limit.go
@@ -173,7 +173,7 @@ func (checker *indexTotalNumberLimitChecker) EnterAlterTable(ctx *mysql.AlterTab
if tableElement.ColumnDefinition() == nil || tableElement.ColumnDefinition().FieldDefinition() == nil {
continue
}
- checker.checkFieldDefinitionContext(tableName, item.FieldDefinition())
+ checker.checkFieldDefinitionContext(tableName, tableElement.ColumnDefinition().FieldDefinition())
}
// add constraint.
case item.TableConstraintDef() != nil: