(allCols []*table.Column, oldColName pmodel.CIStr)
| 1383 | } |
| 1384 | |
| 1385 | func checkModifyColumnWithGeneratedColumnsConstraint(allCols []*table.Column, oldColName pmodel.CIStr) error { |
| 1386 | for _, col := range allCols { |
| 1387 | if col.GeneratedExpr == nil { |
| 1388 | continue |
| 1389 | } |
| 1390 | dependedColNames := FindColumnNamesInExpr(col.GeneratedExpr.Internal()) |
| 1391 | for _, name := range dependedColNames { |
| 1392 | if name.Name.L == oldColName.L { |
| 1393 | if col.Hidden { |
| 1394 | return dbterror.ErrDependentByFunctionalIndex.GenWithStackByArgs(oldColName.O) |
| 1395 | } |
| 1396 | return dbterror.ErrDependentByGeneratedColumn.GenWithStackByArgs(oldColName.O) |
| 1397 | } |
| 1398 | } |
| 1399 | } |
| 1400 | return nil |
| 1401 | } |
| 1402 | |
| 1403 | var colStateOrd = map[model.SchemaState]int{ |
| 1404 | model.StateNone: 0, |
no test coverage detected