# [Known Issues] 上游集群创建视图，导致 DM 同步中断

## Key Words

DM, create view, 视图

## Description

上游创建视图，DM 报 

```json
 "name": "test",
 "stage": "Paused",
 "unit": "Sync",
 "result": {
     "isCanceled": false,
     "errors": [
         {
             "ErrCode": 11007,
             "ErrClass": "functional",
             "ErrScope": "internal",
             "ErrLevel": "high",
             "Message": "startLocation: [position: (mysql-bin.000001, 1794), gtid-set: 2c43df5b-5eea-11ec-aff5-0242ac110002:1-6], endLocation: [position: (mysql-bin.000001, 2009), gtid-set: 2c43df5b-5eea-11ec-aff5-0242ac110002:1-7], origin SQL: [CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `t10` AS select * from t1]: unknown type ddl \u0026{DDLNode:{stmtNode:{node:{text:CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%!`(MISSING) SQL SECURITY DEFINER VIEW `t10` AS select * from t1 offset:0}}} OrReplace:false ViewName:0xc005fa4a50 Cols:[] Select:0xc0004a2ff0 SchemaCols:[] Algorithm:0 Definer:root@%!S(MISSING)ecurity:0 CheckOption:1}",
             "RawCause": "",
             "Workaround": "Please manually handle it using dmctl (skipping the DDL statement or replacing the DDL statement with a specified DDL statement). For details, see https://docs.pingcap.com/tidb-data-migration/stable/handle-failed-sql-statements"
         }
```

相关 issue：[https://github.com/pingcap/tiflow/issues/4173](https://github.com/pingcap/tiflow/issues/4173)

## Root Cause

对应版本 DM 无法跳过 create view 类型的  DDL，

参考 [https://github.com/pingcap/tiflow/pull/4176](https://github.com/pingcap/tiflow/pull/4176)

## Diagnostic Steps

* 确认 DM 版本 < v5.3.1
* 确认上游执行了创建视图的操作
* DM 同步中断并且，task 报错内容包含 `unknown type ddl`

## Resolution

将 DM 升级到 5.3.1 及以上版本

## Workaround

在下游手动执行报错 DDL，然后使用 dmctl 跳过对应的 DDL，[参考操作](https://docs.pingcap.com/tidb-data-migration/stable/handle-failed-sql-statements)。

## Affected Versions

DM < v5.3.1