【 TiDB 使用环境】生产环境 /测试/ Poc
【 TiDB 版本】
【复现路径】做过哪些操作出现的问题
【遇到的问题:问题现象及影响】
【资源配置】进入到 TiDB Dashboard -集群信息 (Cluster Info) -主机(Hosts) 截图此页面
【附件:截图/日志/监控】
mysql5.6->tidb7.5.1总是不支持对分区的truncate操作
“subTaskStatus”: [
{
"name": "xxxxxx_01",
"stage": "Paused",
"unit": "Sync",
"result": {
"isCanceled": false,
"errors": [
{
"ErrCode": 44006,
"ErrClass": "schema-tracker",
"ErrScope": "internal",
"ErrLevel": "high",
"Message": "startLocation: [position: (binlog.001620, 822771972), gtid-set: 7d0295a0-2bbe-11ea-8570-6c92bf2cdb99:1-57123185], endLocation: [position: (binlog.001620, 822772118), gtid-set: 7d0295a0-2bbe-11ea-8570-6c92bf2cdb99:1-57123186], origin SQL: [ALTER TABLE report_xxxxxxx TRUNCATE PARTITION p174]: cannot track DDL: ALTER TABLE db.`report_xxxxxx` TRUNCATE PARTITION p174",
"RawCause": "[ddl:1505]Partition management on a not partitioned table is not possible",
"Workaround": ""
但是我看mysql和tidb都有这个分区,还是说不支持对分区的truncate操作
tidb上
PRIMARY KEY (`ID`,`date`) /*T![clustered_index] CLUSTERED */,
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin
PARTITION BY LIST (DAYOFYEAR(`date`))
(PARTITION `p1` VALUES IN (1),
PARTITION `p2` VALUES IN (2),
PARTITION `p3` VALUES IN (3),
PARTITION `p4` VALUES IN (4),
PARTITION `p171` VALUES IN (171),
PARTITION `p172` VALUES IN (172),
PARTITION `p173` VALUES IN (173),
PARTITION `p174` VALUES IN (174),
PARTITION `p175` VALUES IN (175),
PARTITION `p176` VALUES IN (176),
PARTITION `p177` VALUES IN (177),
mysql上
PRIMARY KEY (`ID`,`date`),
) ENGINE=InnoDB DEFAULT CHARSET=utf8
/*!50100 PARTITION BY LIST (DAYOFYEAR(date))
PARTITION p172 VALUES IN (172) ENGINE = InnoDB,
PARTITION p173 VALUES IN (173) ENGINE = InnoDB,
PARTITION p174 VALUES IN (174) ENGINE = InnoDB,
PARTITION p175 VALUES IN (175) ENGINE = InnoDB,
PARTITION p176 VALUES IN (176) ENGINE = InnoDB,
PARTITION p177 VALUES IN (177) ENGINE = InnoDB,