ErrorCode 36069 When Using DM to Incrementally Migrate from MariaDB to TiDB

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 使用dm 从Mariadb 增量至Tidb 报错:ErrorCode 36069

| username: TiDBer_0D4Nkb09

[TiDB Usage Environment] Testing
[TiDB Version] v7.1.1
[Reproduction Path] Incremental migration from Mariadb to TiDB
[Encountered Issue: Phenomenon and Impact] Error reported during incremental migration to TiDB via DM task creation.
[Resource Configuration] *Enter TiDB Dashboard - Cluster Info - Hosts

Task Configuration Data Source:

Configure data source

mysql-instances:

  • source-id: “mariadb-01”
    block-allow-list: “bw-rule-1”
    meta:
    binlog-name: “log-bin.015032”
    binlog-pos: 34134716
    binlog-gtid: “0-13-41472044”

Metadata Information:
Started dump at: 2023-09-05 14:14:47
SHOW MASTER STATUS:
Log: log-bin.015032
Pos: 34134716
GTID: 0-13-41472044

Finished dump at: 2023-09-05 14:23:48

Complete Error Information:

 tiup dmctl --master-addr 10.0.20.46:8261 query-status task-mariadb-test1
tiup is checking updates for component dmctl ...
Starting component `dmctl`: /root/.tiup/components/dmctl/v7.3.0/dmctl/dmctl --master-addr 10.0.20.46:8261 query-status task-mariadb-test1
{
    "result": true,
    "msg": "",
    "sources": [
        {
            "result": true,
            "msg": "",
            "sourceStatus": {
                "source": "mariadb-01",
                "worker": "dm-10.0.20.46-8262",
                "result": null,
                "relayStatus": null
            },
            "subTaskStatus": [
                {
                    "name": "task-mariadb-test1",
                    "stage": "Paused",
                    "unit": "Sync",
                    "result": {
                        "isCanceled": false,
                        "errors": [
                            {
                                "ErrCode": 36069,
                                "ErrClass": "sync-unit",
                                "ErrScope": "upstream",
                                "ErrLevel": "high",
                                "Message": "get binlog event error: ERROR 1932 (42S02): Table 'mysql.gtid_slave_pos' doesn't exist in engine",
                                "RawCause": "",
                                "Workaround": "Please check if the binlog file could be parsed by `mysqlbinlog`."
                            }
                        ],
                        "detail": null
                    },
                    "unresolvedDDLLockID": "",
                    "sync": {
                        "totalEvents": "11",
                        "totalTps": "0",
                        "recentTps": "0",
                        "masterBinlog": "(log-bin.015032, 63672633)",
                        "masterBinlogGtid": "0-13-41499424",
                        "syncerBinlog": "(log-bin.015032, 34134716)",
                        "syncerBinlogGtid": "0-13-41472044",
                        "blockingDDLs": [
                        ],
                        "unresolvedGroups": [
                        ],
                        "synced": false,
                        "binlogType": "remote",
                        "secondsBehindMaster": "0",
                        "blockDDLOwner": "",
                        "conflictMsg": "",
                        "totalRows": "11",
                        "totalRps": "0",
                        "recentRps": "0"
                    },
                    "validation": null
                }
            ]
        }
    ]
}
| username: ShawnYan | Original post link

The GTID formats of MariaDB and MySQL are different.

| username: 有猫万事足 | Original post link

The version of MariaDB is correct, right? Now it looks like the binlog cannot be explained. The suggestion given is to try parsing the binlog using mysqlbinlog. There might be significant differences with the recognizable binlog format. It’s quite tricky.

| username: cassblanca | Original post link

Version compatibility

| username: 天蓝色的小九 | Original post link

It might be a version issue.

| username: redgame | Original post link

First get it into MySQL, work around this.

| username: xingzhenxiang | Original post link

Try removing this part

binlog-gtid: “0-13-41472044”

| username: TiDB_C罗 | Original post link

Is task-mode incremental or full?

| username: 大飞哥online | Original post link

MariaDB compatibility is not very good yet. You can first synchronize MariaDB to MySQL, and then synchronize from MySQL to TiDB, taking a roundabout way.