actiontech / dtle

Distributed Data Transfer Service for MySQL
https://actiontech.github.io/dtle-docs-cn
Mozilla Public License 2.0
551 stars 133 forks source link

oracle ddl drop table error #879

Open asiroliu opened 2 years ago

asiroliu commented 2 years ago

Description

oracle ddl drop table error

Steps to reproduce the issue

  1. create oracle to mysql job
  2. src oracle execute sql
    CREATE TABLE TEST.T4(col1 VARCHAR(20), col2 NUMBER);
    DROP TABLE TEST.T4;
  3. dest mysql doesn`t drop table TEST.T4
  4. src dtle log
    2022-01-20T15:42:20.937+0800 [DEBUG] client.driver_mgr.dtle: ============= ddl stmt parse end =========: driver=dtle @module=dtle.ExtractorOracle ddl="CREATE TABLE `TEST`.`T4` (`COL1` VARCHAR(20),`COL2` DOUBLE) DEFAULT CHARACTER SET=utf8" job=aaa-migration timestamp=2022-01-20T15:42:20.937+0800
    2022-01-20T15:42:20.938+0800 [DEBUG] client.driver_mgr.dtle: ============= ddl stmt parse start===============: driver=dtle job=aaa-migration redoSQL="ALTER TABLE "TEST"."T4" RENAME TO "BIN$1f+kJxmfBN/gUGSsBAkA6g==$0" " @module=dtle.ExtractorOracle timestamp=2022-01-20T15:42:20.937+0800
    2022-01-20T15:42:20.938+0800 [ERROR] client.driver_mgr.dtle: ============= ddl parse err===============: driver=dtle redoSQL="ALTER TABLE "TEST"."T4" RENAME TO "BIN$1f+kJxmfBN/gUGSsBAkA6g==$0" " @module=dtle.ExtractorOracle job=aaa-migration timestamp=2022-01-20T15:42:20.938+0800
    2022-01-20T15:42:20.938+0800 [ERROR] client.driver_mgr.dtle: parseOracleToMySQL: driver=dtle err="syntax error, unexpected _to, at line 1:31" job=aaa-migration @module=dtle.ExtractorOracle timestamp=2022-01-20T15:42:20.938+0800
    2022-01-20T15:42:20.938+0800 [DEBUG] client.driver_mgr.dtle: ============= ddl stmt parse start===============: driver=dtle job=aaa-migration redoSQL="DROP TABLE TEST.T4 AS "BIN$1f+kJxmfBN/gUGSsBAkA6g==$0" " @module=dtle.ExtractorOracle timestamp=2022-01-20T15:42:20.938+0800
    2022-01-20T15:42:20.938+0800 [ERROR] client.driver_mgr.dtle: ============= ddl parse err===============: driver=dtle @module=dtle.ExtractorOracle job=aaa-migration redoSQL="DROP TABLE TEST.T4 AS "BIN$1f+kJxmfBN/gUGSsBAkA6g==$0" " timestamp=2022-01-20T15:42:20.938+0800
    2022-01-20T15:42:20.938+0800 [ERROR] client.driver_mgr.dtle: parseOracleToMySQL: driver=dtle @module=dtle.ExtractorOracle err="syntax error, unexpected _as, at line 1:19" job=aaa-migration timestamp=2022-01-20T15:42:20.938+0800
    202

Output of ./dtle version:**

4.22.01.0-4.22.01.x-bf38943
LordofAvernus commented 2 years ago

非必现场景,当redoSQL解析DROP TABLE 为如下两条SQL时候,不支持解析 1.ALTER TABLE SCHEMA.TABLE RENAME TO 2.DROP TABLE SCHEMA.TABLE AS