fix: add warning for AlterTableRepairPartition (#18454)
This commit is contained in:
@ -2175,6 +2175,7 @@ func (s *testIntegrationSuite3) TestPartitionErrorCode(c *C) {
|
||||
tk.MustGetErrCode("alter table t_part optimize partition p0,p1;", tmysql.ErrUnsupportedDDLOperation)
|
||||
tk.MustGetErrCode("alter table t_part rebuild partition p0,p1;", tmysql.ErrUnsupportedDDLOperation)
|
||||
tk.MustGetErrCode("alter table t_part remove partitioning;", tmysql.ErrUnsupportedDDLOperation)
|
||||
tk.MustGetErrCode("alter table t_part repair partition p1;", tmysql.ErrUnsupportedDDLOperation)
|
||||
}
|
||||
|
||||
func (s *testIntegrationSuite5) TestConstAndTimezoneDepent(c *C) {
|
||||
|
||||
@ -2212,6 +2212,8 @@ func (d *ddl) AlterTable(ctx sessionctx.Context, ident ast.Ident, specs []*ast.A
|
||||
err = errors.Trace(errUnsupportedOptimizePartition)
|
||||
case ast.AlterTableRemovePartitioning:
|
||||
err = errors.Trace(errUnsupportedRemovePartition)
|
||||
case ast.AlterTableRepairPartition:
|
||||
err = errors.Trace(errUnsupportedRepairPartition)
|
||||
case ast.AlterTableDropColumn:
|
||||
err = d.DropColumn(ctx, ident, spec)
|
||||
case ast.AlterTableDropIndex:
|
||||
|
||||
@ -90,6 +90,7 @@ var (
|
||||
errUnsupportedOptimizePartition = terror.ClassDDL.New(mysql.ErrUnsupportedDDLOperation, fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation], "optimize partition"))
|
||||
errUnsupportedRebuildPartition = terror.ClassDDL.New(mysql.ErrUnsupportedDDLOperation, fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation], "rebuild partition"))
|
||||
errUnsupportedRemovePartition = terror.ClassDDL.New(mysql.ErrUnsupportedDDLOperation, fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation], "remove partitioning"))
|
||||
errUnsupportedRepairPartition = terror.ClassDDL.New(mysql.ErrUnsupportedDDLOperation, fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation], "repair partition"))
|
||||
errUnsupportedExchangePartition = terror.ClassDDL.New(mysql.ErrUnsupportedDDLOperation, fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation], "exchange partition"))
|
||||
// ErrGeneratedColumnFunctionIsNotAllowed returns for unsupported functions for generated columns.
|
||||
ErrGeneratedColumnFunctionIsNotAllowed = terror.ClassDDL.New(mysql.ErrGeneratedColumnFunctionIsNotAllowed, mysql.MySQLErrName[mysql.ErrGeneratedColumnFunctionIsNotAllowed])
|
||||
|
||||
Reference in New Issue
Block a user