背景
DM同步任务报错,报错内容为:
"startLocation: [position: (mysql-bin.007702, 409498399), gtid-set: 2873b8da-f7c6-11ea-97a4-00163e1092a8:1-722134916,777234c5-87b7-11ea-9279-00163e1054e6:1-1444325082,784b7fc9-87b7-11ea-a0b7-00163e068fb5:1-1724587836,abc7d256-e94d-11ec-a600-00163e0a892d:1-57,adc3c038-e94d-11ec-8ce1-00163e0489e6:1-2393:9215-43490743], endLocation: [position: (mysql-bin.007702, 409498652), gtid-set: 2873b8da-f7c6-11ea-97a4-00163e1092a8:1-722134917,777234c5-87b7-11ea-9279-00163e1054e6:1-1444325082,784b7fc9-87b7-11ea-a0b7-00163e068fb5:1-1724587836,abc7d256-e94d-11ec-a600-00163e0a892d:1-57,adc3c038-e94d-11ec-8ce1-00163e0489e6:1-2393:9215-43490743], origin SQL: [rename table ying99_fundtxn.fund_order_offline to ying99_fundtxn.fund_order_offline_bak_20221017, ying99_fundtxn._tmp_fund_order_offline to ying99_fundtxn.fund_order_offline]: ddl on multiple table: rename table ying99_fundtxn.fund_order_offline to ying99_fundtxn.fund_order_offline_bak_20221017, ying99_fundtxn._tmp_fund_order_offline to ying99_fundtxn.fund_order_offline not supported"
但其实,TiDB 6.X之后已经支持multi rename的操作,但是DM在解析时候,还是会阻塞这类语句。
MySQL [(none)]> rename table ying99_fundtxn.fund_order_offline to ying99_fundtxn.fund_order_offline_bak_20221017, ying99_fundtxn._tmp_fund_order_offline to ying99_fundtxn.fund_order_offline;
Query OK, 0 rows affected (0.51 sec)
MySQL [(none)]> show variables like 'version';
+---------------+--------------------+
| Variable_name | Value |
+---------------+--------------------+
| version | 5.7.25-TiDB-v6.1.1 |
+---------------+--------------------+
1 row in set (0.00 sec)